This is a bit obscure, but I ran into it earlier this week. Why would a view controller appear in the wrong orientation on startup?
Tag: Tricks
Using blocks to handle errors
In the past, I’ve talked about Using blocks to remove redundancy. But now I want to explain the pattern I’ve adopted since, which is my favorite block pattern of all. Even though it, too, is all about removing redundancy: handling errors. Although Objective-C supports exceptions, they’re not commonly used. A thrown exception is usually not… Continue reading Using blocks to handle errors
Use a Build Phase to validate XML
My application includes some XML files that are used while running to map data from a web service. This has drastically simplified the code I needed to write to parse data from the web service, since I can describe how to decode all of the types of object the web service interacts with simply. If… Continue reading Use a Build Phase to validate XML