我有一个UITableView,在其中(不在标题中!)我想要一个新的UIView。这是在WhatsApp中完成的,在聊天选项卡中(我是新来的,所以无法添加图片!)。非常感谢任何帮助。
问候
编辑后的答案:
你可以这样做。在..中初始化2个按钮或2个视图。
在cellForRowAtIndexPath方法中:
UIView * superView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 45)];
[superView addSubview:view1];
[superView addSubview:view2];
// You should make sure that CGRectMake of view1 + view 2 = superView //
Check if (indexPath.row == lastRow)
{
[cell addSubview: superView]
}
翻译后的答案:
你应该使用
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
我认为你正在寻找的确切答案可以在这里!!找到。