Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenanatmaca/ktransition
iOS Custom Transition Library
https://github.com/kenanatmaca/ktransition
animation custom-transitions ios ios-transition swift swift-library transition-animation ui ux
Last synced: 2 months ago
JSON representation
iOS Custom Transition Library
- Host: GitHub
- URL: https://github.com/kenanatmaca/ktransition
- Owner: KenanAtmaca
- License: mit
- Created: 2019-08-31T14:41:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-02T10:31:12.000Z (over 5 years ago)
- Last Synced: 2024-11-18T04:22:05.324Z (3 months ago)
- Topics: animation, custom-transitions, ios, ios-transition, swift, swift-library, transition-animation, ui, ux
- Language: Swift
- Homepage:
- Size: 17.6 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Requirements
- Xcode 9.0 +
- iOS 11.0 or greater## Installation
### CocoaPods
1. Install [CocoaPods](http://cocoapods.org)
2. Add this repo to your `Podfile````ruby
platform :ios, '11.0'target 'ProjectName' do
use_frameworks!
pod 'KTransition'
end
```3. Run `pod install`
4. Open up the new `.xcworkspace` that CocoaPods generated
5. 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
```Swift
self.navigationController?.customPushTransition = KTransition.push(style: .top, duration: 0.5)
```- ViewController Present & Dismiss
```Swift
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
```Swift
override func touchesBegan(_ touches: Set, 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
- [X] Alpha
- [X] Scale
- [X] Top
- [X] Left
- [X] Bounds## License
Usage is provided under the [MIT License](http://http//opensource.org/licenses/mit-license.php). See LICENSE for the full details.