相关疑难解决方法(0)

自定义UITableViewCell的覆盖

我有一个UITableViewCell我这样使用的自定义:

AppTableCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"AppTableCell" owner:self options:nil];  
    for(id currentObject in topLevelObjects) {
        if([currentObject isKindOfClass:[AppTableCell class]]) {
            cell = (AppTableCell *)currentObject;
            break;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

工作完美无瑕.但是,我想在创建时为单元格做一些自定义的事情.通常我会覆盖类似的东西initWithFrame,但它没有在这里使用.我应该覆盖哪种方法来自定义初始化?

iphone ios

11
推荐指数
1
解决办法
6649
查看次数

标签 统计

ios ×1

iphone ×1