2017-04-09 57 views
0

是否有可能在使用Xamarin iOS時在TabBarController的每個選項卡中都有導航控制器?我目前已經安裝我的故事板,像這樣(爲簡單起見,我使用的是單標籤)Xamarin iOS NavigationController在TabBarController的每個選項卡中

TabBarController -> NavigationController -> UITableViewController

在我的UITableViewController,我ViewDidLoad方法下面的代碼不會更改標題,也不添加所需按鈕到頂部導航。我是否設置了錯誤的東西?

public override void ViewDidLoad() 
{ 
    base.ViewDidLoad(); 

    Console.WriteLine("view did load"); 
    Title = "My custom title"; 

    NavigationItem.SetRightBarButtonItem(
     new UIBarButtonItem(UIBarButtonSystemItem.Add, (sender, args) => 
     { 
      PerformSegue("CreateRecordSegue", this); 
     }) 
    , true); 
} 

故事板的圖片是在這裏:https://ibb.co/m7qq85

+0

請分享故事板的截圖 – Darshana

+0

@NinjaHattori我上傳了一張圖片 – Zac

回答

0

的解決方案是:

1)拆下導航控制器,通入的標籤欄控制器

2)創建從一個SEGUE將主頁放入標籤欄控制器,使得segue類型爲取代(而不是推)

相關問題