- (void) performDismiss: (NSTimer *)timer

{
    [baseAlert dismissWithClickedButtonIndex:0 animated:NO];//important
    [baseAlert release];
    baseAlert = NULL;
}
 
- (void) presentSheet
{
    baseAlert = [[UIAlertView alloc]
                              initWithTitle:@"Alert" message:@"\nMessage to user with asynchronous information"
                              delegate:self cancelButtonTitle:nil
                              otherButtonTitles: nil];
    [NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector: @selector(performDismiss:)
                                   userInfo:nil repeats:NO];
    [baseAlert show];
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-09
  • 2021-04-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-06-30
相关资源
相似解决方案