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