How to use Swift literal regex expressions in switch case pattern statements? Based on the examples from WWDC 2022 presention slides, the following i ...
How to use Swift literal regex expressions in switch case pattern statements? Based on the examples from WWDC 2022 presention slides, the following i ...
I am facing an issue when trying to initialize a view in SwiftUI. Let me explain: I have a view called ExternalView, this view has a constraint with ...
I just started programming in Swift and I am a complete beginner. I wanted to write a function or class that, by receiving the coordinates, if there i ...
I would like to read the content from one text file in swift the step I did is go to terminal and read/create a file go to Xcode, File -> add ...
I am defining a SwiftUI view with an associated ViewModel protocol type. However, I getting this error while building Type 'any MyViewModelType' canno ...
After updating to Xcode 14, iOS 16, Swift 5.7, when compiling the project I got: ...
Let's say I have a file that stores information about people, and one of the lines look like this: From left to right, it's name, age, date of birt ...
update: add same error about Hashable I have created an Identifiable compliant protocol and compliant structures. Then, when I create the list and ...
I have a compilation error when i try to return different custom views that conform to the View protocol from a method. Here is a simple example that ...
I have data contained in a variable called selectedFolderId, and the intent of this is I want to pass this data in this variable into a class whereby ...
I really like the Swift type-systems. But I cannot fathom why I cannot do this: It's clear that both views are correct conformances of the View pro ...
Before iOS 16 presenting a single screen in landscape is fine for portrait application. The working code is as below. Remark: Whole application is in ...
I have to show [0, 25, 50, 75, 100] with dollar sign in Charts using swift iOS Added in view didLoad I wanted to show 0 $25 $50 $75 $100 inste ...
I searched for the answer past days, and lot of them are very old (around swift 2 and 1.2). I wanted to get characters when unicode code is taken from ...
Swift5.7 came with primary associated type. I try with these codes, But it shows up with error: Cannot specialize protocol type 'GenericDelegate' cla ...
I'm running XCode Beta 14.0 beta 3 although i dont think that's the issue. I have an app that has custom callbacks based on an AVCaptureSession in a ...
I've been playing around with Swift and SwiftUI. I've been trying to come up with a delegate based data store for various "data entities", the intenti ...