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
81
results
Andrew Fletcher
•
I'm currently working on a project that requires login, register, forget password functionality in SwiftUI. As I'm developing the code, I came across a great resource for validating an email address with Regex:
http://emailregex.com/
In the end, I leveraged the worked produced on https://stackoverflow.com/questions/25471114/how-to-validate-an-e-mail-address-in-swift
The code used:
extension String {
var isValidEmail: Bool {
let name =...
Andrew Fletcher
•
iOS localization on the fly
If you have added languages to your app......
Andrew Fletcher
•
Adding an image via RESTUI can be done in a snap... once you know how! I...
Andrew Fletcher
•
The magically descriptive error 401 Forbidden "message": "Access...
Andrew Fletcher
•
If you are like me you probably have searched for clues to and found little......
Andrew Fletcher
•
After creating a new view with a @Binding string as follows
struct EditRival: View {
@Environment(\.presentationMode) var presentationMode
@EnvironmentObject var realmPerson: RealmPersons
@Binding var uid: String
The previews struct had an error with the var previews
struct EditRival_Previews: PreviewProvider {
//... Initial code ...//
static var previews: some View {
EditRival()
.environmentObject(RealmPersons())
}The error was Cannot convert value of...
Andrew Fletcher
•
Building a contact list using SwiftUI has many challenges.
One challenge is...
Andrew Fletcher
•
What to do when you want to filter a Realm object, using NSPredicate in...
Andrew Fletcher
•
Registering a user via REST is an important process particularly when the...
Andrew Fletcher
•
I'm going to take you on a journey about adding a gradient tint to a background image. The journey will go through text modifiers with regular and semibold font weights, and font colour. Using an image from Unsplash. Adding a black tint, then transform it to a gradient using a colour array. If you get lost along the journey, the final result is available on GitHub.
Level: beginner
Previously I've looked into adding a tint overlay to a background image......
Andrew Fletcher
•
Creating a new SwiftUI project is a quick process. There are already...
Andrew Fletcher
•
How to apply a gradient tint over a background image?
Set the background...
Andrew Fletcher
•
Working on formatting the date in Xcode, and you come across the situation where...
Andrew Fletcher
•
Adding a floating decimal point for n number of places is quite easy to achieve....