Swift 5.7: Shorthand for optional unwrapping
iOS Software Engineer (Swift, SwiftUI) with +4 years of experience working with international teams and clients, Published +10 apps, seeking to build world-class apps
Swift 5.7 comes with a new feature that saves our time
To unwrap an optional value we used to do
if let username = username {
print(usernname)
}
After Swift 5.7 new shorthand, we can easily do
if let username {
print(usernname)
}
Without repeating the variable name again
Start using the new shorthand and save your time!
