Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1235] iOS: Missing KeyboardWillShow / KeyboardWillHide events

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-06-08T12:34:12.000+0000
Affected Version/sRelease 1.5.0
Fix Version/sn/a
ComponentsiOS
Labelsapi
ReporterRalf Pfeiffer
AssigneeNeeraj Gupta
Created2011-04-15T02:47:21.000+0000
Updated2017-03-09T21:29:15.000+0000

Description

I need a simple way to know when the keyboard will show or hide so that I can move my layout around.

Proposed usage:


Ti.App.addEventListener('keyboard-will-show', function(e){
    if (e.source == myTextView) doSomething();
    else if (e.source == myOtherTextView) doSomethingElse();
});

Ti.App.addEventListener('keyboard-will-hide', function(e){
    if (e.source == myTextView) doSomething();
    else if (e.source == myOtherTextView) doSomethingElse();
});

i can haz?

Comments

  1. Thomas Aylott 2011-04-15

       [[NSNotificationCenter defaultCenter] addObserver:self
           selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
       [[NSNotificationCenter defaultCenter] addObserver:self
           selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
       
  2. Stephen Tramer 2011-04-15

    Curiously, still doesn't exist even after the keyboard updates.

  3. Dawson Toth 2012-06-08

    Taken care of by [TIMOB-7724]: Ti.App.addEventListener('keyboardFrameChanged, ...);
  4. Neeraj Gupta 2012-06-08

    Duplicate of TIMOB-7724.
  5. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source