code style
This commit is contained in:
parent
a5f9081b97
commit
98981b8b0d
|
|
@ -22,7 +22,7 @@ public extension UICollectionView {
|
|||
public func registerNib<T>(forCellClass cellClass: T.Type)
|
||||
where T: ReuseIdentifierProtocol, T: UICollectionViewCell, T: StaticNibNameProtocol {
|
||||
|
||||
self.register(UINib(nibName: T.nibName), forCellReuseIdentifier: T.reuseIdentifier)
|
||||
register(UINib(nibName: T.nibName), forCellReuseIdentifier: T.reuseIdentifier)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -41,7 +41,7 @@ public extension UICollectionView {
|
|||
where T: ReuseIdentifierProtocol, T: UICollectionViewCell, T: NibNameProtocol {
|
||||
|
||||
let nib = UINib(nibName: T.nibName(forConfiguration: interfaceIdiom))
|
||||
self.register(nib, forCellReuseIdentifier: T.reuseIdentifier)
|
||||
register(nib, forCellReuseIdentifier: T.reuseIdentifier)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public extension UICollectionView {
|
|||
public func dequeueReusableCell<T>(forIndexPath indexPath: IndexPath) -> T
|
||||
where T: UICollectionViewCell, T: ReuseIdentifierProtocol {
|
||||
|
||||
return self.dequeueReusableCell(withIdentifier: T.reuseIdentifier, for: indexPath) as! T
|
||||
return dequeueReusableCell(withIdentifier: T.reuseIdentifier, for: indexPath) as! T
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public extension UITableView {
|
|||
public func registerNib<T>(forCellClass cellClass: T.Type)
|
||||
where T: ReuseIdentifierProtocol, T: UITableViewCell, T: StaticNibNameProtocol {
|
||||
|
||||
self.register(UINib(nibName: T.nibName), forCellReuseIdentifier: T.reuseIdentifier)
|
||||
register(UINib(nibName: T.nibName), forCellReuseIdentifier: T.reuseIdentifier)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -41,7 +41,7 @@ public extension UITableView {
|
|||
where T: ReuseIdentifierProtocol, T: UITableViewCell, T: NibNameProtocol {
|
||||
|
||||
let nib = UINib(nibName: T.nibName(forConfiguration: interfaceIdiom))
|
||||
self.register(nib, forCellReuseIdentifier: T.reuseIdentifier)
|
||||
register(nib, forCellReuseIdentifier: T.reuseIdentifier)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ extension UITableView {
|
|||
public func dequeueReusableCell<T>(forIndexPath indexPath: IndexPath) -> T
|
||||
where T: UITableViewCell, T: ReuseIdentifierProtocol {
|
||||
|
||||
return self.dequeueReusableCell(withIdentifier: T.reuseIdentifier, for: indexPath) as! T
|
||||
return dequeueReusableCell(withIdentifier: T.reuseIdentifier, for: indexPath) as! T
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue