我正在建設和使用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
我自己動手,請看下面的答案 –