Display FPS on iOS onscreen (without Instruments)

北战南征 提交于 2019-12-06 21:20:05

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/15169342/display-fps-on-ios-onscreen-without-instruments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!