簡體   English   中英

Uitabbarcontroller不會回應iPhone 5中標簽欄的標題

[英]Uitabbarcontroller won't respond on touching on the title of the tabbar in iPhone 5

我正在向主視圖控制器添加tabbarcontroller。 如果我觸摸標簽欄圖像徽標下面的標題,它將不會響應。 如果單擊標簽欄的圖像,則會單擊並選中。 這個問題只有iPhone 5(4英寸屏幕)。 但它在3.5英寸設備中工作正常。

請參考下面的圖像,紅色邊框內的區域不會響應所有標簽欄的觸摸。

在此輸入圖像描述

設備awa模擬器中也出現相同的問題。 我記得在StackOverflow中有一個完整標簽欄點擊訪問的帖子,但現在找不到它。 請為此建議一個解決方案。

編輯

根據您的評論

I added the tabbarcontroller using, tabctrl.view.frame = CGRectMake(0, 20, 320, 548); [self.view addSubview:tabctrl.view];

您還應該使用window bounds或self.view初始化tabBar,或者嘗試不設置視圖,tabbar將自己設置

上一個答案

在實用程序檢查器中為MainWindow啟用FullScreen 在此輸入圖像描述

in Main View Controller

-(void) viewDidAppear:(BOOL)animated
{
  [super viewDidAppear:animated];

    // I assumed that you have created yourTabBarController in View did load

    yourTabBarController.view.frame = self.view.bounds;

}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM