Skip to content

SNQ-2001/ScreenTimeout

Repository files navigation

ScreenTimeout

demo.mp4

Installation

ScreenTimeout can be installed with the Swift Package Manager:

https://github.com/SNQ-2001/ScreenTimeout

You can also clone the repository and build the library locally.

Usage

import SwiftUI
import ScreenTimeout

struct ContentView: View {
    @State var states: ScreenStates = .active
    var body: some View {
        VStack {
            Text(states == .active ? "User is active" : "User is inactive")
        }
        .onTimeout(seconds: 5) { status in
            self.states = status
        }
    }
}

License

ScreenTimeout is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages