簡體   English   中英

在標簽欄中心添加自定義按鈕的最佳方法

[英]the best way to add custom button on tabbar center

當我使用這種方式自定義按鈕時,向標簽欄添加自定義中心按鈕的最佳方法是什么?

[tabbarcontroller.view addsubview:button]

要在視圖上添加自定義按鈕,navigationcontroller推到其他viewController會使用hidesBottomBarWhenPushed方法來隱藏hidesBottomBarWhenPushed ,但是該按鈕會保留在屏幕上

或者我使用這種[tabbarcontroller.tabBar addsubview:button]方法添加到[tabbarcontroller.tabBar addsubview:button] ,但是我的按鈕將被[tabbarcontroller.tabBar addsubview:button]覆蓋,並且無法接收觸摸事件。

請告訴我解決方法,謝謝您的回答

您的第一個選擇的問題是它沒有隱藏? 如果是這樣,您可以手動隱藏它。

暫無
暫無

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

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