I am adding a custom background image to my UINavigationBar, overriding drawRect through the category.
- (void) drawRect :( CGRect) rect {
[[UIImage imageNamed: @ "navbar.png"] drawInRect: CGRectMake (0, self.frame.size.height-44, self.frame.size.width, 44)];
}
This solution works fine until you try to use the navigationitem.prompt property. Instead of making smooth animation of the presentation of the invitation, she does it all of a sudden.
Are there any suggestions on how to fix this? Or an alternative way to set the background image.
PS. I am trying to avoid adding a background image as a subquery due to things being rebuilt when view push / pop. And I would not want to send SubviewToBack to every viewDidAppear view.
TIA!
EDIT: I also tried the swizzling method, which would work just fine if I could just let my image stretch, but since the image is not stretched, I need to figure out how to use the animation that happens to make the shift instead of stretching.
EDIT: see my hacker answer below
source
share