0

I Have a iOS Universal Project, and Change The UINavigationBar Background By Category (Ref:http://stackoverflow.com/questions/1692487/how-to-add-background-image-on-iphone-navigation-bar)

After that, I found the Category changed the iPhone and iPad app, the question is ,how can I only change the iPhone App Navigation Bar background image, and the iPad app use the default background image?

Wu Guoquan
  • 101
  • 1
  • 6

1 Answers1

0

You could base your code around a conditional [[UIDevice currentDevice] userInterfaceIdiom]. This property of UIDevice returns an enum value indicating whether the device the app is running on is an iPhone/iPod touch device or an iPad device.

In the case that this property returns UIUserInterfaceIdiomPhone, then you could use your custom background image your category method's implementation.

James Bedford
  • 28,702
  • 8
  • 57
  • 64