我设置一步和下一步按钮,导航栏项目左键和右键button.which低于代码导航栏按钮隐藏在动画设置为YES
// Back Button
UIBarButtonItem *aBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:aButton];
[aButton addTarget:self action:@selector(navigatehome)forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.leftBarButtonItem = aBarButtonItem;
//Next Button
aBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:aButton];
[aButton addTarget:self action:@selector(navigatenext)forControlEvents:UIControlEventTouchUpInside];
[self.navigationItem setRightBarButtonItem:aBarButtonItem]
和解决问题时animated:YES
在声明中
CSA_info *h1=[[CSA_info alloc]init];
[self.navigationController pushViewController:h1 animated:YES];
它显示如下图像
如果使用animated:No
则表现如下
我在导航栏上添加图片作为子视图,以便它隐藏的按钮。
UIImage *image = [UIImage imageNamed:@"title bar.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
imageView.frame = CGRectMake(-5, 0, 330, 44);
[self.navigationController.navigationBar insertSubview:imageView atIndex:2];
我需要在导航栏中添加该图像。
为什么这样,任何帮助?
删除的图像,并设置按钮的背景颜色,那么请让我知道如果你仍然面临着同样的一点改进。 – 2013-05-01 13:57:46
你能否解释一下,你在哪里设置UINavigationBar的右键和左键。它在CSA_info类中吗? – 2013-05-01 13:58:00
你必须impliment这个代码在viewViewAppear – 2013-05-01 14:08:13