Reputation: 641
I have developed a DetailViewController
, derived from UIViewController
. Now I want to use this DetailViewController
inside another InfoViewController
's layout. I found one way to do this by using addSubView
method. But what I am looking for is to plot it through nib
file, like other UIView
s. I want to plot DetailViewContoller
inside InfoViewController
's layout through nib
file. Is this possible?
Any response will be thankful.
Upvotes: 1
Views: 88
Reputation: 229
Yes it is possible..
First remove the referencing outlet for view in DetailViewController.xib.
And in InfoViewController.xib drag-drop Object and edit the custom class to DetailViewController.
Now drag-drop view in InfoViewController.xib and add what ever subviews you want to it. Now add new view referencing outlet to DetailViewController which is under objects.
Hope this will help you.
Upvotes: 1