不是 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];
}
1 回答831 阅读
2 回答625 阅读
1 回答611 阅读
2 回答614 阅读
1 回答703 阅读
645 阅读
你的意思是。。就像微博里面那样。。好像每个 cell 之间有间隙那种么?
笨方法,每个cell 里面设置一点点空白区域啊 X D
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {