iphone - iPhone上的警报 View

标签 iphone ios uialertview

我想检查UIALertView是否显示在屏幕上,尽管我已经使用以下方法完成了它:

-(BOOL) isAlertShowing
{

    for (UIWindow* window in [UIApplication sharedApplication].windows) {
        NSArray* subviews = window.subviews;
        if ([subviews count] > 0)
            if ([[subviews objectAtIndex:0] isKindOfClass:[UIAlertView class]])
                return YES;
    }
    return NO;      
}

但是我知道它是没有证件的。因此,请告诉我进行身份验证的方式。

最佳答案

在我提交(并获得批准)的应用程序中,我使用了类似的方法(请参阅iPhone: detecting if a UIAlert/UIActionSheet are open)...

我不明白为什么您认为这不是有效方法-我会尝试的。

关于iphone - iPhone上的警报 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8562045/

相关文章:

iphone - XCode 4 中的临时分发

ios - 跟踪单击哪个 UIAlert 按钮以更改 UILabel

iphone - 尝试将 iPhone 应用程序安装到我的开发设备上时出现 "Incorrect Architecture"

使用 OpenCV 和 AVFoundation 框架的 iPhone 实时图像处理?

ios - 在变量中使用闭包时,swift 变量和函数有什么区别?

ios - AVQueuePlayer 设置音频的 Tempo

ios - Xmpp IOS 多用户聊天。我没有找到接受群组邀请的方法?我怎样才能接受传入的邀请

iphone - 如何在 iOS 7 中以编程方式正确关闭 UIAlertView?

iphone - 停止 UIAlertView 关闭

iphone - 单击按钮时使用不同参数调用 api,并将其传递到 iPhone 中行索引路径的单元格