1

I have a ViewController and another one which is a TableViewController. So I have the tableview in a container view in the ViewController. Moreover I have a button which will save the values from the tableview. But how do I access these values? I've uploaded a screenshot so you can imagine it better :)

screenshot

KlimczakM
  • 12,576
  • 11
  • 64
  • 83
Tim
  • 175
  • 1
  • 1
  • 12

2 Answers2

0

I don't understand why you use a container in this case.

But, have a look in

self.childViewControllers

It should contain your tableViewController.

Chrstpsln
  • 765
  • 16
  • 31
  • 1
    because its an static cell table... and it needs to be in a UITableViewController... – Tim Jan 30 '15 at 15:26
0

You make an IBOutlet. Go to the storyboard and drag your embedded tableView into your other view controller. There you can reference all of its exposed stuff (in the .h), assuming its been loaded already.

Reference on outlets: https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaEncyclopedia/Outlets/Outlets.html

Good post on using container views: IBOutlet link to embedded view controller

Community
  • 1
  • 1
Alex
  • 3,861
  • 5
  • 28
  • 44