Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何手动设置UITableViewCell?_Uitableview - Fatal编程技术网

如何手动设置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;
}
有关更多详细信息,请访问以下链接: