I'm having troubles figuring out the proper solution to centre an Image inside a VStack with an alignment of .leading. I've attempted and got these results but
PREVIOUS Q: swiftui, animation applied to parent effect child animation Now the TextView has its own state. RectangleView with TextView slide into screen in 3 s
In this app, there is a main screen (WorkoutScreen) that displays the contents of a list one at a time as it iterates through the list (current workout in a lis
Let’s say I have a model class Ball, that conforms to the ObservableObject protocol, and I define an optional instance of it (var ball: Ball?). Is there a
I am using a TextField to let the user add a price for something. To prevent the user adding other values as a number, I change the keyboard type to .decimalPad
I'm trying to implement the logic of programmatic view pop in SwiftUI I set a tag on the items and create a corresponding variable for the selected item, but wh
The app I am working on is based around a TabBar, and when I am on a tab I want to be able to click the tabItem again to reset the view, similar to how Twitter
I want to have blur effect as background for my View, as we know, we can blur the view and what is inside, but I do't want blur content of view but I want blur
I am doing an object detection and used UIViewControllerRepresentable to add my view controller. The thing is that I can't pass data from my ViewController to m
I try to create a Document Picker for my iOS app. Here is my code (I wrapped the UIDocumentPickerViewController in my SwiftUI View, with UIViewControllerReprese
I want my @StateObject to be deinitialized as soon as possible after I navigate back, but it seems that the object is held in memory. "Deint ViewModel" is not b
Is there a way to create a modifier to update a @State private var in the view being modified? I have a custom view that returns either a Text with a "dynamic"
When I embed a List grouped into Sections into a NavigationView the section headers become collapsible. I'd like to keep them non-collapsible, just like when th
I have an image grid. Each image on tap should push a view on the NavigationView with the image details. The navigation link works as intended, but when I press
Consider the following example with a list and a button wrapped in a HStack that opens up a sheet: struct ContentView: View { @State var text: String = ""
This is driving me nuts. There seems to be new behaviour for handling background images in iOS14. Desired effect is: a fixed background image that fills the scr
In an app I'm developing (SwiftUI for iOS13 and above), I have imported a custom font, and I load the font using the following method": func getDigitalXFontOfS
I have a generated, oversized chart, which I put into a ScrollView so that the user can scroll to the right and see all values. I would like to indicate to the
I wish I could do such a thing as seen in the image. I'm trying to use this piece of code but I'm not quite understanding how to fix it. I wish I could use it
I have a generated, oversized chart, which I put into a ScrollView so that the user can scroll to the right and see all values. I would like to indicate to the