我的 masterView 中有一个表,在 detailView 中有一些 imageView,基于 masterView 中的不同行选择,我必须删除 ImageView 并添加一些其他视图。我无法删除 ImageView .... 任何帮助??? 提前致谢
2 回答
            0        
        
		
尝试:
for (UIView *view in masterView.subviews){
   if (view == yourImageView) {
       [view removeFromSuperview];            
   }
}
    于 2012-04-24T10:51:32.093   回答
    
    
            0        
        
		
首先,您向所有图像视图提供除 0 以外的标记值
进而
for (UIView *sub in [self.view subviews]) {
         use tag to find proper view and remove it from superView
    }
    于 2012-04-24T10:51:51.457   回答