CKWaveCollectionViewTransition

Cool wave like transition between two or more UICollectionView

  • 所有者: CezaryKopacz/CKWaveCollectionViewTransition
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

CKWaveCollectionViewTransition

This is a cool custom transition between two or more UICollectionViewControllers with wave-like cell animation.
Could be used in e.g. galleries.

anim.gif

Animation idea was taken from Łukasz Frankiewicz Dribble project

Installation

There are two options:

  • Via CocoaPods.
  • Manually add the files into your Xcode project. Slightly simpler, but updates are also manual.

Usage

  • In storyboard add an object in your NavigationController.

object.jpg

  • Set it's class to NavigationControllerDelegate

objectCustomClass.jpg

  • Set NavigationController delegate to this object.

navigationControllerDelegateObject.jpg

or

Implement UINavigationControllerDelegate in your ViewController:

func navigationController(navigationController: UINavigationController, animationControllerForOperation operation: UINavigationControllerOperation,
        fromViewController fromVC: UIViewController, toViewController toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
            let animator = CKWaveCollectionViewAnimator()
            if operation != UINavigationControllerOperation.Push {
                animator.reversed = true
            }

            return animator
    }
  • The last thing you have to set is selectedIndexPath property in your didSelectItemAtIndexPath method implementation.
override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
        selectedIndexPath = indexPath
}

Properties

internal let animationDuration: Double! = 1.0

Total animation duration.

internal let kCellAnimSmallDelta: Double! = 0.01
internal let kCellAnimBigDelta: Double! = 0.03

Properties you can change to adjust animation.

Requirements

  • iOS 7.0+

License

Released under the MIT license. See the LICENSE file for more info.

主要指標

概覽
名稱與所有者CezaryKopacz/CKWaveCollectionViewTransition
主編程語言Swift
編程語言Swift (語言數: 2)
平台
許可證Other
所有者活动
創建於2015-07-27 20:50:07
推送於2019-10-13 12:54:07
最后一次提交2019-10-13 14:32:02
發布數4
最新版本名稱v1.2 (發布於 2019-10-13 14:33:10)
第一版名稱1.0.0 (發布於 )
用户参与
星數1.9k
關注者數36
派生數134
提交數27
已啟用問題?
問題數9
打開的問題數1
拉請求數7
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?