A library that customized iOS default pageSheet style transitions and interactions.
By using UIViewControllerInteractiveTransitioning
and UIViewPropertyAnimator
, interactive transitions are implemented in a form similar to UIModalPresentationStyle
's .pageSheet
.
iOS 기본 pageSheet 스타일의 전환 및 인터렉션 만들기
Since SheetTransitionController
adopts UIViewControllerTransitioningDelegate
protocol, instantiate and assign it to transitioningDelegate
property of the view controller to be present.
let vc = ViewController()
vc.modalPresentationStyle = .custom
// `ViewController` must have a `transitionController` property.
vc.transitionController = SheetTransitionController(for: self, style: .original)
vc.transitioningDelegate = vc.transitionController
present(vc, animated: true, completion: nil)
Clone the repository and run the example project in the Example
directory.
MOSheetTransition is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MOSheetTransition'
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but MOSheetTransition does support its use on supported platforms.
Once you have your Swift package set up, adding MOSheetTransition as a dependency is as easy as adding it to the dependencies value of your Package.swift.
dependencies: [
.package(url: "https://github.com/MunokKim/MOSheetTransition.git", .upToNextMajor(from: "0.2.0"))
]
MunokKim, [email protected]
MOSheetTransition is available under the MIT license. See the LICENSE file for more info.
link |
Stars: 1 |
Last commit: 3 years ago |
Initial release
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics