Search code examples
iosobjective-cstoryboardios-universal-apptilde

Using tilde "~" for the Storyboard names in iOS


Is it officially supported to use "~" for the Storyboard names for automatic form factor recognition?

HomeView~ipad.storyboard
HomeView~iphone.storyboard

I know it works if used like that but I want to make sure Apple officially supports this convention for the Storyboards specifically. I've noticed that by default Xcode templates for the new Universal application are using "_" underscore not "~" tilde for the form factored Storyboards, which then requires some logic in the code to recognize the form factor and use appropriate storyboard.


Solution

  • Yes, it's supported; it's part of resource-loading generally, and a storyboard is a resource.

    Note that in iOS 8 you will use a single storyboard for your universal app and this entire issue will go away.