Remove unnecessary 'get' identifier of 'layoutAttributesClass' property of FSPagerViewLayout.

This commit is contained in:
WenchaoD 2018-09-20 13:36:05 +08:00
parent 130c99c1bb
commit 452486b098
1 changed files with 2 additions and 3 deletions

View File

@ -17,9 +17,7 @@ class FSPagerViewLayout: UICollectionViewLayout {
internal var scrollDirection: FSPagerView.ScrollDirection = .horizontal
open override class var layoutAttributesClass: AnyClass {
get {
return FSPagerViewLayoutAttributes.self
}
return FSPagerViewLayoutAttributes.self
}
fileprivate var pagerView: FSPagerView? {
@ -143,6 +141,7 @@ class FSPagerViewLayout: UICollectionViewLayout {
override open func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
let attributes = FSPagerViewLayoutAttributes(forCellWith: indexPath)
attributes.indexPath = indexPath
let frame = self.frame(for: indexPath)
let center = CGPoint(x: frame.midX, y: frame.midY)
attributes.center = center