mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Profile iOS keypoints in the UINavigationViewController (#5108)
This commit is contained in:
@ -17,6 +17,7 @@ export * from "./application-common";
|
||||
import { Frame, View, NavigationEntry } from "../ui/frame";
|
||||
import { ios } from "../ui/utils";
|
||||
import * as utils from "../utils/utils";
|
||||
import { profile } from "../profiling";
|
||||
|
||||
class Responder extends UIResponder {
|
||||
//
|
||||
@ -35,6 +36,7 @@ class Window extends UIWindow {
|
||||
return window;
|
||||
}
|
||||
|
||||
@profile
|
||||
public layoutSubviews(): void {
|
||||
if (utils.ios.MajorVersion < 9) {
|
||||
ios._layoutRootView(this.content, utils.ios.getter(UIScreen, UIScreen.mainScreen).bounds);
|
||||
@ -112,6 +114,7 @@ class IOSApplication implements IOSApplicationDefinition {
|
||||
}
|
||||
}
|
||||
|
||||
@profile
|
||||
private didFinishLaunchingWithOptions(notification: NSNotification) {
|
||||
this._window = <Window>Window.alloc().initWithFrame(utils.ios.getter(UIScreen, UIScreen.mainScreen).bounds);
|
||||
this._window.backgroundColor = utils.ios.getter(UIColor, UIColor.whiteColor);
|
||||
@ -146,6 +149,7 @@ class IOSApplication implements IOSApplicationDefinition {
|
||||
this._window.makeKeyAndVisible();
|
||||
}
|
||||
|
||||
@profile
|
||||
private didBecomeActive(notification: NSNotification) {
|
||||
let ios = utils.ios.getter(UIApplication, UIApplication.sharedApplication);
|
||||
let object = this;
|
||||
|
@ -512,6 +512,7 @@ class UINavigationControllerImpl extends UINavigationController {
|
||||
}
|
||||
}
|
||||
|
||||
@profile
|
||||
public viewDidLayoutSubviews(): void {
|
||||
let owner = this._owner.get();
|
||||
if (owner) {
|
||||
@ -551,6 +552,7 @@ class UINavigationControllerImpl extends UINavigationController {
|
||||
});
|
||||
}
|
||||
|
||||
@profile
|
||||
public pushViewControllerAnimated(viewController: UIViewController, animated: boolean): void {
|
||||
let navigationTransition = <NavigationTransition>viewController[TRANSITION];
|
||||
if (traceEnabled()) {
|
||||
@ -568,6 +570,7 @@ class UINavigationControllerImpl extends UINavigationController {
|
||||
});
|
||||
}
|
||||
|
||||
@profile
|
||||
public setViewControllersAnimated(viewControllers: NSArray<any>, animated: boolean): void {
|
||||
let viewController = viewControllers.lastObject;
|
||||
let navigationTransition = <NavigationTransition>viewController[TRANSITION];
|
||||
|
@ -72,6 +72,7 @@ class UIViewControllerImpl extends UIViewController {
|
||||
return controller;
|
||||
}
|
||||
|
||||
@profile
|
||||
public viewDidLayoutSubviews() {
|
||||
let owner = this._owner.get();
|
||||
if (!owner) {
|
||||
@ -131,6 +132,7 @@ class UIViewControllerImpl extends UIViewController {
|
||||
}
|
||||
}
|
||||
|
||||
@profile
|
||||
public viewWillAppear(animated: boolean): void {
|
||||
super.viewWillAppear(animated);
|
||||
this.shown = false;
|
||||
@ -189,6 +191,7 @@ class UIViewControllerImpl extends UIViewController {
|
||||
page._enableLoadedEvents = false;
|
||||
}
|
||||
|
||||
@profile
|
||||
public viewDidAppear(animated: boolean): void {
|
||||
super.viewDidAppear(animated);
|
||||
this.shown = true;
|
||||
@ -242,6 +245,7 @@ class UIViewControllerImpl extends UIViewController {
|
||||
}
|
||||
};
|
||||
|
||||
@profile
|
||||
public viewWillDisappear(animated: boolean): void {
|
||||
super.viewWillDisappear(animated);
|
||||
|
||||
@ -270,6 +274,7 @@ class UIViewControllerImpl extends UIViewController {
|
||||
page._viewWillDisappear = true;
|
||||
}
|
||||
|
||||
@profile
|
||||
public viewDidDisappear(animated: boolean): void {
|
||||
super.viewDidDisappear(animated);
|
||||
|
||||
|
Reference in New Issue
Block a user