为什么我不能将超过6个字符粘贴到UIAlertView中的UITextField中?

时间:2012-12-06 11:26:40

标签: ios uitextfield uialertview

我在UIAlertView中有UITextField。

当我将6个字符复制并粘贴到警报视图文本字段时,它可以正常工作,但是当我粘贴6个以上时它不起作用。

我该如何解决这个问题?

-(IBAction)btnForgotPasswordHandler:(id)sender{
    cancelbtnPressed = NO;
    self.alert=[[UIAlertView alloc]initWithTitle:@"Skribbee" message:@"Please input your email address to proceed!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Cancel", nil];
    [self.alert setAlertViewStyle:UIAlertViewStylePlainTextInput];
    tfLostPassword=[alert textFieldAtIndex:0];
    tfLostPassword.delegate = self;
    [tfLostPassword setKeyboardType:UIKeyboardTypeEmailAddress];
    [tfLostPassword setPlaceholder:@"Email Address"];
    tfLostPassword.returnKeyType = UIReturnKeyGo;
    [self.alert show];
}

0 个答案:

没有答案