如何将UITextField仅添加到只包含一个部分的表中的八个tableview单元格...
答案 0 :(得分:1)
if(indexPath.row < 8)
{
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 300.0f, 100.0f)];
[[cell contentView] textView];
}
到
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
实施文件中的方法
答案 1 :(得分:0)
1)你的桌面视图中会有多少个单元格? 2)你需要以任何方式定位吗? 3)你打算用它做什么?
答案 2 :(得分:0)
在'cellForRowatIndexPath'中,只需添加一些'if {} else {}'代码。
如果所有单元格都在一个区域中,则需要使用“[indexPath row]”来区分它们。