Method: MotionPrime::Section#bind_keyboard_events

Defined in:
motion-prime/sections/base_section.rb

#bind_keyboard_eventsObject



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'motion-prime/sections/base_section.rb', line 270

def bind_keyboard_events
  NSNotificationCenter.defaultCenter.addObserver self,
                                     selector: :on_keyboard_show,
                                         name: UIKeyboardDidShowNotification,
                                       object: nil
  NSNotificationCenter.defaultCenter.addObserver self,
                                     selector: :on_keyboard_hide,
                                         name: UIKeyboardDidHideNotification,
                                       object: nil
  NSNotificationCenter.defaultCenter.addObserver self,
                                     selector: :keyboard_will_show,
                                         name: UIKeyboardWillShowNotification,
                                       object: nil
  NSNotificationCenter.defaultCenter.addObserver self,
                                     selector: :keyboard_will_hide,
                                         name: UIKeyboardWillHideNotification,
                                       object: nil
end