initWithNibName on iOS is smart: it does things like automatically load different NIBs for iPad instead of iPhone (although many people don’t know this - it is NOT DOCUMENTED in UIViewController.initWithNibName!).
But what else can he do? The only Apple docs I have found for this explain that:
- It will search and find files with ~ ipad or ~ iphone at the end of the name
- Apple implies that it complies with the rules for automatic image file name matching
But there is no reference to the rules for matching images, and I cannot find any explicit documents for: (.
Rules may include: "you get another retina NIB if you put @ 2x at the end of the file name" (I have no idea if this works).
What I'm really looking for is a list of what rules are used. This will save a lot of hard coding - repeated in almost every single application that I write - if I could use their smart name matching more (for example, if they have a "boot landscape compared to a boot portrait")
Adam
source share