I am building a chat app in SwiftUI. To show messages in a chat, I need a reversed list (the one that shows most recent entries at the bottom and auto-scrolls t
With UIKit, I could customize the background color of a popover using UIPopoverPresentationController's backgroundColor. This would change the color including
How can I convert this code to SwiftUI. It's a snow effect. I used CAEmitterLayer but I don't know how to use it in SwfitUI. There is no addSublayer in SwiftUI.
I want to delete an element from an array that I am displaying as a list using a ForEach, but I also need to send a HTTP request to a REST API and I need to put
I am very new to SwiftUI, and have actually been getting the hang of arranging my views using the Z, V and HStacks. But the lack of a centre anchor is proving d
I'm trying to create rounded edges in one of my views using overlay. .background(Color.gray.opacity(0.2)) .overlay( RoundedRectangle(cornerRadius: 10)
I'm developing an app for iPad with SwiftUI. I want to present a page sheet but with a smaller size. I'm using but I can't change the width of the page sheet.
I have a simple view which contains a group of Buttons which allow drag feature depends on condition. How can i disable .onDrag based on the condition? The .dis
I'm struggling to find a way in SwiftUI to get the x,y coordinates of the origin of a TextField (or any view). I can certainly provide a position or offset to m
QLPreviewController navigation bar missing when I presented in sheet. It looks like this : How can I show up top navigation bar or navigationItem? QuickLook
I searched stackoverflow, but unfortunately didn't find a solution to this particular case. I try to display following scenario: a container view a Text that
I have the following code that displays a popover when a button is tapped: struct ContentView: View { @State private var show = false var body: some
How is it possible to set a @State var inside a geometryReader? This is my code: @State var isTest:Int = 0 var body: some View { VStack{ ForEach(se
I have a three column layout macOS application with the first being the sidebar. I have a button that toggles that enabling the user to hide the sidebar. On Xco
Basic approach I am currently tring to clean up my Core Data/SwiftUI code, and part of that is moving code out of my Views and into my ViewModels. Since it seem
I tried to disable animation in UITests with the following code: let app = XCUIApplication() app.launchEnvironment = ["DISABLE_ANIMATIONS": "1"] I also tried
I passed the environmentObject appSettings into my view successfully. I can use it to modify my font and the picker in my View. But if I try to access an envir
I placed 3d object to ARViewController after 3 seconds of placing object, then I want to rotate object by 90 degrees: arView.scene.addAnchor(anchorEntity) Disp
When I develop the feature that allows users drag ScrollView to dismiss keyboard in SwiftUI, I find that if you drag ScrollView as the keyboard is dismissing, t
I have ModelEntity in SwiftUI and it moves. But the problem is: when adding generateCollisionShape method, it doesn't move anymore. I want a collision effect as