UNPKG

@tdallau/nativescript

Version:

some helper functions for nativescript

34 lines 1.13 kB
import { Application } from "@nativescript/core"; var Statusbar = /** @class */ (function () { function Statusbar() { } Statusbar.hide = function (animationType) { if (animationType === void 0) { animationType = 'None'; } this.setStatus(true, animationType); }; Statusbar.show = function (animationType) { if (animationType === void 0) { animationType = 'None'; } this.setStatus(false, animationType); }; Statusbar.setStatus = function (status, animationType) { var animation = this.getAnimation(animationType); Application.ios.nativeApp.setStatusBarHiddenWithAnimation(status, animation); }; Statusbar.getAnimation = function (animationType) { var animation = 0; switch (animationType) { case 'Fade': animation = 1; break; case 'Slide': animation = 2; default: animation = 0; break; } return animation; }; return Statusbar; }()); export { Statusbar }; //# sourceMappingURL=statusbar.js.map