当前位置: 首页>>代码示例>>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;未经允许,请勿转载。