दिखाते हुए UIAlertView beforing को खारिज कर देता है मेरे पास एक Utils क्लास है जो कुछ नोटिफिकेशन ट्रिगर होने पर UIAlertView दिखाती है। क्या कोई नया दिखाए जाने से पहले किसी भी खुले यूआईएलर्टव्यू को खारिज करने का कोई तरीका है?आईओएस एक अन्य
currenty मैं जब एप्लिकेशन को पृष्ठभूमि का उपयोग कर
[self checkViews:application.windows];
applicationDidEnterBackground
पर
- (void)checkViews:(NSArray *)subviews {
Class AVClass = [UIAlertView class];
Class ASClass = [UIActionSheet class];
for (UIView * subview in subviews){
if ([subview isKindOfClass:AVClass]){
[(UIAlertView *)subview dismissWithClickedButtonIndex:[(UIAlertView *)subview cancelButtonIndex] animated:NO];
} else if ([subview isKindOfClass:ASClass]){
[(UIActionSheet *)subview dismissWithClickedButtonIndex:[(UIActionSheet *)subview cancelButtonIndex] animated:NO];
} else {
[self checkViews:subview.subviews];
}
}
}
यह applicationDidEnterBackground पर आसान के रूप में मैं application.windows
कर सकते हैं का उपयोग कर सकते बनाता है में प्रवेश करती है यह कर रहा हूं मैं AppDelegate या सभी विचारों को प्राप्त करने के समान कुछ भी उपयोग करता हूं, उनके माध्यम से लूप करता हूं और किसी भी UIAlertViews को खारिज करता हूं?
वास्तव में अच्छी तरह से काम करता है। धन्यवाद :) –
ऐसा लगता है कि यह आईओएस 6 पर काम नहीं कर रहा है। – erkanyildiz
... और यही कारण है कि निजी आंतरिक दृश्य संरचनाओं को पुन: सक्रिय करना एक नाजुक प्रक्रिया है। –