iOS SDK Systems Development
(440) 720-4-iOS (467)
While working on my latest development project. The client wanted to have thier logo as the title of the NavigationBar. After some searching I found this code. It works well and is simple to understand.
UIImageView *image=[[UIImageView alloc]initWithFrame:CGRectMake(0,0,70,45)] ;
[image setImage:[UIImage imageNamed:@"Discount_Image.png"]];
[self.navigationController.navigationBar.topItem setTitleView:image];
UINavigationController *navController = self.navigationController;
pdViewController = [[ProductDetailViewController alloc] initWithNibName:@"ProductDetailView" bundle:nil];
NSMutableArray *controllers = [[self.navigationController.viewControllers mutableCopy] autorelease];
[controllers removeLastObject];
navController.viewControllers = controllers;
[navController pushViewController:pdViewController animated: YES];
As I work my way through developing the app I am finding that there is more than one to make things happen on the iPhone. Most of the tutorials that you find on out there use Interface Builder to make sample apps.
In this tutorial Elizabeth Robson show you in great detail how TabBarcontrollers and Navigation Controllers can work together.
Thank you Elizabeth for a great tutorial
http://www.youtube.com/watch?v=LBnPfAtswgw