SwiftUI has two different forms of text fields, one is SecureField which hides input and TextField which doesn't hide input. Instead of creating two separate vi
In a SwiftUI app on MacOS I want to allow a users to select a file from the MacOS filesystem. I try to use AppKits NSOpenPanel . I tried like this, but I'm not
I'm trying to move away from having a TextField in the toolbar by using the new .searchable. But there seems to be a problem I can't solve. When you type the te
In my App struct, I have a small function that checks to see if the user has opened the app before. If not, it shows an onboarding view with a few questions. Ri
I came across a weird Issue in SwiftUI. I created a simple View that only holds a Button and a TabView that uses the PageViewStyle. It seems that the TabView do
At this answer the solution work for Scene plus swiftUI. However using @main like: @main struct MyApp: App { @StateObject private var model = MyModel()
I have a 250Gb M1 Mac Mini and it is starting to run out of disk space recently, it seems like the UI Previews is the main culprit which takes roughly 165GB spa
I have two apis Login DataShow when i login server gives me token which remains valid for only 6 hours and i am saving it in userdefaults, so that user will not
I am trying to overlap two circles in SwiftUI and have a margin between them. I am presently using this method: ZStack { Circle() .frame(width: 60,
How can you add a view modifier to a view when it's only available on iOS 14 but your app is available for iOS 13? For an example, textCase(_). Section headers
The goal is to get a UILabel integrated via UIViewRepresentable to size the same way Text does - use the available width and wrap to multiple lines to fit all t
I have a card view. Which sizes I give myself. I know that is wrong. I want to do it resizable and divided by percent like blue = 70% & red = 30% or somethi
How to change just one toggle in a list without subviews? I know how to make it work if I extract Subview from everything inside ForEach, but how to do it on on
Is there a way in SwiftUI to union two shapes so that they cast a unified shadow. I have tried various combinations and modifiers but don't seem to be able to a
Is there a standard way to bind, say, a TextField to an associated value of an enum? So, given this: enum Choice { case one(String) case two(String) } C
Combining Navigation Bar, TabView and searchable causes the NavigationBar and Search InputField to stay stationary when scrolling up on the second selected tab.
In my SwiftUI App, i used a WKWebView to update some html tags from native side, using SwiftUI TextFields and a TextEditor. To get the communication working, i
Hey does someone know how can I create rectangle progress bar in swiftUI? Something like this? https://i.stack.imgur.com/CMwB3.gif I have tried this: struct
Using Swift 5.2 I would like to create a function to dynamically change the Shape I have a view like import SwiftUI struct CardView: View { let suit : S
Scenario: RootScreen presents DateScreen modally though .sheet DateScreen has a DatePicker with CompactDatePickerStyle() and a button to dismiss the modal User