[alert show];
I always forget this too. Happy Coding.
题
Fresh and green newbie here. I just started programming and already got stuck with UIAlert. I've searched on this site but there are so many postings and as I said I am kinda new to all this so I don't know what to really look for. This is what I have.
-(void)showError {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Please try again later. Have a nice day."
delegate:nil
cancelButtonTitle:@"Dismiss"
otherButtonTitles:nil];
}
解决方案 3
[alert show];
I always forget this too. Happy Coding.
其他提示
Need to do
[alert show];
to present
Code should be :
-(void)showError {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Please try again later. Have a nice day."
delegate:nil
cancelButtonTitle:@"Dismiss"
otherButtonTitles:nil];
[alert show];
[alert release];
}
-(void)showError {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Please try again later. Have a nice day."
delegate:nil
cancelButtonTitle:@"Dismiss"
otherButtonTitles:nil];
[alert show];
}