Search code examples
iosxcodeuitabbarcontrolleruistoryboardxcode-storyboard

Xcode crashes while trying to create relationship between tabbarcontroller and Navigation view controller


Im trying to create a relationship between a navigation view controller and a tab bar controller to create a new tab but when Im doing so, the app crashes. How can I solve it? Following is the screenshot of how im creating it.

enter image description here

Error log

Application Specific Information: Sending connectionWellDragged: to from ProductBuildVersion: 7C1002 UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[NSNull length]: unrecognized selector sent to instance 0x7fff71d5b6d0 UserInfo: (null) Hints: 0: Sending connectionWellDragged: to from


Solution

  • you should not give relationship to navigation controller like this. select your tabViewcontroller (you tab not tabBarController) and from editor embed in navigationController. so, it will automatically embed navigation controller between tab and tabbarcontroller. hope this will help :)