Help you pop up custom views easily. and support pop-up animation, layout position, mask effect and gesture interaction etc.
DawnTransition is a lightweight iOS transition framework for smooth, customizable animations and native-like interactive swipe-back gestures. It solves common gesture conflicts in custom transitions and is proven in real projects.
DawnTransition is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'DawnTransition'
Run pod install to integrate it into your project.
DawnTransition also supports Swift Package Manager:
https://github.com/snail-z/DawnTransition.git
// swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
dependencies: [
.package(url: "https://github.com/snail-z/DawnTransition.git", from: "1.1.0")
],
targets: [
.target(
name: "YOUR_TARGET_NAME",
dependencies: ["DawnTransition"]
)
]
)
Then run swift build to fetch and integrate the package.
let pan = DawnPanGestureRecognizer(driver: self, type: .dismiss) { [weak self] in
guard let `self` = self else { return }
self.dismiss(animated: true)
}
pan.isRecognizeWhenEdges = false
pan.recognizeDirection = .leftToRight
view.dawn.addPanGestureRecognizer(pan)
haoz, [email protected]
DawnTransition is available under the MIT license. See the LICENSE file for more info.