项目介绍:
swift写的tableViewcell的加载动画 ,动画实现的主要代码如下:
[Objective-C] 查看源文件 复制代码
override func viewWillAppear(animated: Bool) { self.tableView.reloadData() let cells = self.tableView.visibleCells for cell in cells { cell.transform = CGAffineTransformMakeTranslation(0, self.view.frame.size.height) } for (index, cell) in cells.enumerate() { UIView.animateWithDuration(1, delay: 0.05 * Double(index), options: .CurveLinear, animations: { () -> Void in cell.transform = CGAffineTransformMakeTranslation(0, 0) }, completion: { (finished) -> Void in }) } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. }
cellAnimation.zip
(389.72 KB, 下载次数: 40, 售价: 10 金钱)
2016-7-15 16:32 上传
点击文件名下载附件
cell加载动画