Using SwiftUI URLComponent to change a URL's scheme
The challenge I was facing, I had written a script to scan barcodes and use Google book API to view the contents. However, a snippet of the JSON response
SwiftUI - custom navigation bar title
When managing a navigation title in Swift, you will have trodden down the path. Previously you have entered something like
.navigationTitle("Title")
If you wanted to alter the font used for the navigation area, alter the init() in the view:
How to remove row separators from a Form or List in SwiftUI?
Struggling to hide the SwiftUI separators in a List or Form?
The challenge
Creating the following form, separation lines appeared between NameLayout, FinalPhoto, RawPhoto, ApertureLayout and SubmitButton.
Core Data - customising the data model with a enum
Core Data - customising our data model
When you are using Core Data, and let's say that you have a requirement to have an attribute where the options available should be a defined list. Such as "Not Started", "Pending", "In Development" and "Completed". How do you create this as an option in Core Data?
SwiftUI: How to create and manage a List with ObservableObject
In SwiftUI, has made creating a list of item very easy. If you have an array containing the names of customers, these names can be displayed through the following code:
Xcode succeeded but nothing happens
I attempted the run command and the response I had was succeeded, but then nothing else happened!
I usually have this problem when a dependency is not updated.
The following steps usually works for me... note in bold are the Terminal commands such as (rm -rf Podfile.lock):
SwiftUI buttons - isPressed, isEnabled changing colours depending on action or state
Cannot find '' in scope
When those simple annoyances are too frustrating! Yes we have all been there and I was really hoping that Apple would have fixed what is obviously a bug.
SwiftUI - publishing changes from background threads is not allowed
The purple warning notification of annoyance recently came my way! I received the following warning:
Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates.
What was happening?
The functionality of the code uses URLSession to get a user's name via API and the display is simple piece that initially message of Hello {user}.
SwiftUI - initialiser without initialising and binding parameters errors
Whilst working through an edit person view in a SwiftUI project, I experienced the following two errors: