Currently making a universal application in which, I m using drawRect method for displaying an image on navigationBar for iPhone app, but I don't want to use this method for iPad.
I have created a category for changing UINavigationBar. In which I did the following.
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
// iPad mode ... dont load anything
}
else
{
// iphone mode .... use an image
}
After this its displaying a black empty space instead of navigation bar for iPad. For iPhone it works fine.
I tried using self.navigationController.navigationBar.barStyle = UIBarStyleDefault; in my both Matser & Detail views in viewDidLoad , but still it displays black empty space.
How can I avoid drawRect method call when device is iPad.
Thanks