Creating Enums with Custom Raw Type in Swift
Find out in this post how to create enums with raw values of custom types in Swift, and go through a demonstration of all you need to know.
Tutorials, examples, practical guides, and more about the Swift language.
Find out in this post how to create enums with raw values of custom types in Swift, and go through a demonstration of all you need to know.
Learn how to create a custom formatter in Swift in order to validate and format displayed and user input values conveniently.
Find out in this post what the Defer statement is in Swift and how to use it in order to perform clean up actions in code blocks effectively.
Learn about variadic parameters and how to implement functions that contain them and accept an arbitrary number of values.
Overloading functions in Swift is a common technique, and this post shows how to apply it and gain flexibility and convenience.
Explore and understand what stored and computed properties are in Swift, and how to gain better programming habits for better code.
Read about escaping closures in Swift and how to avoid memory related problems in a post that explains everything in simple words.
Learn how to provide default values in Swift dictionaries, and how to get back actual values instead of nil even when keys do not exist.
Read about the failable initializer in Swift, and how to use it in custom types in order to return nil if proper initialization fails.
This post showcases four handy higher order functions in Swift necessary in everyday programming that all devs should be constantly using.