Skip to content

UICollectionView和UITableView的复用方法语法糖,不再关注标识符。

License

Notifications You must be signed in to change notification settings

xueyongwei/XReusable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XReusable

CI Status Version License Platform

用在TableView和CollectionView中的语法糖,不是什么奇淫巧技。

· 通过如下方式注册cell:

let view = UITableView.init(frame: CGRect.zero, style: .plain)
view.xr.register(cell: PopListCell.self)

· 通过如下方式复用cell:

let cell: PopListCell = tableView.xr.dequeueReusableCell(for: indexPath)
return cell

CollectionVeiw同理。

Installation

XReusable is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'XReusable'

Author

Ray, [email protected]

License

XReusable is available under the MIT license. See the LICENSE file for more info.

About

UICollectionView和UITableView的复用方法语法糖,不再关注标识符。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published