Anyway see the runtime of a method in Xcode?

I need to debug the specific ViewController that I have, and I cannot pinpoint what causes my lag in the view.

Is there any debugging tool in Xcode that will show me how long my methods have been running so that I can at least find the right place to run?

+5
source share
2 answers

The tools have a built-in profiler with iOS 4.0 (before which you used a stand-alone profiler tool called Shark).

Here is a little tutorial to help you get started: http://blancer.com/tutorials/flex/78335/apple-profiling-tools-shark-is-out-instruments-is-in/

If you do not know about Tools, you should. This is how you know what really happens inside your code when it runs.

+10
source

In addition to Time Profiler, as Dan suggests, you can also use the Sampler tool, which usually stops the program at set intervals and writes information about the stack trace for each program stream. You can use this information to determine where the runtime is spent in your program, and to improve the code to reduce run time.

The main difference between the sampler and time sampler:

Sampler , Time Profiler / .

+2

All Articles