Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

remove navigation controller inserted with storyboard

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?

like image 344
Ast Avatar asked Nov 29 '12 09:11

Ast


People also ask

How do I remove navigation controller from storyboard?

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.

How do you remove objects from a storyboard?

You just select the label you want to delete, and hit the delete button on your keyboard. That will remove the object.

How do I remove a view controller from navigation stack?

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.


1 Answers

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.

like image 90
Ajeet Avatar answered Dec 03 '22 14:12

Ajeet