ios - Disable a button when the keyboard is popped up -


I have got a UITFFIELD, when you click on it, a keyboard will pop up; I use UITFFIELD And now when I pop up the keyboard, I want to disable a button. How can I do this?

To disable the button: [self.howButton setEnabled: NO]; But where do I keep it?

You can add your code to notifacticon , when it is shown , Then disable the button,

  - (zero) init {[NSNotificationCenter defaultCenter] addObserver: auto selector: @selector (keyboardWillHide) button in init to add name  

Enable: UIKeyboardWillHideNotification object: zero]; [[NSNotificationCenter defaultCenter] addObserver: Self Selector: @Selector (KeyboardWlash) Name: UIKeyboardWillShowNotification Object: Zero]; }

hide the show and hide the method

  - (zero) keyboardHallHide {{self.how button is set to enable: Yes]; } - (zero) keyboard hollows {{self.howButton setEnabled: NO]; }   

Finally remove the supervisor, when the class is dealloc

  - delete (deleoc) dealloc {[NSNotificationCenter defaultCenter]; observer: self]; }    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -