本文主要是介绍ios 获取页面的所有uiimageview 和UIButton,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
- (void) layoutSubviews {//屏蔽系统的ImageView 和 UIButtonfor (UIView *v in [self subviews]) {if ([v class] == [UIImageView class]){[v setHidden:YES];}if ([v isKindOfClass:[UIButton class]] ||[v isKindOfClass:NSClassFromString(@"UIThreePartButton")]) {[v setHidden:YES];}}
//删除当前视图上所有viewNSArray *subViews = [self subviews];if([subViews count] != 0) {[subViews makeObjectsPerformSelector:@selector(removeFromSuperview)];}
这篇关于ios 获取页面的所有uiimageview 和UIButton的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!