Grabbing the title from a navigation bar

Discussion in 'iOS Programming' started by suksmo, May 4, 2010.

  1. suksmo macrumors member

    suksmo

    Joined:
    May 4, 2010
    #1
    I'm pretty new and have a major mental block at present around grabbing the title from a navigation bar.

    I'm looking to do something like this:

    if (title =@"pizza")
    {do something}


    Can someone help me with what I'm missing out doing?
     
  2. suksmo thread starter macrumors member

    suksmo

    Joined:
    May 4, 2010
    #2
    all sorted now - here's the answer courtesy of the nice guys at iphonedevsdk.com :-

    Code:
    if([self.navigationItem.title isEqualToString:@"pizza"]){
    NSLog(@"Pizzaaaaaaaaaaa");
    }
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    Those guys are bastards. We're much nicer. ;)
     
  4. suksmo thread starter macrumors member

    suksmo

    Joined:
    May 4, 2010
    #4
    Playing for both teams seems productive!
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    Yeah, just joking was I. iPhone Dev SDK is a good source of info, as is Stack Overflow.
     

Share This Page