Last active
November 1, 2022 02:47
-
-
Save levymetal/bf384338d61688183cc68cc32d724d41 to your computer and use it in GitHub Desktop.
How to show the keyboard accessory bar in Ionic 2.0.0-rc.1. Full blog post here: http://christianvarga.com/how-to-show-the-ios-keyboard-accessory-bar-in-ionic-2-0-0-rc-1/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StatusBar, Splashscreen, Keyboard } from 'ionic-native'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { Platform } from 'ionic-angular'; | |
import { StatusBar, Splashscreen, Keyboard } from 'ionic-native'; | |
@Component({ | |
template: `<ion-nav [root]="rootPage"></ion-nav>` | |
}) | |
export class myApp { | |
rootPage = TabsPage; | |
constructor(platform: Platform) { | |
platform.ready().then(() => { | |
// Okay, so the platform is ready and our plugins are available. | |
// Here you can do any higher level native things you might need. | |
StatusBar.styleDefault(); | |
Splashscreen.hide(); | |
Keyboard.hideKeyboardAccessoryBar(false); | |
}); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.cordova && window.cordova.plugins.Keyboard) { | |
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment