How to go back from a Table View Controller using navigation controller to a View Controller without navigation controller? Here is my Storyboard.
Asked
Active
Viewed 89 times
0
-
My ViewController is the Initial View Controller – Ornilo Nov 11 '14 at 06:07
-
show ur storyboard screen shot – Anbu.Karthik Nov 11 '14 at 06:09
-
How did you get from MyViewController to the table view controller in the first place? – rdelmar Nov 11 '14 at 06:13
-
[link](http://www.ornilosantiago.com/ios/how-to-back-viewController.jpg) – Ornilo Nov 11 '14 at 06:14
-
u r allocating the Navigation controller in wrong, embed the navigation controller with main view controller – Anbu.Karthik Nov 11 '14 at 06:17
-
I did from My Main.storyboard using (push), dragging the button to the TableViewController – Ornilo Nov 11 '14 at 06:19
-
But I don't want to show the Navigation Controller on the first ViewController – Ornilo Nov 11 '14 at 06:20
-
That's not a push, it's a show (which acts like a push if you are embedded in a navigation controller, and like a modal if you're not). You should use dismissViewControllerAnimated:completion: to go back (or you could use an unwind segue). – rdelmar Nov 11 '14 at 06:21
-
Sorry, I meant (Show). I figured out how to work, I add a navigation controller to my initiated ViewController and removed the another one that I did for my TableViewController. My problem now is, how to hide the Navigation Controller from my first View Controller? – Ornilo Nov 11 '14 at 06:35
-
Are you looking for something like this: http://stackoverflow.com/questions/845583/iphone-hide-navigation-bar-only-on-first-page ? – Zhang Nov 11 '14 at 08:49
1 Answers
0
You need to call 'pop' on the navigation controller
[[self navigationController] popViewControllerAnimated:YES];

ColinE
- 68,894
- 15
- 164
- 232