Category: SwiftUI

  • Fall Detection API in Swift for WatchOS

    Fall Detection API in Swift for WatchOS

    I was recently implementing the Fall Detection API in Swift/SwiftUI for watchOS, and I had a lot of trouble getting it working. The documentation was very sparse, and I ended up wasting a lot of hours trying to figure out how to use the API. I was finally able to get it working after about 95% of the way…

  • List in SwiftUI

    List in SwiftUI

    To create a list in SwiftUI, you can use the List view. Here is an example of how you could create a list of names using the List view: In this example, the List view is initialized with the names array and a closure that specifies what each item in the list should look like.…