I have set an ImageView
as title view for a specific ViewController whereas the other controllers have UILabel
as titleView. I used the following code to set title view,
UIImageView *imageTitle = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Logo"]];
[self.navigationController.navigationBar.topItem setTitleView:imageTitle];
I have tried using this one as well,
UIImageView *imageTitle = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Logo"]];
[self.navigationItem setTitleView:imageTitle];
The issue is, when I pop back to the view controller the title view
stays on left for few seconds. I'm not sure what's the reason for this? Please let me know where I'm going wrong???!
P.S: The issue occurs in iOS 7 only!
Here is the sample project with this issue - https://dl.dropboxusercontent.com/u/97646145/Issue/NavigationTitleView.zip
Update
As @FahimParkar suggested, I used a 320x44 image for the titleview. The delay in positioning seems little as the image is wide. Is this the only solution for this issue?
Link to download trial project with 320x44 image -> https://dl.dropboxusercontent.com/u/97646145/Issue/NavigationTitleView_Updated.zip