Simple FPS Indicator FPS = Frames Per Second , 每秒显示帧数 - 帧率测量单位,详情请参阅 FPS 维基百科
请在 DEBUG 模式下使用 FPS 监控
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
#ifdef DEBUG
// 1. 默认位置开启 FPS 监听,可拖动
[[AYYFPSIndicator sharedInstance] start];
#endif
return YES;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
#ifdef DEBUG
// 2. 在 statusBar 显示 FPS
[[AYYFPSIndicator sharedInstance] start];
[AYYFPSIndicator sharedInstance].indicatorPosition = AYYFPSIndicatorPositionStatusBar;
#endif
return YES;
}
iOS-Core-Animation-Advanced-Techniques
YYFPSLabel
WWFPSIndicator