how to disable a navigation bar button item in iOS

前端 未结 16 1277
爱一瞬间的悲伤
爱一瞬间的悲伤 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:06

    I solved this by just adding a property to my viewcontroller:

    @property (nonatomic, strong) IBOutlet UIBarButtonItem * RightButton;
    

    I then connected it to the button on the storyboard. You can then at will set its properties like:

    self.RightButton.enabled=true;
    

提交回复
热议问题