mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 11:17:04 +08:00
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { EventData } from "tns-core-modules/data/observable";
|
|
var frameModule = require("tns-core-modules/ui/frame");
|
|
var platform = require("tns-core-modules/platform");
|
|
var defaultSpeed = -1;
|
|
|
|
export function navigatingTo(args: EventData) {
|
|
if (platform.device.os === platform.platformNames.ios) {
|
|
if (defaultSpeed === -1) {
|
|
defaultSpeed = frameModule.topmost().ios.controller.view.layer.speed;
|
|
frameModule.topmost().ios.controller.navigationBar.translucent = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
export function onTap() {
|
|
frameModule.topmost().navigate({
|
|
moduleName: "issues/sub-1657-page"
|
|
});
|
|
}
|
|
|
|
export function changeTranslucent() {
|
|
if (platform.device.os === platform.platformNames.ios) {
|
|
frameModule.topmost().ios.controller.navigationBar.translucent = frameModule.topmost().ios.controller.navigationBar.translucent === true ? false : true;
|
|
}
|
|
}
|
|
|
|
export function changeLayerSpeed() {
|
|
frameModule.topmost().ios.controller.view.layer.speed = 0.01;
|
|
}
|
|
|
|
export function defaultLayerSpeed() {
|
|
frameModule.topmost().ios.controller.view.layer.speed = defaultSpeed;
|
|
}
|