0

I need to make "ask for something" view controller in my iOS application. Storyboard Scene

This is storyboard. When I click start button (customised button), I need to go to "second one table view controller", select there an item and pass that data that I selected back to "hidden one view controller". Which segue should I use in storyboard, and how should I pass data in code?

Nikita Zernov
  • 5,465
  • 6
  • 39
  • 70
  • 4
    possible duplicate of [Passing Data between View Controllers](http://stackoverflow.com/questions/5210535/passing-data-between-view-controllers) – Paulw11 Jul 01 '14 at 07:23

1 Answers1

1

First of all you have to use a UINavigationController. Drag it from your Object library and drop it in your storyboard.

It should present a UINavigationController and its rootViewController (a simple UIViewController). Delete the rootViewController and use ctrl + drag (as if you wanted to create a new segue) to make your controller the UINavigationController's root view.

You will have to do the same ctrl + drag to create a new segue from your first controller to the second one. but this time select push action segue.

If this is new for you, you should try this awesome course from Stanford: https://itunes.apple.com/us/course/developing-ios-7-apps-for/id733644550 It covers everything you need to make your app on iOS. If you don't have time, at least watch the 11th lecture viedo 11. Table View and iPad.

tgyhlsb
  • 1,905
  • 14
  • 21