Swift Integer Quick Guide

If you are new to Swift and have some experience with “C” style languages you probably have not given the Swift integer types much thought. They mostly work as you expect until one day something catches you out.

There were a number of operators such as the overflow operators &+, &- and &*, dealing with exact bit patterns and failable numeric intializers that were new to me. So here is my quick guide to Swift integers.

Read On →

Swift Hashable

I already covered making a custom Swift type Equatable and Comparable which allows us to test if an Array contains an instance of our type or to sort the array amongst other things. What if we want to store our type in a Set or Dictionary?

Read On →

Swift Equatable and Comparable

Not sure when you should make your Swift types Equatable? What about Comparable? In this post I look at two common situations where using the Swift Standard Library gets easier when you do.

Read On →

Cleaning up Core Data Fetch Requests

Core Data got a number of usability improvements in iOS 10. I have already written about NSPersistentContainer and Model Code Generation. In this post I round-up some other changes in iOS 10 and some quick tips you can use to clean up common Core Data code cluttering your view controllers.

Read On →

Easier Core Data Setup with Persistent Containers

Apple has made a number of changes in iOS 10 to ease the pain of setting up and using Core Data. In this post I look at how to use the new persistent container class to remove a lot of the boilerplate Core Data setup code. If you are still relying on the old Xcode template code for Core Data in your app delegate you should take a look at NSPersistentContainer.

Read On →
Archives Categories
No time to watch WWDC videos?

Sign up to get my iOS posts direct to your inbox and I will send you a free PDF of my iOS Size Classes Cheat Sheet.

Unsubscribe at any time.