mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-04-26 05:05:06 +08:00
Improve scroll perf of DotListView, add border (#1135)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -40,7 +40,6 @@ class DotListView: UIView, UICollectionViewDataSource {
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
collectionView.frame = bounds
|
||||
collectionView.reloadData()
|
||||
}
|
||||
|
||||
// MARK: UICollectionViewDataSource
|
||||
|
||||
Reference in New Issue
Block a user