code style

This commit is contained in:
Fedor Semenchenko 2016-10-18 21:41:07 +03:00
parent a5f9081b97
commit 98981b8b0d
4 changed files with 6 additions and 6 deletions

View File

@ -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)
}
}

View File

@ -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
}
}

View File

@ -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)
}
}

View File

@ -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
}
}