开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜