I made a nib for each viewController with family “iPhone” in the selection the GUI wizard offers. I have it working on iPad & iPhone (without separate iPad nibs) because I can’t be bothered and I don’t see the point. I’d rather just have one nib for all (especially now that the new iPhone 5 is out (with a different screen size).
On one of my pages on iPad the view is left aligned and the size of an iPhone (because of family : iPhone). What is the best way to get these nibs working on both? Do I need to reset the frame.width & frame.height after I have init’d my viewControlers? I.E by setting it to something like window.width?
EDIT:What I’ve come up with is below, is this going to be safe code?
In every viewDidLoad method on every VC I will do this:
self.view.frame = [[UIScreen mainScreen] bounds];
The best way to use one xib/nib file for iPhone and iPad interfaces it is set appropriate autoresing masks of your
UIViews AppleDocs:In iOS 6 it is now released new method to make autoresing:
You could try to find more information here: Cocoa Auto Layout Guide