项目作者: pratik-123

项目描述 :
Basic tabeview cell animation for best way to display cell
高级语言: Swift
项目地址: git://github.com/pratik-123/UITableViewCellAnimation.git
创建时间: 2018-09-24T06:07:30Z
项目社区:https://github.com/pratik-123/UITableViewCellAnimation

开源协议:

下载


UITableViewCellAnimation

UITableViewCellAnimation is collection of animation in swift4 to perform animation in uitableviewcell.

Requirements

  • Xcode 9+
  • Swift 4

How to use

Copy UITableViewCellAnimationKit.swift file in your project and use it simply with UITableViewCell to .method

OR

UITableViewCellAnimation is available through CocoaPods. To install
it, simply add the following line to your Podfile:

  1. pod 'UITableViewCellAnimation'

If you install pod then “import UITableViewCellAnimation” else simply use like below.
for more info visit UITableViewCellAnimation.

Example

  1. func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
  2. if (animationType == .bounce){
  3. cell.bouncingAnimation(forIndex: indexPath.row)
  4. }else if (animationType == .moveIn){
  5. cell.moveInAnimation(forIndex: indexPath.row)
  6. }else if (animationType == .leftIn){
  7. cell.leftInAnimation(forIndex: indexPath.row)
  8. }else if (animationType == .rightIn){
  9. cell.rightInAnimation(forIndex: indexPath.row)
  10. }else if (animationType == .side){
  11. if (indexPath.row % 2 == 0){
  12. cell.leftInAnimation(forIndex: indexPath.row)
  13. }else{
  14. cell.rightInAnimation(forIndex: indexPath.row)
  15. }
  16. }else{
  17. cell.fadeInAnimation(forIndex: indexPath.row)
  18. }
  19. }

alt tag