I'm using a NavigationView to create a sidebar on macOS. I can toggle the sidebar using this code: Button { NSApp.keyWindow?.firstResponder?.tryToPerform(
I'm trying to achieve the behavior that's also seen in in the iOS Settings App or for instance the Roborock App (see screenshots below). I'd like to go for an I
I'm trying to create a custom List cell in SwiftUI, where the drag-icon in Edit Mode stays inside the cell. By default, the cell gets horizontally shrinked do m
I have two screens in a SwiftUI app. Screen A is displayed after the app launch and contains a button which will update the value for currentWorkoutID on the us
I reduced to very simple code. If the struct has a Int is working, if there is an UUID the preview is crashing (it's working if I run on the simulator or real
I have the following: I'm using a native TabView. I can change the background but I haven't been able to add a little shadow to the top of the UITabBar, I've t
I am trying to use a ForEach loop to dynamically add textfields inside a form section with a button. Form { ForEach(0..<numberOfItems, id: \.
I have an ObservableObject class and a SwiftUI view. When a button is tapped, I create a Task and call populate (an async function) from within it. I thought th
Why when opening and closing the viewModel (color.green) , the circle tremble and vibrate and the model becomes above the circle when moving when i change the v
Why when opening and closing the viewModel (color.green) , the circle tremble and vibrate and the model becomes above the circle when moving when i change the v
in my project i'm drawing a box over a an image using a custom drawing gesture. Image(uiImage: image!) .resizable() .sca
I want to specify a Link in my SwiftUI view, but I also want to register when/if that Link was actually tapped or not. What's the best way to do this? I tried a
I am creating an object recognition app that takes frames from the camera and outputs a description of the image into a text view on the screen. I can print the
I started to develop an application using iOS15 and the new .searchable modifier. I have a simple layout with some placeholder results on the main page and a se
I want to achieve such a control like this (https://github.com/Yalantis/Segmentio) in SwiftUI (but without image): What would be the best approach? Should I us
I'm trying to create a SwiftUI Scrollview that drags its container like this: https://drive.google.com/file/d/1O92DgsVI1OjM1HEUXUwVywB8gcdShOP-/view?usp=sharing
I'm donig a list numbers but i want to show only the result of my searchable not the whole list, how can i hide the list? I was trying to change the state of a
I currently have a simple SwiftUI ScrollView that contains a single element. I have added the .refreshable(action: ) property to allow (pull down) refreshing of
I'm trying to add tappable segments to a Text and I have most of it but I cannot make an array of Texts with .onTapGestures. How can I add the tap gestures to
I'm looking to find the correct coordinate x,y of the 4 corners of the image display in the view. I wrote this code.. to calculate the first top left corner coo