Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

brat2

macrumors newbie
Original poster
Feb 18, 2009
13
0
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 ?
 
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 ?

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.
 
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 ?
 
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.