![](/img/trans.png)
[英]How to enable the userinteraction only in the barbutton item of the navigation bar?
[英]How can I highlight the BarButton in navigation bar without tapping it?
通常,當我們點擊UIBarButtonItem時,它會突出顯示。
但是,我打算向用戶顯示,在4秒鍾后加載視圖時,將自動為他們執行操作。
因此,我想突出顯示按鈕而不點擊它。
我該如何實現?
對於UIVIew
對象(例如UIButton
,可以在UIView上使用以下代碼Glow類別,該類別增加了對使視圖發光的支持,或使用此示例 。
如果您正在使用第一個,則只需調用startGlowing
和stopGlowing
。 當你調用startGlowing
,視圖將開始與柔和的光脈沖,當這種效應被刪除stopGlowing
被調用。 檢查一下 。
對於UIBarButtonItem
,您可能必須使用此處提供的解決方案 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.