本文整理汇总了TypeScript中ui/frame.topmost函数的典型用法代码示例。如果您正苦于以下问题:TypeScript topmost函数的具体用法?TypeScript topmost怎么用?TypeScript topmost使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了topmost函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: navigatingTo
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;
}
}
}
示例2: actionBarSetStatusBarStyle
/**
* Programmatically remove all buttons from the ActionBar
*/
public static actionBarSetStatusBarStyle(style: number) {
if (topmost().ios) {
let navigationBar = topmost().ios.controller.navigationBar;
// 0: default
// 1: light
navigationBar.barStyle = style;
}
}
开发者ID:NathanWalker,项目名称:nativescript-swiss-army-knife,代码行数:11,代码来源:nativescript-swiss-army-knife.ios.ts
示例3: STATUSBAR_STYLE
public static STATUSBAR_STYLE(style: number) {
if (topmost().ios) {
let navigationBar = topmost().ios.controller.navigationBar;
// 0: default
// 1: light
navigationBar.barStyle = style;
}
}
示例4: configurePlatformSpecificFeatures
export function configurePlatformSpecificFeatures() {
// Enable platform specific feature (in this case Android page caching)
if (frameModule.topmost().android) {
frameModule.topmost().android.cachePagesOnNavigate = true;
}
var iosFrame = frameModule.topmost().ios;
if (iosFrame) {
// Fix status bar color and nav bar vidibility
iosFrame.controller.view.window.backgroundColor = UIColor.blackColor();
iosFrame.navBarVisibility = 'never';
}
}
示例5: function
export var test_ClearHistoryWithTransitionDoesNotBreakNavigation = function () {
let topmost = topmostFrame();
let mainTestPage = topmost.currentPage;
let mainPageFactory = function (): Page {
return mainTestPage;
};
// Go to details-page
topmost.navigate({ create: pageFactory, clearHistory: false });
TKUnit.waitUntilReady(() => { return topmost.currentPage !== mainTestPage; });
// Go back to main-page with clearHistory
var detailsPage: Page;
detailsPage = topmost.currentPage;
topmost.transition = { name: "fade" };
topmost.navigate({ create: mainPageFactory, clearHistory: true });
TKUnit.waitUntilReady(() => { return topmost.currentPage === mainTestPage; });
// Go to details-page AGAIN
topmost.navigate({ create: pageFactory, clearHistory: false });
TKUnit.waitUntilReady(() => { return topmost.currentPage !== mainTestPage; });
// Go back to main-page with clearHistory
detailsPage = topmost.currentPage;
topmost.transition = { name: "fade" };
topmost.navigate({ create: mainPageFactory, clearHistory: true });
TKUnit.waitUntilReady(() => { return topmost.currentPage === mainTestPage; });
// Clean up
topmost.transition = undefined;
}
示例6: viewSegmentBar
public viewSegmentBar() {
let navigationEntry = {
moduleName: 'pages/segmentbar',
clearHistory: true
};
topmost().navigate(navigationEntry);
}
示例7: viewTabs
public viewTabs() {
let navigationEntry = {
moduleName: 'pages/tabs',
clearHistory: true
};
topmost().navigate(navigationEntry);
}
示例8: viewSearch
public viewSearch() {
let navigationEntry = {
moduleName: 'pages/search',
clearHistory: true
};
topmost().navigate(navigationEntry);
}
示例9: printRunTestStats
function printRunTestStats() {
var j;
var testsCount = 0;
var failedTestCount = 0;
var failedTestInfo = [];
for (j = 0; j < testsQueue.length; j++) {
if (testsQueue[j].isTest) {
testsCount++;
if (!testsQueue[j].isPassed) {
failedTestCount++;
failedTestInfo.push(testsQueue[j].testName + " FAILED: " + testsQueue[j].errorMessage);
}
}
}
let finalMessage = "=== ALL TESTS COMPLETE === \n" + (testsCount - failedTestCount) + " OK, " + failedTestCount + " failed" + "\n";
TKUnit.write(finalMessage, messageType.info);
for (j = 0; j < failedTestInfo.length; j++) {
let failureMessage = failedTestInfo[j];
TKUnit.write(failureMessage, messageType.error);
finalMessage += "\n" + failureMessage;
}
let messageContainer = new TextView();
messageContainer.text = finalMessage;
topmost().currentPage.content = messageContainer;
}
示例10: viewSwitches
public viewSwitches() {
let navigationEntry = {
moduleName: 'pages/switches',
clearHistory: true
};
topmost().navigate(navigationEntry);
}