Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/95.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.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
Ios 如何定位UITableViewCell';s内容视图_Ios_Objective C_Uitableview - Fatal编程技术网

Ios 如何定位UITableViewCell';s内容视图

Ios 如何定位UITableViewCell';s内容视图,ios,objective-c,uitableview,Ios,Objective C,Uitableview,我如何更改UITableViewCellcontent视图的位置而不子类化“UITableViewCell” 放置cell.contentView.bounds=CGRectMake(20,50,10,10)内部cellforrowatinexpath不起作用。您似乎想在tableView中添加多个列,请参见 和 它们使用子类化您的UITABEVIEWCELL的方式,可以方便地自定义单元格的样式。而五月的帮助更大 但是,您可以创建一个新视图并将其设置为单元格。contentView,它将替换

我如何更改
UITableViewCell
content视图的位置而不子类化“UITableViewCell”


放置
cell.contentView.bounds=CGRectMake(20,50,10,10)内部
cellforrowatinexpath
不起作用。

您似乎想在tableView中添加多个列,请参见


它们使用子类化您的UITABEVIEWCELL的方式,可以方便地自定义单元格的样式。而五月的帮助更大


但是,您可以创建一个新视图并将其设置为
单元格。contentView
,它将替换单元格的contentView。如果您想要一个较小的高度,请不要忘记设置单元格的行高。

cell.contentView存在一些渲染问题,视图在渲染时会一直闪烁scrolling@JAHelia我使用子类化UITableViewCell的方法,但没有遇到您描述的问题。可能UI或数据太大,单元格无法渲染。我知道单元格中还有一些其他视图:
backgroundView
selectedBackgroundView
image
accessoryView
。如果您仍然不想子类化,或许可以尝试一下。:)