I have started a new app a few days ago and began working with the simulator to test it. I started as an empty project and manually added the storyboard. The simulator build
I had this problem in a project that had storyboards with and without ~iPad or ~iPhone suffixes, like MainStoryboard.storyboard and MainStoryboard~iPad.storyboard.
The problem was that MainStoryboard.storyboard was overwriting MainStoryboard~iPad.storyboard when it got compiled into the build directory. If the files were compiled in the opposite order, both would be preserved without issue. I have no idea why this happens.
To get around this, you can stop using ~iPad/iPhone suffixes or make sure the files are in the right order in the Copy Bundle Resources phase.
(Using XCode6.2beta2)
This problem happened for me when i was calling storyboard in code.The reason was i used different 'word' for storyboard.I solved it like this
Go to Targets ->info , select info,copy name of storyboard and paste it to where you are calling storyboard.
At least give a try….
This helped me (Swift 2.1, Xcode 7.2) for an app with a tab bar
let storyboard: UIStoryboard = UIStoryboard(name:"Main",bundle: NSBundle(forClass: self.dynamicType))
let tabController = storyboard.instantiateViewControllerWithIdentifier("MyTabBarIdentifier") as! UITabBarController
I had the Main.storyboard with the correct target membership, copy bundle resources, cleaned build folder, etc (most of the answers were pointing to this).
To prevent this from happening I have had to change the way I work with storyboard files. After editing the storyboard save the file then exit XCode. This seems to prevent the problem from occurring.
You just need to check your configuration file (.plist
) under Supporting files
folder
Check the name of your default storyboard.
Just want to mention scenario I encountered. I don't know how, but storyboard disconnected from the target although it still was part of the project. To fix this I opened storyboard, selected "File Inspector"(leftmost icon on the right panel) and check the project under "Target membership". Hope it helps someone.