My easy solution using Swift :
// Inside UITableViewCell subclass
override func layoutSubviews() {
super.layoutSubviews()
contentView.frame = contentView.frame.inset(by: UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10))
}
More Related Contents:
- Assertion failure in dequeueReusableCellWithIdentifier:forIndexPath:
- iOS 8 UITableView separator inset 0 not working
- How to customize the background/border colors of a grouped table view cell?
- Resizing UITableView to fit content
- How to put buttons over UITableView which won’t scroll with table in iOS
- Hide separator line on one UITableViewCell
- Customize UITableView header section
- UITableView Cell selected Color?
- How to make a push segue when a UITableViewCell is selected
- How to remove empty cells in UITableView? [duplicate]
- UITableView set to static cells. Is it possible to hide some of the cells programmatically?
- UITableView with fixed section headers
- UITableViewCell with dynamic height iOS
- Remove empty space before cells in UITableView
- Tutorial on How to drag and drop item from UITableView to UITableView [closed]
- How can I create a big, red UIButton with iOS?
- Use didSelectRowAtIndexPath or prepareForSegue method for UITableView?
- How does cellForRowAtIndexPath work?
- Expand UILabel inside UITableView with “more” button like Instagram
- What is “error in __connection_block_invoke_2: Connection interrupted” in iOS?
- UITableView Mix of Static and Dynamic Cells?
- How to save NSMutablearray in NSUserDefaults
- UICollectionView update a single cell
- Trouble with AutoLayout on UITableViewCell
- Setting scroll position in UITableView
- Play video on UITableViewCell when it is completely visible
- Grouped UITableview remove outer separator line
- Expanding and collapsing UITableViewCells with DatePicker
- Design UITableView’s section header in Interface Builder
- UIRefreshControl with UICollectionView in iOS7