UINavigationBar question

Discussion in 'iOS Programming' started by brat2, Mar 30, 2009.

  1. macrumors newbie

    Joined:
    Feb 18, 2009
    #1
    Hi all

    I am using UINavigationBar and its showButtonsWithLeftTitle method.

    Application is working fine but I have a warrning while compiling that UINavigationBar may not respond to this method and so on...

    Actually I didn't find such method in UIKit/UINavigationBar.h

    So why is it working if there is no such method declared, or what should I import to take this warrning away ?
     
  2. macrumors 6502

    Joined:
    Apr 24, 2007
    Location:
    San Francisco Bay Area
    #2
    Is that method deprecated? You might be missing a parameter or two. Double check the correct version documentation with the version you're compiling for.
     
  3. thread starter macrumors newbie

    Joined:
    Feb 18, 2009
    #3
    actually I didn't find such method in <UIKit/UINavigationBar.h> header file as I wrote

    how can this method be depricated if it works on simulator and on device ?
     
  4. macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #4
    If it's not a published API method then don't use it, it's liable to be removed in future and may result in your app being rejected from review.
     
  5. macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #5
    That method is a private method of UINavigationBar. If you use it then your app may not be allowed on the app store.

    What are you using it for and can you replace that functionality with public methods?

    Edit: Apparently that method was present in v1.x of UIKit but was deprecated in v2.0. You should simply be able to create your UIBarButtonItems and add them to the navbar and set the title of the view controller.
     

Share This Page