uinavigationcontroller offset on y axis

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

  1. mlecho macrumors newbie

    Joined:
    Mar 31, 2004
    #1
    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:
    Code:
    - (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:
    [​IMG]

    any ideas?
     
  2. mlecho thread starter macrumors newbie

    Joined:
    Mar 31, 2004
    #2
    found my answer in:
    self.navigationController.navigationBar.frame
     
  3. smorgan macrumors newbie

    Joined:
    Aug 27, 2009
    #3
    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.

    Thanks,

    Scott
     
  4. dejo Moderator

    dejo

    Staff Member

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

Share This Page