0

Is there any way to load a uitableview from a storyboard?

storyboard image

Such as the Table View in my image.

What I did is:
self.view addSubView:vc.view not worked.

I want to load the tableview in another viewcontroller's view. thanks in advance!

David Ansermot
  • 6,052
  • 8
  • 47
  • 82
  • 1
    do `self.addSubViewController:vc` before `self.view.addSubView:vc.view`. And in storyboard you can drag `containerView`, it will do the job automatically for you – duan Apr 29 '15 at 13:23
  • 1
    You would also need to load the Storyboard first if it is by itself. http://stackoverflow.com/questions/9896406/how-can-i-load-storyboard-programmatically-from-class shows how to load a storyboard programmatically. – dmason82 Apr 29 '15 at 13:23
  • thanks,it works! self.addSubViewController:vc. – Zander Zhang Apr 29 '15 at 13:36

0 Answers0