大佬教程收集整理的这篇文章主要介绍了ios – 顶行在reloadData()上从UITableView消失,直到向上/向下滚动,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
详细截图链接:https://www.dropbox.com/sh/nfxcgw2ple8g4mt/AAAOTswWDEN-s2-dAbJ1bHu7a?dl=0
class FirstViewController: UIViewController,UITableViewDatasource,UITableViewDelegate{ override func viewDidLoad() { super.viewDidLoad()[1] // self.client = xxxxxxxxxxxx; // // fetching from server logic query // // query.readWithCompletion({ (result,error) -> Void in if (error == nil) { self.activityInDicatorView.hidden = true // loading inDicator self.allResults = result.items println( self.allResults!.count ) self.tableView.hidden = false self.tableView.reloadData() } else{ println(error.localizedDescription) // error } }) } func tableView(tableView: UITableView,numberOfRowsInSection section: int) -> Int { if (allResults != nil) { return self.allResults.count } else { return 0 } } func tableView(tableView: UITableView,heightForRowATindexPath indexPath: NSIndexPath) -> CGFloat { return 200 } func tableView(tableView: UITableView,cellForRowATindexPath indexPath: NSIndexPath) -> UITableViewCell { var cell: CellClass = self.tableView.dequeueReusableCellWithIdentifier("item") as! CellClass return cell //typo }
以上是大佬教程为你收集整理的ios – 顶行在reloadData()上从UITableView消失,直到向上/向下滚动全部内容,希望文章能够帮你解决ios – 顶行在reloadData()上从UITableView消失,直到向上/向下滚动所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。