Adding an image to a UINavigationItem s titleView is pretty trivial, but when I push a new view on the stack it animates the UINavigationItem sliding off to the left, along with the titleView, and loads a new UINavigationItem.
I can think of a number of ways to go about making that image stay put, but they all seem pretty hacky. Is there a normal way of doing this that I can t find? Following is code for adding an image to my view controller s UINavigationItem:
UIImage *tImage = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"logo_topbar" ofType:@"png"]];
UIImageView *tImageView = [[UIImageView alloc] initWithImage:tImage];
self.navigationItem.titleView = tImageView;
[tImage release];
[tImageView release];
Thanks guys/gals