Objective-C: make reference to class that created class
Being mysef a newbie to Obj-C I´m having some troubles creating a navigation scheme.
Well, I have this NavigationController with its UIViewController (let's call it mainView
).
Inside the ViewController I load another UIViewController (let's call it dynaView
, I add it with insertSubview:dynaView.view
).
The Controller for dynaView
has a NavigationController pushViewController
to another ViewController, but since the NavigationController is related to mainView
, using self.Navigat开发者_Python百科ionController pushViewController
won't do the trick, so I was wondering how can I make reference to the NavigationController of the mainView instance that created dynaView?
Something like self.parent.NavigationController...
Anyone who can help me :) ?
UIView has a superview property; UIViewController has a parentViewController property. One of those is what you're looking for.
精彩评论