不是 heightForRowAtIndexPath: 这个的间距,我指的是cell与cell之间的间距,默认是贴紧的!!!!
不是 heightForRowAtIndexPath: 这个的间距,我指的是cell与cell之间的间距,默认是贴紧的!!!!
重写cell的setFrame方法
MessageCellSectionMargin自定义一个数值
- (void)setFrame:(CGRect)frame {
CGRect cellFrame = frame;
cellFrame.size.height = cellFrame.size.height - MessageCellSectionMargin;
cellFrame.origin.y = cellFrame.origin.y + MessageCellSectionMargin;
frame = cellFrame;
[super setFrame:frame];
}
2 回答1k 阅读
1 回答1.1k 阅读✓ 已解决
1 回答2.7k 阅读
1 回答1.5k 阅读
1 回答1.4k 阅读
1.7k 阅读
1 回答1.1k 阅读
你的意思是。。就像微博里面那样。。好像每个 cell 之间有间隙那种么?
笨方法,每个cell 里面设置一点点空白区域啊 X D
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {