In Swift you can define default values on a struct that can be overwritten on initialization: struct myStruct { var a: Int = 1 } var instance1 = myStruct()
I am trying to add a "Drag and Drop" gesture / function to my SwiftUI Mac application. I want to drop files from my System/ Desktop into my Application. It is
I recently saw that Swift had introduced concurrency support with the Actor model in Swift 5.5. This model enables safe concurrent code to avoid data races when
I am adding a translate text feature to my app. I have the text and run the initial setup, but this error keeps coming up. error: Error Domain=com.firebase.ml
I want to make my List inside a ScrollView so that I can scroll List rows and headers together. But I found that List inside ScrollView isn't working. It shows
I am trying to make the map in my app update its style URL based on the device being in dark-mode or light-mode. However I am getting the error below where I de
I am doing some iPhone automation and want to observe call states of ongoing calls. I implemented a listener to read the idevicesyslog and fetch log output of c
Using the PHPickerViewController, the result of the selected image will be displayed as a result. Can I set the order of the images? private func makePickerView
I have created a custom layout based on UICollectionViewCompositionalLayout that presents each section's items in a panel or card... ...here the blue area is
The goal is to have easy access to hosting window at any level of SwiftUI view hierarchy. The purpose might be different - close the window, resign first respon
I have an app that works well synchronizing the local core data records with a private database. I would like to make the CloudKit database a shared database an
I want to achieve the function. Like, "Look up" view that is from Apple. My aim is when the sheet view push another view by navigation, the user can tap the na
I've got a text field delegate setup which disables/enables the done button on keyboard when certain conditions are met (between 5 and 15 characters, not just w
It's very easy to prevent movement of a node in one axis (X, Y, or Z) being moved by other forces with an SCNTransformConstraint.positionConstraint in world spa
I have noticed that SwiftUI completely refresh view when adding sheetmodifier. Let's say I have View that displays random number. I expect that this value wou
I'm trying to make a video player like youtube, with double-tap the screen to fast forward 5 seconds. But I'm having trouble implementing that. I tried using co
In Xcode 10 unselectedItemTintColor property working properly but after Xcode 11 with ios 13 UITabbar unselectedItemTintColor property not working. override f
I'm new to Swift UI and MongoDB Realms. I'm trying to display a user's email (from their respective custom user data) in a text box but I'm getting a weird resu
Recently I updated my Xcode to 11.3.1. But while working with SceneKit, I found that I can't create a particle system file. Before After How can I create a
Hi everyone I'm trying to hide my statusBar in a View Controller but it doesn't seem to work .. I used the function: override var prefersStatusBarHidden: Bool