离开的时候

导航

ios中注意项

1.当导入第三方库出现不支持ARC模式,可以在项目-》Build Phases中对第三方类文件添加Compiler Flags(-fno-objc-arc)

2.获取UITableViewCell中所有子控件
// 获取当前tableView中的所有cell
NSArray *array = [self.tableView visibleCells];
for (NSInteger i = 0; i < array.count; i++) {
       // 判断是否是自定义的chatBgCell
        if ([[array[i] class] isSubclassOfClass:[chatBgCell class]]) {
            // 获取cell中所有子控件
            NSArray *array1 = [[array[i] contentView] subviews];
            for (UIImageView *im in array1) {
                if (im.subviews) {
                    for (UIImageView *imSub in im.subviews) {
                        if ([imSub.class isSubclassOfClass:[UIImageView class]]) {
                            [imSub removeFromSuperview];
                        }
                    }
                }
            }
        }
    }

  

posted on 2014-05-29 16:35  erlang爱好者  阅读(137)  评论(0编辑  收藏  举报