Skip to content

Commit ec2ce7f

Browse files
Profile iOS keypoints in the UINavigationViewController (NativeScript#5108)
1 parent 13e8bfb commit ec2ce7f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

tns-core-modules/application/application.ios.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export * from "./application-common";
1717
import { Frame, View, NavigationEntry } from "../ui/frame";
1818
import { ios } from "../ui/utils";
1919
import * as utils from "../utils/utils";
20+
import { profile } from "../profiling";
2021

2122
class Responder extends UIResponder {
2223
//
@@ -35,6 +36,7 @@ class Window extends UIWindow {
3536
return window;
3637
}
3738

39+
@profile
3840
public layoutSubviews(): void {
3941
if (utils.ios.MajorVersion < 9) {
4042
ios._layoutRootView(this.content, utils.ios.getter(UIScreen, UIScreen.mainScreen).bounds);
@@ -112,6 +114,7 @@ class IOSApplication implements IOSApplicationDefinition {
112114
}
113115
}
114116

117+
@profile
115118
private didFinishLaunchingWithOptions(notification: NSNotification) {
116119
this._window = <Window>Window.alloc().initWithFrame(utils.ios.getter(UIScreen, UIScreen.mainScreen).bounds);
117120
this._window.backgroundColor = utils.ios.getter(UIColor, UIColor.whiteColor);
@@ -146,6 +149,7 @@ class IOSApplication implements IOSApplicationDefinition {
146149
this._window.makeKeyAndVisible();
147150
}
148151

152+
@profile
149153
private didBecomeActive(notification: NSNotification) {
150154
let ios = utils.ios.getter(UIApplication, UIApplication.sharedApplication);
151155
let object = this;

tns-core-modules/ui/frame/frame.ios.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ class UINavigationControllerImpl extends UINavigationController {
512512
}
513513
}
514514

515+
@profile
515516
public viewDidLayoutSubviews(): void {
516517
let owner = this._owner.get();
517518
if (owner) {
@@ -551,6 +552,7 @@ class UINavigationControllerImpl extends UINavigationController {
551552
});
552553
}
553554

555+
@profile
554556
public pushViewControllerAnimated(viewController: UIViewController, animated: boolean): void {
555557
let navigationTransition = <NavigationTransition>viewController[TRANSITION];
556558
if (traceEnabled()) {
@@ -568,6 +570,7 @@ class UINavigationControllerImpl extends UINavigationController {
568570
});
569571
}
570572

573+
@profile
571574
public setViewControllersAnimated(viewControllers: NSArray<any>, animated: boolean): void {
572575
let viewController = viewControllers.lastObject;
573576
let navigationTransition = <NavigationTransition>viewController[TRANSITION];

tns-core-modules/ui/page/page.ios.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class UIViewControllerImpl extends UIViewController {
7272
return controller;
7373
}
7474

75+
@profile
7576
public viewDidLayoutSubviews() {
7677
let owner = this._owner.get();
7778
if (!owner) {
@@ -131,6 +132,7 @@ class UIViewControllerImpl extends UIViewController {
131132
}
132133
}
133134

135+
@profile
134136
public viewWillAppear(animated: boolean): void {
135137
super.viewWillAppear(animated);
136138
this.shown = false;
@@ -189,6 +191,7 @@ class UIViewControllerImpl extends UIViewController {
189191
page._enableLoadedEvents = false;
190192
}
191193

194+
@profile
192195
public viewDidAppear(animated: boolean): void {
193196
super.viewDidAppear(animated);
194197
this.shown = true;
@@ -242,6 +245,7 @@ class UIViewControllerImpl extends UIViewController {
242245
}
243246
};
244247

248+
@profile
245249
public viewWillDisappear(animated: boolean): void {
246250
super.viewWillDisappear(animated);
247251

@@ -270,6 +274,7 @@ class UIViewControllerImpl extends UIViewController {
270274
page._viewWillDisappear = true;
271275
}
272276

277+
@profile
273278
public viewDidDisappear(animated: boolean): void {
274279
super.viewDidDisappear(animated);
275280

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy