如何手动设置UITableViewCell?

如何手动设置UITableViewCell?,uitableview,Uitableview,我为我的单元格创建了UITableVewCell子类,并希望将单元格的高度设置为70px。有可能吗?我该怎么做呢?我找到了解决办法 - (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 70; } -(CGFloat)tableView:(UITableView*)表视图行高度索引路径:(NSIndexPath*)索引路径{ 返回70

我为我的单元格创建了UITableVewCell子类,并希望将单元格的高度设置为70px。有可能吗?我该怎么做呢?

我找到了解决办法

- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 70; } -(CGFloat)tableView:(UITableView*)表视图行高度索引路径:(NSIndexPath*)索引路径{ 返回70; }
您需要使用UITableView的Delegate方法,同样,也有很多方法用于其他目的

- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

    return 70;
}
有关更多详细信息,请访问以下链接: