Improve scroll perf of DotListView, add border (#1135)

This commit is contained in:
Ryan Nystrom
2017-12-02 18:48:45 -05:00
committed by GitHub
parent 872da1f458
commit ab9e0cb9de
2 changed files with 10 additions and 1 deletions

View File

@@ -12,6 +12,16 @@ final class IssueLabelDotCell: UICollectionViewCell {
static let reuse = "cell"
override init(frame: CGRect) {
super.init(frame: frame)
layer.borderColor = Styles.Colors.Gray.border.color.cgColor
layer.borderWidth = 1 / UIScreen.main.scale
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func layoutSubviews() {
super.layoutSubviews()
layer.cornerRadius = bounds.width/2

View File

@@ -40,7 +40,6 @@ class DotListView: UIView, UICollectionViewDataSource {
override func layoutSubviews() {
super.layoutSubviews()
collectionView.frame = bounds
collectionView.reloadData()
}
// MARK: UICollectionViewDataSource