我正在建设和使用webView's
。通过选择一些标签我还显示一些视图非webView。我有一个navigationController将按钮添加到导航栏中默认的“后退”按钮
Ncontrolls
类问题
有下一个代码:
- (void)push{
UIViewController myVC = [[UIViewController alloc] init];
myVC.view.frame = currentNC.view.frame;
UIImageView *logo = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"house.png"]];
UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithCustomView:logo ];
[myVC.navigationItem setLefttBarButtonItem:buttonItem];
[currentNC pushViewController:myVC animated:NO];
每次我想使用后退按钮,当我改变页面中的UIWebView我打电话的下一个代码,并使用push
,并添加后退按钮
UIViewController *VC1 = [[UIViewController alloc] init];
[[AppDelegate sharedInstance].currentNC pushViewController:VC1 animated:NO];
我有一些看法的,我想不久的添加诺特尔键返回按钮,而不是取代它,但增加近。我正在寻找选项来设置我的按钮在一些视图附近后退按钮。
该代码添加的一个按钮:
UIBarButtonItem *button1 = [[UIBarButtonItem alloc] initWithCustomView:trView];
[VC1.navigationItem setLefttBarButtonItem:button1 ];
[currentNC pushViewController:dummyVC animated:NO];
当我去到下一个视图,并显示后退按钮,我button1
消失。我如何在这一刻添加它靠近后退按钮?
我看到一些应用程序使用它 –
也许,在这些应用程序中使用自己的导航,而不是从SDK? – Andrey
我自己动手,请看下面的答案 –