我到处找都找不到这个问题的答案。
在我的UITableView的单元格中,左侧有空白区域。我该怎么摆脱它呢?
我使用的是swift-4 IOS-11,xCode- Version 9.0 beta 6
As shown in this picture, I can not remove the left margin.
我试过这些,但没有:
1-> cell.imageView?.contentMode = .scaleToFill
2-> tableView.layoutMargins = UIEdgeInsets.zero
tableView.separatorInset = UIEdgeInsets.zero
3->cell.layoutMargins = UIEdgeInsets.zero
4->self.tableView.contentInset = UIEdgeInsetsMake(0,-15,0,0);
请帮帮我:/
发布于 2017-09-12 17:32:25
创建UITableViewCell的子类。
在它内部设置方法:
- (void)setFrame:(CGRect)frame
{
frame.origin.x = 0;
//More frame stuff if you want
[super setFrame:frame];
}然后将该子类用于UITableView中的单元格。
https://stackoverflow.com/questions/46171575
复制相似问题