Display FPS on iOS onscreen (without Instruments)

MaxGabriel picture MaxGabriel · Mar 2, 2013 · Viewed 16.1k times · Source

In WWDC 2012 Session 506, they display the frames per second on a UILabel in the application, without having to use the Core Animation profiler attached to instruments. I would like to do this for convenience as well as to let other members of my team monitor FPS as they use the app in real-world scenarios. Unfortunately, session 506 isn't included the the WWDC '12 sample code.

Does anyone know how to do this? I know that Cocos2D has this capability in their CCDirector, but their approach seems specific to how Cocos2D rendering works. It is not necessary for it to be public API because I will not be shipping this code to customers.

Answer

MaxGabriel picture MaxGabriel · Mar 16, 2013

I've found an open-source component that measures FPS on iOS: https://github.com/RolandasRazma/RRFPSBar