关于ios中UIBarButtonItem 自定义 ,UITabBarControll 的隐藏

UIBarButtonItem *backItem=[[UIBarButtonItem alloc]init];
backItem.title=@" ";
UIImage *backimage=[[UIImage imageNamed:@"back.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
[backItem setBackButtonBackgroundImage:backimage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
backimage=nil;
BszhViewControllerFirst *bszhViewController = [[BszhViewControllerFirst alloc]init];

[bszhViewController setHidesBottomBarWhenPushed:YES]//隐藏uitabbarController
self.navigationItem.backBarButtonItem=backItem;]

===折腾了一下午啊,back.png 自个用的是30*40,如果 不加红色内容,容易造成图片走形,原因未详

posted @ 2013-03-14 18:40  Dzs  阅读(1083)  评论(0编辑  收藏  举报