Search code examples
iosobjective-cuinavigationcontrollerinterface-buildercs193p

ViewController's view's content is not pushed down by navigation controller


So I'm in the process of doing the Stanford CS193p course for IOS7 development and just finished lecture 7. Everything works fine, except for the fact, that my cardgameviewcontroller is not pushed down under the navigation bar. So if I add my CardViews in the top left corner, they are overlayed by the navigation bar. Here is my setup: nib layout

The CardMatching Scene, is the one my question is about. As you can see, it contains a view (that is not resizable btw and stretches under the navigation and tab bars). Now if I add a view via [self.view addSubview:myview], views get added on the top left corner, and are hidden under the navigation bar. As seen here:

nav bar overlapping

The top left view is initiated with a frame of (0,0). So my question is, do i have to push down the content programmatically or did i do smth wrong with the layout in interface builder?


Solution

  • unchek the under top bars ,under bottom bar options as required

    Uncheck under top bars ,under bottom bars