Set Notification


/ Published in: Objective C
Save to your folder(s)

Notification related with KeyboardWillShow


Copy this code and paste it in your HTML
  1. - (void)viewDidLoad {
  2. [super viewDidLoad];
  3.  
  4. [[NSNotificationCenter defaultCenter] addObserver:self
  5. selector:@selector(keyboardWillShow:)
  6. name:UIKeyboardWillShowNotification
  7. object:nil];
  8. }
  9.  
  10. - (void)viewDidDisappear:(BOOL)animated
  11. {
  12. [super viewDidDisappear:animated];
  13. [[NSNotificationCenter defaultCenter] removeObserver:self
  14. name:UIKeyboardWillShowNotification
  15. object:nil];
  16. }
  17.  
  18. - (void)keyboardWillShow:(NSNotification *)aNotification
  19. {
  20. //...........
  21. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.