2 "name": "KissPaginate",
4 "summary": "Simplify your implementation of tableView paginate.",
5 "description": "```\nclass ViewController: PaginateViewController {\n @IBOutlet weak var noElementLabel: UILabel!\n\n override func viewDidLoad() {\n super.viewDidLoad()\n tableView.dataSource = self\n refreshElements()\n }\n\n override var getElementsClosure: (page: Int, successHandler: GetElementsSuccessHandler, failureHandler: (error: Error) -> Void) -> Void {\n return getElementList\n }\n\n func getElementList(page: Int, successHandler: GetElementsSuccessHandler, failureHandler: (error: Error) -> Void) {\n let elements = (0...20).map { \"page (page), element index\" + String($0) }\n delay(2) {\n successHandler(elements: elements, hasMoreElements: true)\n }\n }\n\n override func displayNoElementIfNeeded(noElement: Bool) {\n noElementLabel.hidden = !noElement\n }\n}\n\nextension ViewController: UITableViewDataSource {\n func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n return elements.count\n }\n\n func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {\n let cell = tableView.dequeueReusableCellWithIdentifier(\"Cell\")!\n let element = getElement(String.self, at: indexPath.row)\n cell.textLabel?.text = element\n if elements.count == indexPath.row + 1 {\n loadNextPage()\n }\n return cell\n }\n}\n```",
6 "homepage": "https://github.com/WANGjieJacques/KissPaginate",
12 "WANG Jie": "jacques09125715@gmail.com"
15 "git": "https://github.com/WANGjieJacques/KissPaginate.git",
21 "source_files": "KissPaginate/Classes/**/*",
22 "pushed_with_swift_version": "3.0"