Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.12 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.12 KB

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.