Hello everyone
I hope to use an UIAlertView prompt to reminder user some messages, the alerview will be closed automatically in 2 seconds.
my codes:
IBOutlet UIAlertView *aUIAlertView;
....
@property (retain,nonatomic) IBOutlet UIAlertView *aUIAlertView;
....
UIAlertView * alert=[[UIAlertView alloc]
initWithTitle: @"Reminder"
message: @"Message"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:nil, nil];
[NSTimer scheduledTimerWithTimeInterval:2
target:self
selector:@selector(timerFired1:)
userInfo:nil
repeats:NO];
aUIAlertView=alert;
[alert show];
- (void)timerFired1:(NSTimer *)timer {
[aUIAlertView release];//I set the breakpoint here, aUIAlertView is not nill
}
timer was prompted, aUIAlertView is not nil. but the alertview still displayed rather than was closed as I hoped.
Welcome any comment
Thanks