UITableView cell 半透明效果,改变cell高度时背景不闪的解决方法
2015-03-25 18:16
218 查看
如果直接指定cell.backgroundColor = = [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:0.8];在ios7下改变cell高度时cell背景会闪
通过以下方法可避免此问题,将cell对背景色clear,cell的contentView的背景色置为半透明
cell.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:0.8];
通过以下方法可避免此问题,将cell对背景色clear,cell的contentView的背景色置为半透明
cell.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:0.8];
相关文章推荐
- CardView 添加背景图片、改变颜色、水波纹效果的方法
- UITableView中Cell重用机制导致内容重复解决方法
- UITableView中Cell重用机制导致内容重复解决方法
- ios tableView那些事 (十六) UITableView中Cell重用机制导致内容重复解决方法
- UITableView中Cell重用机制导致内容重复解决方法
- 使用Autolayout实现UITableView的Cell动态布局和高度动态改变
- UITableView-FDTemplateLayoutCell缓存cell高度时,cell重叠高度为0的问题解决
- ios tableView那些事 (十六) UITableView中Cell重用机制导致内容重复解决方法
- iOS开发笔记--解决UITableView中Cell重用机制导致内容出错的方法总结
- 四种方法实现UITableView的cell高度自动计算
- UITableView-FDTemplateLayoutCell 与Masonry 一起解决不定高度的cell
- UITableView Cell 点击时的带颜色背景效果,而不是选中颜色效果
- UITableView中Cell重用机制导致内容重复解决方法
- 解决UITableView中Cell重用机制导致内容出错的方法总结
- 使用Autolayout实现UITableView的Cell动态布局和高度的动态改变
- [译]使用Autolayout实现UITableView的Cell动态布局和高度动态改变
- 使用Autolayout实现UITableView的Cell动态布局和高度动态改变
- 使用Autolayout实现UITableView的Cell动态布局和高度动态改变
- 几种设置UITableView的cell动态高度的方法
- UITableView点击cell之后进入一个新的viewController界面,在pop回来坐标下移64像素的解决方法