Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using storyboard as an iOS 5 alternative (and NIB for 4.3 and prior)

Does anybody know if it is possible to have a storyboard in an App for iOS 5, and use normal NIB files for older iOS-versions?

I am currently redeveloping an App, and would like to include Storyboards for new features (mainly because the was you can design tables in the view easily create different prototype cells). The 'old' interface will be the legacy for pre-iOS 5 versions.

However, when adding the storyboard, and programmatically load it when iOS 5, I get the compiler error "Storyboards are unavailable on iOS 4.3 and prior". Is there a way to get this to work?

like image 684
Luuk D. Jansen Avatar asked Nov 05 '22 07:11

Luuk D. Jansen


1 Answers

Not possible at this time.

Storyboards are supported in iOS 5 and later and are enabled by default for new projects. If your app must run on earlier versions of iOS, though, you cannot use storyboards and should continue to use nib files.

Source: https://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/AppDesignBasics/AppDesignBasics.html

Using storyboards means that your app will have a minimum OS requirement of iOS 5.0 in the AppStore so only customers with that version or higher can download your app. I don't think it's worth losing the customer base using 4.0+ just for the added ease of use.

like image 59
iwasrobbed Avatar answered Nov 10 '22 13:11

iwasrobbed