MagicKit is a lightweight and easy-to-use framework for adding stunning transition effects to your SwiftUI views.
With MagicKit, you can create beautiful and dynamic user interfaces that will captivate your users and enhance their experience.
You can install MagicKit using Swift Package Manager. To integrate MagicKit into your Xcode project, follow these steps:
File
> Swift Packages
> Add Package Dependency...
https://github.com/mrcreatoor/MagicKit
Next
and select the version you want to use.Finish
.Using MagicKit is easy. Simply apply the magic modifier to your SwiftUI view and specify the transition effect, duration, and show parameter:
import MagicKit
struct ContentView: View {
@State var isShowing = false
var body: some View {
GeometryReader { proxy in
LinearGradient(gradient: Gradient(colors: [.orange, .pink]),
startPoint: .topLeading,
endPoint: .bottomTrailing)
.onTapGesture {
isShowing = true
}
.magic(transition: .pageCurl(inverted: isShowing), duration: 1, show: $isShowing) {
LinearGradient(gradient: Gradient(colors: [.purple, .blue]),
startPoint: .topLeading,
endPoint: .bottomTrailing)
.onTapGesture {
isShowing = false
}
}
}
}
}
To try out the MagicKit example:
https://github.com/mrcreatoor/MagicKit.git
Example/Example.xcodeproj
in the XcodeFor more detailed information on how to use MagicKit in your projects, check out our documentation.
You can also download the documentation to your local machine as a DocC archive by clicking on this link. Once downloaded, you can import it into Xcode.
To import the documentation into Xcode, follow these steps:
MagicKit.doccarchive
file to import it into Xcode.Help
> Developer Documentation
menu in Xcode.MagicKit is available under the MIT license. See the LICENCE file for more information.
This framework makes use of the amazing GL-Transitions library, which provides a collection of beautiful and highly customizable transitions. The library is created and maintained by contributors.
We would like to thank the GL-Transitions team for their hard work and dedication in creating such a wonderful library and making it available to the community. We highly recommend checking out the original library and showing your support by giving it a star on GitHub.
link |
Stars: 5 |
Last commit: 6 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics