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?
精彩评论