

1
问题:Autolayout布局的cell内subView自定义圆角(上下左右)
cell.contentView
--------- a view
-------------b view
解决方法:确保设置圆角view的父控件已经布局完成,然后调用圆角view的父控件进行子控件强制布局
- (void)layoutSubviews {
[super layoutSubviews];
[self.bView.superview layoutIfNeeded];
[self.bView ja_roundCorners:(UIRectCornerBottomLeft | UIRectCornerBottomRight) radius:8];
}
参考:由使用Masonry布局不能立即获取到frame想到的一些问题
记录日期:2018年04月25日
网友评论