Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.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
Iphone UITableView单元格中图像的填充_Iphone_Objective C_Cocoa Touch_Uitableview_Uiimageview - Fatal编程技术网

Iphone UITableView单元格中图像的填充

Iphone UITableView单元格中图像的填充,iphone,objective-c,cocoa-touch,uitableview,uiimageview,Iphone,Objective C,Cocoa Touch,Uitableview,Uiimageview,我已经成功地安装了一个迷你应用程序,它有一个标题、描述和图像表。问题是,图像被拼接到左边,细胞之间几乎没有任何空间 有没有可能在里面放一些填充物给它一点空间 谢谢。只需更改单元格的图像视图的框架即可 cell.imageView.frame = CGRectMake(x,y,width,height); 如果要将其从左侧移开,请将x设置为高于0的任何值。我遇到了相同的问题,并使用以下方法解决了此问题: cell.indentationWidth = xxx; 在cellForRowAtInd

我已经成功地安装了一个迷你应用程序,它有一个标题、描述和图像表。问题是,图像被拼接到左边,细胞之间几乎没有任何空间

有没有可能在里面放一些填充物给它一点空间


谢谢。

只需更改单元格的
图像视图的框架即可

cell.imageView.frame = CGRectMake(x,y,width,height);

如果要将其从左侧移开,请将x设置为高于0的任何值。

我遇到了相同的问题,并使用以下方法解决了此问题:

cell.indentationWidth = xxx;

在cellForRowAtIndexPath中。希望这对其他人有帮助。

您能提供更多代码/您尝试过的内容吗?不,它不起作用。您需要将UITableViewCell子类化并覆盖LayoutSubView。