Skip to content

Commit cbb8009

Browse files
committed
no message
1 parent 736ddb3 commit cbb8009

4 files changed

Lines changed: 25 additions & 2 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "photo.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"version" : 1,
19+
"author" : "xcode"
20+
}
21+
}
226 KB
Loading

CornerRadius/CornerRadius/CustomTableViewCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CustomTableViewCell: UITableViewCell {
4949
imgView1.image = UIImage(named: imgName)
5050
imgView2.image = UIImage(named: imgName)
5151
imgView3.image = UIImage(named: imgName)
52-
imgView4.image = UIImage(named: imgName)
52+
imgView4.image = UIImage(named: "photo")
5353
}
5454

5555
override func setSelected(selected: Bool, animated: Bool) {

CornerRadius/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CornerRadius
22

3+
参考了这篇文章:[小心别让圆角成了你列表的帧数杀手](http://www.cocoachina.com/ios/20150803/12873.html)
4+
35
都说 `cornerRadius` + `masksToBounds` 会导致离屏渲染,从而大幅度降低 `UITabelView` 滑动时的性能。
46

5-
我做了一个 demo,在 cell 中放了四个 UIImageView,但是在 Instument 中检测时并没有发现离屏渲染,滑动时帧数也未见下降
7+
我做了一个 demo,在 cell 中放了四个 UIImageView,令我惊讶的是,使用不同的图片可能会导致不同的结果。有些图片设置圆角会导致离屏渲染,有些则不会。即使四个图片都导致了离屏渲染,也并没有看到滑动时帧数的下降

0 commit comments

Comments
 (0)