engingulek / AlertMessage

Alert message library written with SwiftUI. (My first Swift Package Manager)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AlertMessage

AlertMessage.mov

Installation

dependencies: [
    .package(url: "https://github.com/exyte/PopupView.git")
]

:branch="main"

Requirements

Only iOS 15.0+

Usage

It turns off two seconds after opening

import SwiftUI
import AlertMessage
struct ContentView: View {
    @State var showAlert : Bool = false
    var body: some View {
        VStack {
            Button("Alert Message") {
                showAlert = true
            }
        }
        .message(isPresenting: $showAlert) {
            AlertMessage(text: "Error", desc: "Lorem Ipsum is simply dummy text of the printing and typesetting ")
            //AlertMessage(text: "Error", desc: "Lorem Ipsum is simply dummy text of the printing and typesetting ",alertIcon: .multiplyCircle)
            
           // AlertMessage(text: "Error", desc: "Lorem Ipsum is simply dummy text of the printing and typesetting ",backroundColor: .red)
        }
     
    }
}

About

Alert message library written with SwiftUI. (My first Swift Package Manager)


Languages

Language:Swift 100.0%