youngjae99 / CS496_MadCamp_week4-Booklip

2020 몰입캠프 4주차 자율과제 - iOS Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CS496_MadCamp_week4

###2020 여름 몰입캠프 4주차 자율과제 : SwiftUI iOS application development

Booklip

Swift 5.1 Xcode 11 iOS 13.0 iPadOS 13.0 MacOS 10.15

Booklip is an application which provides a convenient interface of keeping your favorite verses in a book and decorate them to create a new pretty image.

How to use

Step 1

Install Booklip

Step 2

Capture your favorite book page

Step 3

Use ModalPresenter and ModalLink the same way you would use NavigationView and NavigationLink:

struct ContentView: View {
    var body: some View {
        ModalPresenter {
            ModalLink(destination: Text("Modal View")) {
                Text("Main view")
            }
        }
    }
}

Result

Presenting modal view with SwiftUI

Additional information

To add a "close" button to a modal view we can use a dismiss closure provided by the ModalLink:

struct ContentView: View {
    var body: some View {
        ModalPresenter {
            ModalLink(destination: { dismiss in
                Button(action: dismiss) {
                    Text("Dismiss")
                }
            }) {
                Text("Main view")
            }
        }
    }
}

About

2020 몰입캠프 4주차 자율과제 - iOS Swift


Languages

Language:Swift 99.3%Language:Ruby 0.7%