1

I have a problem, I used "push" to pass from a view to another one, and now with the upgrade sdk 8.0, it's deprecated. So what should i use?

matt
  • 607
  • 7
  • 20

1 Answers1

1

If you want to use a Storyboard Segue you have to use Show (e.g. Push) segue. This could be a possible duplicate: Adaptive segue in storyboard Xcode 6. Is push deprecated?

To make the new Show segue to acts like a Push segue, the controller has to be embedded in a navigation controller, otherwise, it acts simply like a modal segue. To embed your controller in a NavigationController, select the TableViewController from the storyboard, than select Editor->Embed In->Navigation Controller from the Xcode menu.

Community
  • 1
  • 1
  • I tryed Show and it's ok, but Push is different.. Automatically it gives you also the "Back" button to return to the previous view – matt Nov 07 '14 at 15:42
  • Even the Show segue does! Are you sure that your controller is inside a Navigation Controller? – Francesco Frascà Nov 07 '14 at 15:45
  • I need to go from a TableViewController to another one..For example: select item,select subitem... – matt Nov 07 '14 at 16:10
  • Yes. So, you have a TableViewController that is visualized when you open your application right? This TableViewController is embedded in a UINavigationController? – Francesco Frascà Nov 07 '14 at 16:28
  • 1
    You have to embed it in because push segue are only available from a navigation controller. The new Show segue acts like a push segue if it come from a navigation controller, otherwise, it acts simply like a modal segue. To embed your controller in a NavigationController, select the TableViewController from the storyboard, than select `Editor->Embed In->Navigation Controller` from the Xcode menu. – Francesco Frascà Nov 07 '14 at 17:03
  • oh many thanks! It was better the push action but now it works ;) thank you! – matt Nov 07 '14 at 17:12
  • Your welcome. I have edited the answer so it is more clear. Please vote the answer up if it was useful for you. – Francesco Frascà Nov 07 '14 at 17:21