Learn Swift and iOS Development
Master iOS development through in-depth tutorials and comprehensive courses on Swift, SwiftUI, UIKit, Core Data, and more.
Master iOS development through in-depth tutorials and comprehensive courses on Swift, SwiftUI, UIKit, Core Data, and more.
Discover the newest tutorials on Swift and iOS development
Discover the newest tutorials on Swift and iOS development
Showing 709 to 716 of 716 posts
Storing data in the defaults database is simple thanks to the easy-to-use API of the UserDefaults class. You can take advantage of the API on iOS, tvOS, macOS, iPadOS, and watchOS. In this post, I show you how to store a dictionary in the defaults database. I promise you that it isn't rocket science.
in Fundamentals
Storing data in the defaults database is simple thanks to the easy-to-use API of the UserDefaults class. You can take advantage of the API on iOS, tvOS, macOS, iPadOS, and watchOS. In this post, I show you how to store an array in the defaults database. I promise you that it isn't rocket science.
in Fundamentals
The UserDefaults class allows developers to interact with the defaults system, a simple key-value store. The defaults system is available on iOS, tvOS, macOS, iPadOS, and watchOS. The defaults database can only be used to store a predefined set of data types, strings, numbers, Date objects, and Data objects. It is also possible to store arrays or dictionaries of these types.
in Fundamentals
The defaults system is the easiest persistence solution on iOS, tvOS, macOS, iPadOS, and watchOS. A defaults database is nothing more than a key-value store. You interact with the defaults system through the UserDefaults class. Let's take a look at the API of the UserDefaults class.
in Fundamentals
The most common goal of students of my mentorship program is to release the app they have been working on for weeks, months, or even years. Is that you?
When I started developing apps for Apple's platforms more than fifteen years ago, I had to figure out a lot by myself. The SDK for the iPhone wasn't available at that time and there were very few books about Apple development. Those days were exciting but also frustrating at times.
It is important that you structure the code you write as best as you can. This may feel tedious at first because you don't exactly know what goes where. Over time you develop a structure that fits and you don't even think about it. It becomes second nature. By adding structure, it is much easier to navigate a project and stay on top of the code you write.
In this quick tip, I show you how to calculate the distance between two locations using the Core Location framework. Let's say you have two sets of coordinates and you want to calculate the distance between them. In this example, we use a tuple to store the latitude and the longitude of a set of coordinates.