You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
726 B
36 lines
726 B
//
|
|
// ContentView.swift
|
|
// JustOneThing
|
|
//
|
|
// Created by Alan Francis on 02/06/2023.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
var body: some View {
|
|
#if os(iOS) // iOS can add and remove
|
|
ListOfThingsView()
|
|
#else // macOS and tvOS and watchOS (and visionOS) just show a readonly list
|
|
SimpleListOfThingsView()
|
|
#endif
|
|
}
|
|
}
|
|
|
|
struct ContentView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
ContentView()
|
|
}
|
|
}
|
|
|
|
#if os(iOS)
|
|
extension UIDevice {
|
|
static var isIPad: Bool {
|
|
UIDevice.current.userInterfaceIdiom == .pad
|
|
}
|
|
|
|
static var isIPhone: Bool {
|
|
UIDevice.current.userInterfaceIdiom == .phone
|
|
}
|
|
}
|
|
#endif
|
|
|