MagicKit

0.0.2

An Advanced and Flexible Framework for Building Engaging Transitions.
mrcreatoor/MagicKit

What's New

Initial MagicKit Release!

2023-04-25T17:31:14Z

MagicKit

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.

MagicKit Introduction Video

SPM Compatible License: MIT

Features

  • Easy to use
  • Multiple built-in transitions to choose from
  • Fully customizable transitions
  • Lightweight and optimized for performance

Requirements

  • iOS 14+
  • Xcode 12+
  • Swift 5.7+

Installation

Swift Package Manager

You can install MagicKit using Swift Package Manager. To integrate MagicKit into your Xcode project, follow these steps:

  1. Open your project in Xcode.
  2. Click on File > Swift Packages > Add Package Dependency...
  3. Paste the following URL in the search bar: https://github.com/mrcreatoor/MagicKit
  4. Click Next and select the version you want to use.
  5. Click Finish.

Usage

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
                   }
               }
           }
       }
   }

Examples

To try out the MagicKit example:

  • Clone the repo https://github.com/mrcreatoor/MagicKit.git
  • Open Example/Example.xcodeproj in the Xcode
  • Run it!

Documentation

For 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:

  1. Double click on the MagicKit.doccarchive file to import it into Xcode.
  2. Once imported, you can access the documentation from the Help > Developer Documentation menu in Xcode.

License

MagicKit is available under the MIT license. See the LICENCE file for more information.

Credits

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.

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Apr 12 2024 02:07:48 GMT-0900 (Hawaii-Aleutian Daylight Time)