遍历界面中所有的视图

#define APPDELEGATE ((AppDelegate *)[UIApplication sharedApplication].delegate)    

for (UIView* subview in [APPDELEGATE.window subviews]) {
        if(subview.tag == kTagMJAlertView && [subview isKindOfClass:[UIView class]]) {
            notifier = subview;
        }
    }

 

posted on 2015-10-30 14:03  秋风渡河上  阅读(238)  评论(0)    收藏  举报