use the following writing in OC to make tableViewCell have spacing
- (void)setFrame:(CGRect)frame{
frame.origin.y += 15;
frame.size.height -= 15;
[super setFrame:frame];
}
in Swift, I use the following to conclude that the height of the cell is not correct
override var frame: CGRect {
get { return super.frame }
set {
var updateFrame = frame
updateFrame.origin.y += 10
updateFrame.size.height -= 10
super.frame = updateFrame
}
}