how to disable a navigation bar button item in iOS

前端 未结 16 1345
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-01 09:54

I have created a navigation controller. In the second view (which is pushed), I have some webservice call and placing a overlay view and setting

self.view.use

16条回答
  •  独厮守ぢ
    2021-01-01 10:02

    You can do the following if you are running on Swift

    self.navigationItem.rightBarButtonItem?.enabled = true
    

    This snippet will disable the button.

提交回复
热议问题