单击确定或取消按钮UIAlertview
无法正常工作。当我单击确定或取消按钮时,UIAlertview
不会被解雇,但如果我在确定或取消按钮上单击两次,然后才会UIAlertview
被解雇。
这是我的代码。
alert = [[UIAlertView alloc] initWithTitle:@"Plese Enter comma seperated sets"
message:@"\n"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Save", nil] ;
CGRect rect = {12, 60, 260, 25};
dirField = [[UITextField alloc] initWithFrame:rect] ;
dirField.backgroundColor = [UIColor whiteColor];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
dirField.text = setString;
[dirField setText:@"test"];
[dirField becomeFirstResponder];
[alert addSubview:dirField];
[alert show];