Customize back navigation item from a child navigation controller

Discussion in 'iOS Programming' started by mancha, Aug 19, 2008.

  1. mancha macrumors newbie

    Joined:
    Aug 10, 2008
    #1
    Hi,

    i have a navigation controllers hierarchy and i need to disable back item from a child navigation controller. Is it possible?

    i tried the following:

    [self.navigationController.navigationBar.backItem.backBarButtonItem setEnabled:NO];
    [self.navigationItem.backBarButtonItem setEnabled:NO];
    [self.navigationItem.leftBarButtonItem setEnabled:NO];
    [self.parentViewController.navigationItem.backBarButtonItem setEnabled:NO];

    it doen't make any effect


    thanks.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    I think the only thing you can do right now is replace the back button with a new button but that new button doesn't have the back button style, unfortunately.
     
  3. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3
    Have you tried the hidesBackButton property of UINavigationItem?
     
  4. mancha thread starter macrumors newbie

    Joined:
    Aug 10, 2008
    #4

    Thanks, it works fine!!
    i didn't knew this property
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    That's what the documentation is there for: to be read when you want to find out how to do something
     

Share This Page