Apokrupto

I do apps...

  • Blog
  • About

Swift Protocols and the Law of Unintended Consequences

August 14, 2016 by Warren Gavin

I'm currently trying to improve my understanding of best practices in POP. One of my starting points was this article by Natasha The Robot. The example of a shakeable view was easy to follow, but I wanted play with it a bit to make it a bit more configurable. 

Read More
August 14, 2016 /Warren Gavin
Swift, iOS
8 Comments

Animation killed the CPU star

July 16, 2016 by Warren Gavin

Working on an app for a client recently threw up an interesting issue with CPU performance. Basically we were maxing out the CPU, even on the most plain of view controllers displayed. Finding out why lead us to discover some interesting side effects to using animations.

Read More
July 16, 2016 /Warren Gavin
iOS, animation
2 Comments

Coordinators with Storyboards

April 27, 2016 by Warren Gavin

I recently discovered Soroush Khanlou's NSSpain presentation on Coordinators, and once more I'm architecturally smitten. In short (and I'm being free and easy with the reality and details here, I admit), a view controller should not know about it's place in the hierarchy, therefore a coordinating object is used to push and pop view controllers as the need arises.

Read More
April 27, 2016 /Warren Gavin
iOS, xcode
7 Comments

A lazy write-once Swift setter

April 03, 2016 by Warren Gavin

An interesting post on Natasha the Robot's blog about data injection with storyboards and segues in swift got me to thinking. I'm using the same pattern as described in the post to set my data sources and other gubbins in prepareForSegue(_:sender:), and it seems 

  1. Pretty unavoidable if you want to use segues as they're designed
  2. Uncomfortably permissive
Read More
April 03, 2016 /Warren Gavin
swift, iOS

JSON and the arguments

April 03, 2016 by Warren Gavin

The iPhreaks podcast episode with Josh Brown was a good insight into JSON parsing in Swift. I didn't think it could be possible to have enough material for an entire book, but it turns out there is plenty.

Read More
April 03, 2016 /Warren Gavin
iOS, swift

NSInvocation

March 15, 2016 by Warren Gavin

My favourite Objective-C interview question is this:

"List as many ways as you can think of for accessing an object property."
Read More
March 15, 2016 /Warren Gavin
Objective C, iOS, Refactoring
2 Comments

All content © Warren Gavin.   |   Powered by Squarespace