- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
FindTableViewCell *cell;
if (!cell) {
[tableView registerNib:[UINib nibWithNibName:@"FindTableViewCell" bundle:nil] forCellReuseIdentifier:@"cell_a"];
cell = [tableView dequeueReusableCellWithIdentifier:@"cell_a" forIndexPath:indexPath];
if (APPScreenWidth==320) {
cell.PreferenceL.constant=10;
cell.SubW.constant=150;
}
cell.manyView.hidden=YES;
// 取消选中状态
cell.selectionStyle=UITableViewCellSelectionStyleNone;
// 取消分割线
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
return cell;
}

本文介绍如何在iOS应用中使用自定义UITableViewCell,并展示了如何通过代码实现UITableViewCell的注册、重用及界面元素的配置。此外,还提供了针对不同屏幕宽度的适配方案。

7669

被折叠的 条评论
为什么被折叠?



