Let’s be honest. Swift and Apple’s frameworks don’t have all the functionality we need to build the best software for Apple devices. Fortunately, Swift supports extensions so we can add the missing pieces we need to make our lives easier.
If you’re new to Swift, please refer to the documentation to learn more about Extensions before continuing.
In this article, I will focus on extensions that add additional functionality to existing types. Extensions can also add default implementation for Protocols, add constraints to protocol types, and more.
When creating your own extensions, I would recommended creating a handful of unit…
JSON is one of the most common data formats for transferring data between servers and devices.
This will be a two part series. The first part will cover what JSON is and the basic handling in Swift while the second part will be focused on retrieving JSON from the web via
URLSession and Alamofire.
If you would like to follow along, please download the sample project from my GitHub.
Creating a UITextField to handle currency input might seem easy enough until you actually start writing the code. The first issue you will probably come across is how are you going to restrict the user from entering anything other than numbers. Then you might realize that forcing users to enter periods and commas isn’t the best user experience. Here are some additional issues you will run into:
At the time of writing this article, you can use the Swift Package Manager (SPM), CocoaPods, or Carthage to add Realm to your project. I’ll be using SPM in this guide, as it’s the quickest and easiest way to get started…
Software Developer at Livefront. Founder of the iOS app seventytwo. I build cool software for Apple devices.