uinavigationcontroller offset on y axis

Discussion in 'iOS Programming' started by mlecho, Aug 7, 2009.

  1. mlecho macrumors newbie

    Mar 31, 2004
    hi, i am new to Objective C, so please bare with me. I find it important to understand how to add things programatically. I have a table view that populates with RSS data. In my view, i added a UINavigationController(UINC). All is fine, except that upon adding that controller, it rides just about 10-20 pixels south of where i would expect (0,0). can anyone explain and help me out? The addition of his UINC is quite simple:
    - (void)parserDidEndDocument:(NSXMLParser *)parser
    	frontTable =[[FeedTableController alloc] initWithNibName:@"FeedTableController" bundle:nil];
    	//add the nav controller
    	navController = [[UINavigationController alloc] initWithRootViewController:frontTable];
    	self.view = navController.view;
    	[frontTable setUpTable:menuList];
    	[self.view addSubview:frontTable.view];
    and here is how it looks:

    any ideas?
  2. mlecho thread starter macrumors newbie

    Mar 31, 2004
    found my answer in:
  3. smorgan macrumors newbie

    Aug 27, 2009
    Hello, can you described how you solved this using frame? I have a uinavigationcontroller loading in a modal and it's short by about 20 pixels.


  4. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    20 pixels is the height of the status bar. That's the clue.

Share This Page