Bump SwiftLint to 0.52.2 (#163)
A small Swift UI Package with one View to select a file.
Simple example:
@State private var fileURL: URL? ... var body: some View { ... FileSelectorView(allowedFileTypes: ["txt", "md"], url: self.$fileURL) ... }
With a label in the body:
var body: some View { ... HStack(alignment: .firstTextBaseline) { Text("Document:") FileSelectorView(allowedFileTypes: ["txt", "md"], url: self.$fileURL) } ... }
Do disable a button (for example the continue button in a form) until a file is selected:
Button("Continue") { ... } .disabled(fileURL == nil)
You can check out the complete documentation here.
The library supports the Swift Package Manger, so simply add it to the Swift Packages tab of your Xcode project.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
FileSelectorView
A small Swift UI Package with one View to select a file.
Usage
Simple example:
With a label in the body:
Do disable a button (for example the continue button in a form) until a file is selected:
You can check out the complete documentation here.
Screenshots
Include
The library supports the Swift Package Manger, so simply add it to the Swift Packages tab of your Xcode project.