FHHFPSIndicator提供了三种位置显示FPS值,默认是’中偏下’,此外还有‘中偏左’、‘中偏右’。iPhone4、5系列手机建议采用默认值来显示调试。
集成方法和使用步骤:
将`FHHFPSIndicator`文件夹中的所有源代码拽入项目中。
然后在AppDelegate.m文件中添加以下代码即可#if defined(DEBUG) || defined(_DEBUG)
#import “FHHFPSIndicator.h”
#endif
– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
[self.window makeKeyAndVisible];
// add the follwing code after the window become keyAndVisible
#if defined(DEBUG) || defined(_DEBUG)
[[FHHFPSIndicator sharedFPSIndicator] show];
// [FHHFPSIndicator sharedFPSIndicator].fpsLabelPosition = FPSIndicatorPositionTopRight;
#endif
self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[HomeViewController alloc] init]];
return YES;
}
注意:必须在:[self.window makeKeyAndVisible];
之后添加。
详情请参考GitHub项目地址。
相关资源:求解偏微分方程的数学软件Fastflo-教育工具类资源
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!