I insert a navigation controller in my project at the beginning of the work using editor->embed in->Navigation Controller
.
Now I realize that is better to insert a tab bar instead of the navigation controller, but I'm unable to remove it! The unembed item in the editor menu is always grey, each item i select...
How can I do this job?
1) select navigation controller and delete connection. do same as shown in images and don't delete navigation controller at last step as i written in answer's last line. keep it disconnected as it is shown. Thanks that was it.
You just select the label you want to delete, and hit the delete button on your keyboard. That will remove the object.
Use this code and enjoy: NSMutableArray *navigationArray = [[NSMutableArray alloc] initWithArray: self. navigationController. viewControllers]; // [navigationArray removeAllObjects]; // This is just for remove all view controller from navigation stack.
Just select the navController in storyboard and delete it. Then you need to add a tab bar controller to it(you can do this same way as nav controller:Editor -> Embed In -> Tab Bar Controller) and wire it up with the view controllers as you require it. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With