![](/img/trans.png)
[英]Present ViewController modally from UITabBarController without hiding the tab bar
[英]How to present ViewController when tab is selected on UITabBarController?
我有一個帶有配置文件選項卡的UITabBarController。 如果要按“個人檔案”選項卡,但我沒有登錄,我想顯示一個登錄視圖控制器。如果用戶按“取消”,我希望選項卡欄控制器具有與以前相同的選項卡。
您需要使用UITabBarControllerDelegate
-tabBarController:shouldSelectViewController:
要么
-tabBarController:didSelectViewController:
檢測您的概要文件控制器並顯示登錄控制器。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.