How To Load Different XIBs Based On The Device Type?

mainWhat’s with all the different sizes of the iOS devices? I mean, sure we have autolayout feature that takes care of things in general. But if you want real aesthetic perfection, then you are better off having a separate XIB for each screen size. If you create a universal app, Xcode automatically creates two separate XIBs for iPhone and iPad. But if you want to differentiate between the 3.5 inch screen and the 4 inch screen on the iPhone, you should create a new XIB and add it to your project. You should of course name them accordingly. You can then load the XIBs by checking for the device type as given below.   Continue reading

How To Convert iPhone XIB To iPad XIB?

So you started a universal iOS app and finished up everything on the iPhone XIB. Now it’s time to do the iPad XIB. But wait a minute, do we have to redo the whole thing? Isn’t it repetitive and tedious to all the mappings and connections all over again? The good thing is that there is a way around it. You only need to do minimal work to get your iPad XIB up and running on Xcode 4.   Continue reading