0

UIAlertview在 iOS7 中,当它在子类中被解散但在父类中被解散时不会被解散。有什么解决办法吗?

UIAlertView  *alertView=[[[UIAlertView alloc]initWithTitle:@"" 
                                                   message:@"Please Select the Start Date"
                                                  delegate:self
                                         cancelButtonTitle:@"Ok"
                                                   otherButtonTitles:nil] autorelease];
[alertView show];

委托方式:

#pragma UIAlertView Delegate
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
    if (buttonIndex==0) {
        [alertView dismissWithClickedButtonIndex:0 animated:YES];
    }
}
4

0 回答 0