ios - About supporting iPhone 5 when using nib files and backwards compatibility -
i've been looking apple's documentation , posts regarding issue, didn't make clear how should deal this, since of information found storyboards , autolayout feature. i'm using nib files instead of storyboards, , in addition need support ios 5+, can't use autolayout. i'm using xcode 4.6.3 , i've observed that, in ib, going view's attributes inspector > simulated metrics, can choose size ("retina 3.5 full screen", "retina 4 full screen"...). right now, have parameter set "none", should have 1 nib file per each screen size , detect programmatically if current device iphone 5 or phone (similarly supporting ipad in universal app)? if not, how should manage iphone 5 support, given particular conditions?
thanks!
1.add "default-568h@2x.png" image,with this,when app launch use iphone5 screen size,if not, when app launch use iphone4s screen size
2.set custom viewcontroller's view autoresizingmask property
eg: self.view.autoresizingmask = uiviewautoresizingflexiblewidth | uiviewautoresizingflexibleheight;
3.if custom viewcontroller's subviews include uitableview or uiscrollview, set subview's autoresizingmask property
eg:self.ascrollview.autoresizingmask = uiviewautoresizingflexiblewidth | uiviewautoresizingflexibleheight;
that's need do.
Comments
Post a Comment