Skip to content

A framework that provides a Swiftful, declaritive way to quickly make procedurally animated, dynamic, interactive, and generally stunning presentations with SwiftUI

Notifications You must be signed in to change notification settings

AdinAck/PresentationKit

Repository files navigation

PresentationKit

Create stunning presentations with the power of SwiftUI.

Demo

Installation

XCode Package Manager

Add this repo to your SwiftUI project via the package manager.

https://github.com/AdinAck/PresentationKit

Usage

MyApp.swift

import SwiftUI
import PresentationKit

@main
struct MyApp: App {
    @StateObject var model = Presentation(bgColor: .white, slides: [
        Title(),
        // put more slides here
    ])
    
    var body: some Scene {
        WindowGroup {
            PresentationView()
                .environmentObject(model)
        }
        .commands {
            CommandMenu("Control") {
                Text("Current frame: \(Int(model.keyframe))")
                
                Button("Next Keyframe") {
                    model.nextKeyframe()
                }
                .keyboardShortcut("N")
                
                Button("Previous Keyframe") {
                    model.prevKeyFrame()
                }
                .keyboardShortcut("B")
            }
        }
    }
}

Examples

Refer to this example project to see PresentationKit in action.

About

A framework that provides a Swiftful, declaritive way to quickly make procedurally animated, dynamic, interactive, and generally stunning presentations with SwiftUI

Topics

Resources

Stars

Watchers

Forks

Languages