Reputation: 84
Clicking on ok or cancel button in UIAlertview
is not working fine. When I am clicking ok or cancel button, UIAlertview
is not dismissed but if i clicking twice on ok or cancel button then and only then UIAlertview
get dismissed.
This is my code.
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];
Upvotes: 0
Views: 399
Reputation: 1415
Meghaji
I think there is problem in your method , I mean it is calling 2 times.
Thanks
Upvotes: 1