开发者

Add sub views in Navigation Controller

I have a main view which has 3 labels positioned on the top. At the bottom there are about six buttons. On tapping each of the buttons, a different view is to displayed in the center area.

Each of those views have a view controller of its own. In the viewdidload method I set the view frame's y position and height so that it fits in the center area.

This all works 开发者_运维技巧if I add those views as subviews. But I want to maintain a view hierarchy. So I tried to use navigation controller. But the problem is the main view goes off screen and the child view is positioned from the top.

How do I solve this problem?


Do you mean the navigation controller supports adding of subviews without taking off the parent view from the screen?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜