Value Types in Swift

Swift has reference types and value types. Even within the value types, there are different options to use! It can be kind of confusing to know when to use which. Knowing a little bit about what types work in which situations can really help out.

Here are some of the ways I differentiate the different value types in my own head, and some rules of thumb of when I use which.


Swift Protocol Extension Weirdness

Swift is a protocol oriented language, and I’ve found I can really provide a lot of power as well as flexibility by making good use of protocols.

The other day I was chasing down a confusing bug. For some reason my protocol methods weren’t being called!

It turns out protocol extension methods can be unintuitive sometimes.


Keeping Swipe Back with UINavigationController Transitions

Pretty much everyone uses the Swipe Back feature that you get for free with UINavigationController. But what happens when you add some awesome animated transitions for your push actions? You can’t swipe back anymore!

I found a way around this! Though, it does feel a bit hacky…


Write the Right Thing: Iterating on User Tests

There’s a trap that people who write software often fall into. We can’t see our app in the same way a user sees it. This can sometimes lead us to create features that we think are super awesome, but it’s not actually what the users want. Or it’s too hard to use. Or it’s too confusing. Or maybe it’s just plain irrelevant.

One way we’ve found to remedy some of this is by observing people use our app. We call this “User Tests,” and we just wrapped up a round of user tests this week.


Why We Went With Realm

For years, Core Data has been the go-to persistence library for Mac and iOS apps. Recently, an alternative called Realm has come on to the scene, and is becoming quite popular. We gave it a shot, and ultimately chose to use Realm over Core Data in AmebaOwnd.