swiftui-map-item-picker

2.0.0

lorenzofiamingo/swiftui-map-item-picker

What's New

SwiftUI MapItemPicker 2.0.0

2022-02-25T20:23:31Z

SwiftUI MapItemPicker πŸ—ΊοΈ

MapItemPicker is a location picker sheet. Currently supports only iOS and Mac Catalyst.

Usage

MapItemPicker has similar same API and behavior as other Presentation Modifiers.

import SwiftUI
import MapItemPicker

struct ContentView: View {
    
    @State private var showingPicker = false
    
    var body: some View {
        Button("Choose location") {
            showingPicker = true
        }
        .mapItemPicker(isPresented: $showingPicker) { item in
            if let name = item?.name {
                print("Selected \(name)")
            }
        }
    }
}

Installation

  1. In Xcode, open your project and navigate to File β†’ Swift Packages β†’ Add Package Dependency...
  2. Paste the repository URL (https://github.com/lorenzofiamingo/SwiftUI-MapItemPicker) and click Next.
  3. Click Finish.

Other projects

SwiftUI PhotosPicker πŸŒ‡

SwiftUI CachedAsyncImage πŸ—ƒοΈ

SwiftUI VerticalTabView πŸ”

SwiftUI SharedObject 🍱

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Oct 30 2024 00:18:37 GMT-0900 (Hawaii-Aleutian Daylight Time)