Xcode autostretch uitextview、scrollview和静态单元格
我有一个带有四个静态单元格的uitableview 第一个单元格有一个uitextview 第二、第三和规则单元格 第四个单元格具有uitextview 我需要第一个和第四个单元格根据内容大小进行增长和收缩。第四个单元格将有更大的文本,所以整个页面应该滚动显示 有什么办法吗?谢谢 D.您可以使用:Xcode autostretch uitextview、scrollview和静态单元格,xcode,uitextview,Xcode,Uitextview,我有一个带有四个静态单元格的uitableview 第一个单元格有一个uitextview 第二、第三和规则单元格 第四个单元格具有uitextview 我需要第一个和第四个单元格根据内容大小进行增长和收缩。第四个单元格将有更大的文本,所以整个页面应该滚动显示 有什么办法吗?谢谢 D.您可以使用: - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ if
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 0) {
// Your code to find height of the text whic will display in UITextView.
}else{
// your default cell height
}
}
希望这对你有帮助
祝你一切顺利