2017-10-05 63 views
0

有一個UITabbarController和兩個嵌套在UINavigationViewController中。UINavigationViewController有兩個工具欄,但工具欄不在底部,而是44px上部。爲什麼?嵌套容器視圖控制器之間的差距

enter image description here

enter image description here

工具欄加入編程:

UIBarButtonItem *update = [[UIBarButtonItem alloc] initWithImage:[PfbUtility imageFromConfigIfExist:@"reload"] style:UIBarButtonItemStylePlain target:self action:@selector(eah)]; 
self.toolbarItems = [NSArray arrayWithObjects: update, nil]; 
self.navigationController.toolbarHidden = NO; 
+0

你如何添加這些工具欄? – Sti

+0

以編程方式 –

+1

在Storyboard中,嘗試在** tabBar下面附加splitview **的底部,而不是頂部(如果您還沒有)? – Sti

回答

0

的SPLITVIEW的底側連接到屏幕/視圖的底部邊緣(使用TabBar以下),不以tabBar的頂部。該應用程序明白,它低於tabBar並會自動偏移/插入基於此的內容。這不是一個'骯髒的修復',它是有目的的方式來做到這一點。這樣做時,您也可以選擇使用半透明導航和tabBars。