Stack of called functions ios

2019-08-28 20:58发布

When I present UIViewController in my app called a lot of methods (please don't say me read UIViewController life circle), is there any way to get a list of called methods in xCode?

2条回答
ゆ 、 Hurt°
2楼-- · 2019-08-28 21:23

Set a breakpoint in the [YourViewController viewDidLoad] method and then call stack will be shown within Xcode Debug Navigator:

enter image description here

(image taken from here).

查看更多
Lonely孤独者°
3楼-- · 2019-08-28 21:31

And of course you can always use:

NSLog(@"call stack symbols: %@", [NSThread callStackSymbols]);
查看更多
登录 后发表回答