Skip to content

Commit 66b1477

Browse files
committed
Update README.md
1 parent f92796f commit 66b1477

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

CornerRadius/CornerRadius/ViewController.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour
1717
table.dataSource = self
1818

1919
view.addSubview(table)
20-
21-
let imageView = UIImageView(image: UIImage(named: "photo"))
22-
imageView.frame = CGRectMake(100, 100, 200, 200)
23-
imageView.kt_addCorner(radius: 20)
24-
// view.addSubview(imageView)
2520
// Do any additional setup after loading the view, typically from a nib.
2621
}
2722

CornerRadius/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# CornerRadius
22

3+
这是我的博客中:[iOS高效添加圆角效果实战讲解](http://www.jianshu.com/p/f970872fdc22)一文的 demo,据说配合着代码看博客效果更佳!
4+
5+
## 2016.2.28 A
6+
7+
不存在 iOS9 优化,只是圆角不够多,还没有影响性能。一旦超过某个临界值(iPhone6 上估计是 20多)就会大幅度降低 fps。
8+
9+
如果 `UIImageView` 的 width 和 height 相同,在某些情况下(可能是图片带有 alpha 通道),系统可能会自动优化,这时候就不会出现离屏渲染。
10+
11+
## 2016.2.27 Q
312
参考了这篇文章:[小心别让圆角成了你列表的帧数杀手](http://www.cocoachina.com/ios/20150803/12873.html)
413

514
都说 `cornerRadius` + `masksToBounds` 会导致离屏渲染,从而大幅度降低 `UITabelView` 滑动时的性能。

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
这些demo都是用来配合我的博客,你可以选择在简书或我的个人博客阅读文章,水平有限欢迎指正。
1010

11+
* iOS 高效添加圆角效果实战讲解 [简书](http://www.jianshu.com/p/f970872fdc22)[bestswifter](http://bestswifter.com/efficient-rounded-corner/)
1112
*`UIColor` 遇上 Swift [简书](http://www.jianshu.com/p/f2173235cde8)[bestswifter](http://bestswifter.com/uicolorliteral/)
1213
* iOS自定义转场动画实战讲解 [简书](http://www.jianshu.com/p/ea0132738057)[bestswifter](http://bestswifter.com/custom-transition-animation/)
1314
* 你应该知道的Swift小tips:[简书](http://www.jianshu.com/p/a11c6060176c)

0 commit comments

Comments
 (0)