All Projects → smclab → TiSoftKeyboard

smclab / TiSoftKeyboard

Licence: LGPL-2.1 license
TiSoftKeyboard enables some important soft keyboard features currently missing from Titanium SDK (iOS)

Programming Languages

objective c
16641 projects - #2 most used programming language
python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language

TiSoftKeyboard

Built for Titanium SDK Available through gitTio

Some missing soft keyboard events and features implemented! (iOS only)

Attention: if you want to mimic the interaction of the iMessage compose view, you should have a look at TiDAKeyboardControl which does exactly this!

Installation

You can install this module using gitTio with

gittio install it.smc.softkeyboard

Alternatively you can download a specific release for manual installation.

Example

You can run the example running the following command

gittio demo it.smc.softkeyboard

The source for this demo application can be found in the example folder.

Keyboard dismiss (iOS 7)

// Support for ListView, TableView, ScrollView

var scrollView = Ti.UI.createScrollView({
	//keyboardDismissMode: 'none' // default
	//keyboardDismissMode: 'ondrag'
	keyboardDismissMode: 'interactive'
});

Events

var softkeyboard = require('it.smc.softkeyboard');

softkeyboard.addEventListener('keyboardshow', logInfo);
softkeyboard.addEventListener('keyboardhide', logInfo);
softkeyboard.addEventListener('keyboardchange', logInfo);

function logInfo(event) {
	Ti.API.error(event.keyboardWidth + 'x' + event.keyboardHeight);
}

Credits

Kudos to @funkbit for its initial development of TIKeyboardEvents.

Humbly made by the spry ladies and gents at SMC.

License

This library, TiSoftKeyboard, is free software ("Licensed Software"); you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; including but not limited to, the implied warranty of MERCHANTABILITY, NONINFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].