Swiftpack.co - tyagishi/SDSPartialModalView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by tyagishi.
tyagishi/SDSPartialModalView 1.0.1
partial modal
⭐️ 0
🕓 13 weeks ago
iOS macOS
.package(url: "https://github.com/tyagishi/SDSPartialModalView.git", from: "1.0.1")

SDSPartialModalView

macOS iOS iOS macOS SPM is supported license

simple partial modal view

in 30sec

light mode

https://user-images.githubusercontent.com/6419800/159105246-424e3fa8-b6a7-46a2-9499-351e0f245eaf.mp4

dark mode

https://user-images.githubusercontent.com/6419800/159105241-3200b3ef-d6c3-4ddc-9873-15db9a288ed8.mp4

usage

need to use together with ZStack.

//
//  ContentView.swift
//
//  Created by : Tomoaki Yagishita on 2022/03/10
//  © 2022  SmallDeskSoftware
//

import SwiftUI
import SDSPartialModalView

struct ContentView: View {
    @State private var showPartial = false
    @State private var fieldValue = "Hello"

    var body: some View {
        ZStack {
            VStack {
                Button(action: {
                    withAnimation {
                        showPartial.toggle()
                    }
                }, label: {
                    Text("partial modal")
                })
            }
            PartialModalView(isPresenting: $showPartial, content: {
                VStack {
                    Text("Hello")
                    TextField("Text", text: $fieldValue)
                        .textFieldStyle(.roundedBorder)
                }
                .padding()
            })
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

GitHub

link
Stars: 0
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1.0.1
13 weeks ago

fix bug: before proceeding close process, check isPresenting

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics