I have a SwiftUI app that I want to maintain iOS 13 support for, but on iOS 14 I want to use the new LazyVStack and LazyHStack. I was thinking typealias would b
I have a bullet point and some long, multiline text. I want the bullet point to be aligned with the center of the first line of text. Obviously, If the string i
In a SwiftUI 2 navigation bar I have a list with multiple sections. All sections have a header, however I want the top section to never be closed and the elemen
In a SwiftUI Apple Watch app, we need some text aligned in a vertical scroll view such that: if the content is small, it should be placed at the bottom of the s
Im trying to create a card that slides when it is tapped on and then goes back to original position without tapping again the .onEnded() function of tap gesture
I'm trying to execute some code I'd have previously put in my app delegate, such as saving my managed object context when entering the background. I put the ca
I have a ZStack that I set the color to black and then add a VideoPlayer. When I rotate the device there are still flashes of white around the player. I have pl
I would like to have a button to open a new window and load a view (for the app's Preferences) in SwiftUI for MacOS but am unsure of the correct way to do it. I
I have a view in which I display a list of my messages. Whenever a new message is added I want to scroll to the bottom. I am trying to add an onChange event to
Code for Toggle in SwiftUI is this: Toggle(isOn: $vibrateOnRing) { Text("Vibrate on Ring") } This will produce a toggle button with text label looking like
Why does Color.yellow appear brown on my iPhone X but yellow in my simulator? It's not a display problem, as this iPhone X screenshot of a test app shows: As y
I am trying to drop annotations/pins wherever a user touches a certain location on the map. Whenever a user drops more 2 or more pins, it creates a polyline tha
I have got a SwiftUI modal view which I am calling from main UIKit view. I want to add a dismiss button to my modal view. As I can tell, there is no @State vari
Hello SwiftUI community, I'm trying to do something that's probably easy to do but I'm stuck on it since hours. In a list, I'd like to have items composed of:
How do I respond to focus events on tvOS in SwiftUI? I have the following SwiftUI view: struct MyView: View { var body: some View { VStack {
I have an array of identifiable Training elements. Each Training element only has two properties, name and isRequired. What is the most straight-forward (Swif
I've recently come across the need to write a Mock of a Class, as it causes the SwiftUI preview from working. Unfortunately, I get the error: Property type 'T'
I need to generate a dynamic list of buttons in an ActionSheet. Say I have an array of options ["Option1", "Option2"], how can I achieve this? .actionSheet(isP
I have a view in SwiftUI that shows a WKWebView which is passed to the main ContentView using the UIViewControllerRepresentable class, implemented following the
I am using the TapGesture in SwiftUI for MacOS. TapGesture is only recognized on TouchInsideOut event, when releasing the press again. I want to call an action