//self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"主页" style:UIBarButtonItemStylePlain target:self action:@selector(backAction)];
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0,0,60,31)];
[button setBackgroundImage:[UIImage imageNamed:@"abc.png"] forState:UIControlStateNormal];
UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithCustomView:button];
self.navigationItem.rightBarButtonItem = btn;
[button release];
[btn release];
-(void)backAction
{
self.navigationController.navigationBarHidden = YES;
[self.navigationController popViewControllerAnimated:YES];
}
//自定义背景
UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:adressPage];
[nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"tbar.png"] forBarMetrics:UIBarMetricsDefault]; //设置背景
[nav.navigationBar setBarStyle:UIBarStyleBlack];