Monday August 05, 2013

Using Class Clusters Instead of If-Statements To Support iOS 7

Jean-David Gadina has a great post on using class clusters to add support for all the new interface decisions you must make for iOS 7 so that you don’t have to pepper your code everywhere with if-statements. When you’re ready to drop support for iOS 6, just delete those particular classes1. This kind of strategy is important because every major iOS release has introduced subtle incompatibilities with previous versions that you have to work around.

(via @orta)

  1. It reminds me of Daniel Steinberg’s technique of loading a different AppDelegate depending on if you’re running on iPad or iPhone.