在屏幕上的iOS上显示FPS(不带乐器) [英] Display FPS on iOS onscreen (without Instruments)

查看:183
本文介绍了在屏幕上的iOS上显示FPS(不带乐器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WWDC 2012会话506中,它们每秒在应用程序中的UILabel上显示帧,而不必使用附加到乐器的Core Animation Profiler.我想这样做是为了方便起见,并让我团队中的其他成员在实际场景中使用FPS时对其进行监视.不幸的是,会话506未包含在WWDC '12示例代码中.

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.

有人知道该怎么做吗?我知道Cocos2D在其CCDirector中具有此功能,但是他们的方法似乎特定于Cocos2D渲染的工作方式.不必成为公共API,因为我不会将此代码发送给客户.

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.

推荐答案

我找到了一个可在iOS上测量FPS的开源组件: https://github.com/RolandasRazma/RRFPSBar

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

这篇关于在屏幕上的iOS上显示FPS(不带乐器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆