大佬教程收集整理的这篇文章主要介绍了ios – UITableView.visibleCells没有捕获所有可见的单元格,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是因为UITableView.visibleCells最后没有返回此单元格. (它返回单元格0-12,最后一个单元格位于索引13并且清晰可见)
这是代码.有什么我可以做的,以确保所有单元格动画?
@H_696_11@override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) tableView.reloadData() let cells = tableView.visibleCells let tableHeight: CGFloat = clubsTable.bounds.size.height for i in cells { let cell: UITableViewCell = i as UITableViewCell cell.transform = CGAffineTransformMakeTranslation(0,tableHeight) } var index = 0 for a in cells { let cell: UITableViewCell = a as UITableViewCell UIView.animateWithDuration(1.5,delay: 0.05 * Double(indeX),usingSpringWithDamping: 0.8,initialSpringVeLocity: 0,options: UIViewAnimationOptions.CurveEaseIn,animations: { cell.transform = CGAffineTransformMakeTranslation(0,0); },completion: { (completE) in }) index += 1 } }
以上是大佬教程为你收集整理的ios – UITableView.visibleCells没有捕获所有可见的单元格全部内容,希望文章能够帮你解决ios – UITableView.visibleCells没有捕获所有可见的单元格所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。