Skip to content
iOS Custom Transition Library
Swift Ruby Objective-C
Branch: master
Clone or download
KenanAtmaca
KenanAtmaca Update
Latest commit a6109d3 Sep 2, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
KTransition.xcodeproj Update Sep 2, 2019
KTransition First Commit Sep 2, 2019
KTransition.podspec Update Sep 2, 2019
LICENSE Create LICENSE Sep 2, 2019
README.md Update README.md Sep 2, 2019

README.md


MIT Licance Pod Platform Tag Swift

Requirements

  • Xcode 9.0 +
  • iOS 11.0 or greater

Installation

CocoaPods

  1. Install CocoaPods
  2. Add this repo to your Podfile
platform :ios, '11.0'

target 'ProjectName' do
  use_frameworks!
  pod 'KTransition'
end
  1. Run pod install
  2. Open up the new .xcworkspace that CocoaPods generated
  3. Whenever you want to use the library: import KTransition

Manually

  1. Simply download the KTransition source files and import them into your project.

Usage

  • Navigation Push & Pop
self.navigationController?.customPushTransition = KTransition.push(style: .top, duration: 0.5)
  • ViewController Present & Dismiss
let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "OtherVC") as! OtherVC
vc.customPresentTransition = KTransition.present(style: .scale, duration: 0.5, startFrame: nil)
self.present(vc, animated: true, completion: nil)
  • Touch and start in location animate
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
   let touch = touches.first!
   let location = touch.location(in: self.view)

   let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "OtherVC") as! OtherVC
   vc.customPresentTransition = KTransition.present(style: .bounds, duration: 0.5, startFrame: location)
   self.present(vc, animated: true, completion: nil)
 }

Animate styles

  • Alpha
  • Scale
  • Top
  • Left
  • Bounds

License

Usage is provided under the MIT License. See LICENSE for the full details.

You can’t perform that action at this time.