From b2879601b634b551ba05c1670cb911046d9a29c6 Mon Sep 17 00:00:00 2001 From: Roberto Zaratin Date: Wed, 19 Mar 2014 17:30:20 +0100 Subject: [PATCH 1/2] Update index.md --- documentation/index.md | 69 +++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 21 deletions(-) diff --git a/documentation/index.md b/documentation/index.md index 5401b78..6f03f0e 100644 --- a/documentation/index.md +++ b/documentation/index.md @@ -2,38 +2,65 @@ ## Description -TODO: Enter your module description here +[rls]: https://github.com/smclab/TiSoftKeyboard/releases +[exm]: https://github.com/smclab/TiSoftKeyboard/tree/master/example -## Accessing the TiSoftKeyboard Module - -To access this module from JavaScript, you would do the following: +Some missing soft keyboard events and features implemented! (iOS only) - var TiSoftKeyboard = require("it.smc.softkeyboard"); +***Attention:*** if you want to mimic the interaction of the iMessage compose view, you should have a look at [TiDAKeyboardControl](https://github.com/smclab/TiDAKeyboardControl) which does exactly this! -The TiSoftKeyboard variable is a reference to the Module object. - -## Reference +## Accessing the TiSoftKeyboard Module -TODO: If your module has an API, you should document -the reference here. +To access this module from JavaScript, you would do the following: -### ___PROJECTNAMEASIDENTIFIER__.function + var softkeyboard = require('it.smc.softkeyboard'); -TODO: This is an example of a module function. +The softKeyboard variable is a reference to the Module object. -### ___PROJECTNAMEASIDENTIFIER__.property +## Usage +####Keyboard dismiss (iOS 7) +```js +// Support for ListView, TableView, ScrollView + +var scrollView = Ti.UI.createScrollView({ + //keyboardDismissMode: 'none' // default + //keyboardDismissMode: 'ondrag' + keyboardDismissMode: 'interactive' +}); +``` +####Events + +```js + +softkeyboard.addEventListener('keyboardshow', logInfo); +softkeyboard.addEventListener('keyboardhide', logInfo); +softkeyboard.addEventListener('keyboardchange', logInfo); + +function logInfo(event) { + Ti.API.error(event.keyboardWidth + 'x' + event.keyboardHeight); +} +``` +## Author -TODO: This is an example of a module property. +Kudos to @funkbit for its initial development of [TIKeyboardEvents](https://github.com/funkbit/TIKeyboardEvents). -## Usage +Humbly made by the spry ladies and gents at SMC. -TODO: Enter your usage example here +## License -## Author +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](http://www.gnu.org/licenses/lgpl-2.1.html) as published by the +Free Software Foundation; either version 2.1 of the License, or (at your +option) any later version. -TODO: Enter your author name, email and other contact -details you want to share here. +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. -## License +You should have received a copy of the [GNU Lesser General Public +License](http://www.gnu.org/licenses/lgpl-2.1.html) along with this library; if +not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth +Floor, Boston, MA 02110-1301 USA -TODO: Enter your license/legal information here. From 7f4f74b065d4bee40a22a7afea4d13338351140d Mon Sep 17 00:00:00 2001 From: Roberto Zaratin Date: Wed, 19 Mar 2014 18:30:44 +0100 Subject: [PATCH 2/2] Update index.md --- documentation/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/documentation/index.md b/documentation/index.md index 6f03f0e..e5e863d 100644 --- a/documentation/index.md +++ b/documentation/index.md @@ -13,12 +13,12 @@ Some missing soft keyboard events and features implemented! (iOS only) To access this module from JavaScript, you would do the following: - var softkeyboard = require('it.smc.softkeyboard'); + var Softkeyboard = require('it.smc.softkeyboard'); The softKeyboard variable is a reference to the Module object. ## Usage -####Keyboard dismiss (iOS 7) +###Keyboard dismiss (iOS 7) ```js // Support for ListView, TableView, ScrollView @@ -28,13 +28,13 @@ var scrollView = Ti.UI.createScrollView({ keyboardDismissMode: 'interactive' }); ``` -####Events +###Events ```js -softkeyboard.addEventListener('keyboardshow', logInfo); -softkeyboard.addEventListener('keyboardhide', logInfo); -softkeyboard.addEventListener('keyboardchange', logInfo); +Softkeyboard.addEventListener('keyboardshow', logInfo); +Softkeyboard.addEventListener('keyboardhide', logInfo); +Softkeyboard.addEventListener('keyboardchange', logInfo); function logInfo(event) { Ti.API.error(event.keyboardWidth + 'x' + event.keyboardHeight);