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 445 to 456 of 716 posts
Earlier this week, I showed you how easy it is to work with bitmasks using Swift and the Swift standard library. In today's episode, I show you how to create a custom control that uses the Schedule structure we created earlier. This is what the result will look like when we are finished.
in Swift
A surprising number of developers struggle with bitmasks and bitwise operations. If you've had problems working with bitmasks, then I have good news for you. Swift's standard library makes this easy. In this episode, I walk you through an example I worked on last week for an application I'm working on.
in Swift
At first glance, the collection types defined by the Swift standard library look similar to the ones you find in other programming languages. But if you dig a little deeper, you start to see the differences.
in Swift
In the previous tutorial, we discussed Core Data in the light of concurrency. I hope that lesson has taught you that Core Data and concurrency can go hand in hand. As long as you remember the basic rules we discussed, you should be fine.
in Core Data
Up to now, we've used a single managed object context, which we created in the CoreDataManager class. This works fine, but there will be times when one managed object context won't suffice.
in Core Data
The NSFetchedResultsController class is pretty nice, but you probably aren't convinced yet by what you learned in the previous tutorial. In this tutorial, we explore the NSFetchedResultsControllerDelegate protocol. This protocol enables us to respond to changes in the managed object context the fetched results controller monitors. Let me show you what that means and how it works.
in Core Data
The NSFetchedResultsController class isn't an essential component of a Core Data application, but it makes working with collections of managed objects much easier. This tutorial introduces you to the, almost magical, NSFetchedResultsController class.
in Core Data
Up until now, we've used NSManagedObject instances to represent and interact with records stored in the persistent store. This works fine, but the syntax is verbose, we lose autocompletion, and type safety is also an issue.
in Core Data
An application that grows and gains features also gains new requirements. The data model, for example, grows and changes. Core Data handles changes pretty well as long as you play by the rules of the framework.
in Core Data
The final piece of the CRUD puzzle covers deleting records from a persistent store. I can assure you that deleting records is no rocket science. We also take a closer look at the NSFetchRequest class. In the previous tutorial, we used this class to fetch the records of an entity. But NSFetchRequest has a lot more to offer.
in Core Data
In the previous tutorial, we created a list record and pushed it to the persistent store by saving its managed object context. The persistent store coordinator handled the nitty-gritty details of inserting the list record into the persistent store. This tutorial focuses on reading and updating records.
in Core Data
In this tutorial, we take a look at the NSManagedObject class, a key class of the Core Data framework. You learn how to create a managed object, what classes are involved, and how a managed object is saved to a persistent store.
in Core Data