zoukankan      html  css  js  c++  java
  • UIAlertView 自动dismiss? (先设NSTimer,后调用Delegate)

    - (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];
    }
  • 相关阅读:
    信号
    test
    keil4打开keil5工程卡死问题
    day01
    SSH问题
    QT_day02
    QT_day01
    C++_day9am
    文件描述符与重定向
    C++_day8pm_多态
  • 原文地址:https://www.cnblogs.com/easonoutlook/p/2642807.html
Copyright © 2011-2022 走看看