Category Archives: Swift

Over the past month or so I've been diving into Swift, after many years of working with Objective-C on Macs and iOS. It's been a change but, gradually, I'm learning the Swift way of doing things. On the way I've run into a few bumps in the road when dealing with Core Data, and I thought would be useful to share how I got past them. Xcode Generated Subclasses Considered Harmful This is the main impetus for this post. Most other stuff I would expect people to work around eventually, but this one is kind of big. Xcode's generated NSManagedObject subclasses are limited but useful in their own way. If you don't need much, they'll do. Everyone else would use mogenerator. That's if you're using Objective-C, though. With Swift there's a decent…

read more →

At WWDC 2014 Apple introduced Swift, a new programming language for iOS and OS X developers. Objective-C has had a long and distinguished run with Apple, but times change and we move on. In recognition of this, and in reference to the [objC retain]; shirts of days gone by, I set up a Teespring campaign to say goodbye-- gradually-- to Objective-C.

objC-autorelease-orange-Teespring objC-autorelease-blue-Teespring

Why not [objC release];? Swift is the clear way forward, but Objective-C won't be disappearing right away. In this context "autorelease" implies "release later". Objective-C doesn't disappear right now, but just wait until the end of the run loop...

All profits from these shirts will be donated to App Camp For Girls. (This campaign is not affiliated with App Camp For Girls, I just think it's a good idea).

permalink