页面间的跳转动画,及给tableView cell设置阴影和圆角
2017-07-23 23:08
831 查看
页面间的跳转动画
最终效果如下:
源代码在:这里
给tableView cell设置圆角,效果图如下所示:
方法如下:在自定义的CustomCell里添加这样的方法:
// // 设置阴影
self.imgView.clipsToBounds = YES;
self.imgView.layer.cornerRadius = 20;
self.contentView.clipsToBounds = YES;
self.layer.cornerRadius = 20;
self.contentView.layer.cornerRadius = 20.0f;
self.layer.shadowColor = [UIColor darkGrayColor].CGColor;
self.layer.shadowOffset = CGSizeMake(5, 5);
self.layer.shadowRadius = 4.0f;
self.layer.shadowOpacity = 0.5f;
最关键的就是设置contentView。
最终效果如下:
源代码在:这里
给tableView cell设置圆角,效果图如下所示:
方法如下:在自定义的CustomCell里添加这样的方法:
// // 设置阴影
self.imgView.clipsToBounds = YES;
self.imgView.layer.cornerRadius = 20;
self.contentView.clipsToBounds = YES;
self.layer.cornerRadius = 20;
self.contentView.layer.cornerRadius = 20.0f;
self.layer.shadowColor = [UIColor darkGrayColor].CGColor;
self.layer.shadowOffset = CGSizeMake(5, 5);
self.layer.shadowRadius = 4.0f;
self.layer.shadowOpacity = 0.5f;
最关键的就是设置contentView。
相关文章推荐
- tabletableView的cell点击 跳转页面 出现延迟的状况
- iOS 设置tableView每个分区cell圆角
- Swift - 设置tableView每个分区cell圆角
- Swift - 设置tableView每个分区cell圆角
- tableView 滚动 cell 中设置圆角头像性能优化的问题
- iOS中tableView cell分割线的一些设置技巧
- UICollectionViewCell设置阴影
- 给TableView Cell 添加动画
- viewpager 跳转不经过中间页面设置方法
- 在uiview 的tableView中点击cell进入跳转到另一个界面的实现方法
- 关于TableView Cell的一些设置
- Swift设置Table View的Cell中Lable自适应内容高度的
- tableview使用自定义类,页面跳转,本地存储
- 点击TableView任一行跳转详情页面会跳转两次的解决办法
- iOS实现TableView中Cell出现时弹出动画
- IOS--UIViewUIButtonUIImageView设置圆角、阴影、边框的方法
- tableview中用动画效果改变cell的高度
- iOS08 页面跳转动画设置方法
- IOS中点击TableView的Cell跳转
- 给TableView或者CollectionView的cell添加动画