當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript frame.topmost函數代碼示例

本文整理匯總了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;
    }
  }
}
開發者ID:NathanWalker,項目名稱:NativeScript,代碼行數:8,代碼來源:issue-1657-ios.ts

示例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;
   }
 }
開發者ID:CNSKnight,項目名稱:angular2-seed-advanced,代碼行數:8,代碼來源:actionbar.util.ts

示例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';
    }
}
開發者ID:ArronNandoTech,項目名稱:NativeScript-Demo,代碼行數:13,代碼來源:navigation.ts

示例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;
}
開發者ID:ouyang789987,項目名稱:NativeScript,代碼行數:32,代碼來源:navigation-tests.ts

示例6: viewSegmentBar

	public viewSegmentBar() {
		let navigationEntry = {
			moduleName: 'pages/segmentbar',
			clearHistory: true
		};
		topmost().navigate(navigationEntry);
	}
開發者ID:NathanWalker,項目名稱:theme,代碼行數:7,代碼來源:navigation-vm.ts

示例7: viewTabs

	public viewTabs() {
		let navigationEntry = {
			moduleName: 'pages/tabs',
			clearHistory: true
		};
		topmost().navigate(navigationEntry);
	}
開發者ID:NathanWalker,項目名稱:theme,代碼行數:7,代碼來源:navigation-vm.ts

示例8: viewSearch

	public viewSearch() {
		let navigationEntry = {
			moduleName: 'pages/search',
			clearHistory: true
		};
		topmost().navigate(navigationEntry);
	}
開發者ID:NathanWalker,項目名稱:theme,代碼行數:7,代碼來源:navigation-vm.ts

示例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;
}
開發者ID:ahmadissa2,項目名稱:NativeScript,代碼行數:26,代碼來源:testRunner.ts

示例10: viewSwitches

	public viewSwitches() {
		let navigationEntry = {
			moduleName: 'pages/switches',
			clearHistory: true
		};
		topmost().navigate(navigationEntry);
	}
開發者ID:NathanWalker,項目名稱:theme,代碼行數:7,代碼來源:navigation-vm.ts


注:本文中的ui/frame.topmost函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。