developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
36
results
Andrew Fletcher
•
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.
var body: some View {
GeometryReader { geometry in
Form {
// layout elements
NameLayout()
FinalPhoto()
RawPhoto()
ApertureLayout()
SubmitButton()
}
}
}
What was...
Andrew Fletcher
•
Core Data - customising our data model
When you are using Core Data, and let's...
Andrew Fletcher
•
In SwiftUI, has made creating a list of item very easy. If...
Andrew Fletcher
•
I attempted the run command and the response I had was succeeded, but then...
Andrew Fletcher
•
Working with buttons
To begin, what is a button in SwiftUI?
struct MainView:...
Andrew Fletcher
•
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.
Historically I have found Core Data annoying to work with... so for a while now I have been managing the database using Realm. However, with Realm now significantly bloating (553MB) and the Realm Browser app on OSX no longer usable, it was time to visit my old friend. With open arms it tripped me up straight...
Andrew Fletcher
•
The purple warning notification of annoyance recently came my way! I...
Andrew Fletcher
•
I'm currently working on a project that requires login, register, forget...
Andrew Fletcher
•
iOS localization on the fly
If you have added languages to your app......
Andrew Fletcher
•
After creating a new view with a @Binding string as follows
struct EditRival:...
Andrew Fletcher
•
Building a contact list using SwiftUI has many challenges.
One challenge is having multiple lists displayed on the one screen. For example, known contacts using your app against contacts on the phone. Initially, I tried the following code
SearchBarView(text: $searchText, placeholder: "Type here")
List {
Section(header: ContactListHeader(listTitle: "rivals list")) {
ForEach(self.userData.rivals.filter{
self.searchText.isEmpty ? true :
$0.name.lowercased()
...
Andrew Fletcher
•
What to do when you want to filter a Realm object, using NSPredicate in...
Andrew Fletcher
•
I'm going to take you on a journey about adding a gradient tint to a...
Andrew Fletcher
•
Creating a new SwiftUI project is a quick process. There are already...