概要
マテリアルデザインに基づく、iOSのビューコントローラー向けトランジション。
Web・アプリ開発計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルJTMaterialTransition
An iOS transition for controllers based on material design.
Installation
With CocoaPods, add this line to your Podfile.
pod 'JTMaterialTransition', '~> 2.0'
Screenshots

Usage
Basic usage
import UIKit
import JTMaterialTransition
class ViewController: UIViewController {
weak var presentControllerButton: UIButton?
var transition: JTMaterialTransition?
override func viewDidLoad() {
super.viewDidLoad()
self.transition = JTMaterialTransition(animatedView: self.presentControllerButton)
}
func didPresentControllerButtonTouch () {
let controller = SecondViewController()
controller.modalPresentationStyle = .custom
controller.transitioningDelegate = self.transition
self.present(controller, animated: true, completion: nil)
}
}
Notes
The animatedView is not directly used, a new view is created based on the frame, backgroundColor properties for the animation.
If you don't want to provide a view, you have to set startFrame and startBackgroundColor properties and call init instead of initWithAnimatedView:.
startFrame must be the coordinates relative to the window:
var startFrame = animatedView.superview?.convert(animatedView.frame, to: nil)
Warning
The controller presented must have a backgroundColor else the effect can be a little strange. If you use a UINavigationController or another container don't forget to set the backgroundColor with controllerPresented.view.backgroundColor = UIColor.yourColor.
Requirements
- iOS 8.0 or higher
- Swift 4.2
Author
License
JTMaterialTransition is released under the MIT license. See the LICENSE file for more info.
関連プロジェクトを探す
読み込み中…