本文整理匯總了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);
}