I was trying to use the SwiftUI @Environment property wrapper, but I can't manage to make it work as I expected. Please, help me understanding what I'm doing wr
I'm building a simple app that adds a hat on top of the user's face. I've seen examples of 2 different approaches: Adding the object as a scene to Experience.rc
I have a UISearchBar in a view which I am presenting using: view.addSubview(searchView) searchView.mySearchBar.becomeFirstResponder() This works fine in most c
I have a simple Picker in SegmentedStyle with two images inside: @State var selectedIndex = 0 @State var segmentOptions = [ Image.carFill, Image.walkin
I'm trying to add a mask to two shapes such that the second shape masks out the first shape. If I do something like Circle().mask(Circle().offset(…)), th
I have a view with a search bar at the top and a SwiftUI List below. I need to detect when the List is scrolled so I can dismiss the search ba
I've created a button to play audio (streaming from a link) with AVPlayer in Swift. How to stop the audio automatically when the audio time is finished? Here is
I am currently building a page to add player information to a local database. I have a collection of TextFields for each input which is linked to elements in a
I just learned Swift and developed an iOS project. But the button title doesn't change when I click it. How can I change the title? Simulator: iPhone 11 iOS14.4
I'm looking to create an EnvironmentObject that can be accessed by the View Model (not just the view). The Environment object tracks the application session da
I have an app that needs to have a "choose file" function and I used a button hooked up to a function using NSOpenPanel to do that. But after I tried to add a d
I'm not sure if this is an antipattern in this brave new SwiftUI world we live in, but essentially I have an @EnvironmentObject with some basic user information
I have a ChildView with a variable: @Binding var itemName: String In this ChildView I have few buttons that change value of the variable: Button(action: {
I have developed my watch app for my iOS App. The problem is that I need to use WCSession logic in order to send data from iOS to the AppWatch and vice versa. I
Xcode gives the error: Function opaque return type was inferred as 'Button', which defines the opaque type in terms of itself on the line below: @State var sh
I am new to SwiftUI (iOS development). I would like to mimic the iOS Photos APP browsing behavior with SwiftUI. More specifically, I want to display a photo in
I want to change the current week title to two letters, eg: sun to su, mon to mo, in FSCalendar.
I am trying to add a dependency on a local swift package in my Xcode project. (I don't want to add a dependency using a file url file://me/dev/app/package as th
We were able to have custom raycasting using bitmasks: let hitTest = sceneView.hitTest(location, options: [categoryBitMask: bitmask]) But hitTest is deprecated
As administrator I want to create another users from the iOS app. In my system I would like users to be created via my admin panel. I have switched public permi