开发者

How to access the "Custom Content View" of a UINavigationController

I have an app that uses a UINavigationController to control its flow, and I want to be able to dynamically swap views into and out of one of the pages in my app. The UINavigationController Reference from Apple's Docs shows this diagram outlining the structure of a UINavigationController.

So my question is this: from within the currently-displayed UIViewController, how do I access the area labeled as "Your custom content here" to determine its frame/size and how do I swap content into and out of it?

Thanks!开发者_开发技巧


Since it's your custom content, you will create the view that contains it, either in Interface Builder or by manually coding it. See the docs for loadView: and look at some of the sample code. You'll want a root view whose subviews you swap about as you described. At which point, Justin's comment about self.view is appropriate.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜