I want to make a custom UINavigationBar with a drop shadow.
Doing so:
UIImage *barImage = [[UIImage imageNamed:@"navbar2.png"]resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; // OK
[[UINavigationBar appearance] setBackgroundImage:barImage forBarMetrics:UIBarMetricsDefault]; // OK
[[UINavigationBar appearance] setShadowColor:[UIColor blackColor]]; // Error
What is wrong?
Can I do this thing with “appearance”?
Thanx!
UINavigationBardoesn’t have a shadow color. It has a shadow image or if you want to set the text shadow, usetitleTextAttributes.