Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. -(void)someMethod:(UIScrollView*)scrollView{
  2. [[NSNotificationCenter defaultCenter]
  3. addObserver:self
  4. selector:@selector(keyboardWasShown:)
  5. name:UIKeyboardDidShowNotification object:nil];
  6. }
  7. -(void)keyboardWasShown:(NSNotification *)aNotification{
  8. // I want to get scrollView over here
  9. }
  10.  
  11. [[NSNotificationCenter defaultCenter]
  12. postNotificationName:UIKeyboardWillHideNotification
  13. object:self
  14. userInfo:@{@"scrollView":scrollView}];
  15.  
  16. -(void)keyboardWasShown:(NSNotification *)aNotification{
  17. UIScrollView *scrollView = aNotification.userInfo[@"scrollView"];
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement