FHHFPSIndicator
FHHFPSIndicator 可在您的 APP 中显示 FPS。
演示项目
查看 Demo/FHHFPSIndicatorDemo
安装
CocoaPods
- 将
pod "FHHFPSIndicator"
添加到您的 Podfile 中。 - 运行
pod install
或pod update
。 - 导入
<FHHFPSIndicator/FHHFPSIndicator.h>
。
手动
- 将
FHHFPSIndicator
文件夹下的所有源文件拖入项目 - 导入主头文件:
#import "FHHFPSIndicator.h"
### 讲解在关键窗口变为可视状态后的调用指令;
建议:在调试模式下使用 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; }
许可证
FHHFPSIndicator 在 MIT 许可证下提供。查看 LICENSE 文件获取详细信息。
--- 中文介绍 ============== FHHFPSIndicator 可以用于在 iOS 开发中显示当前视图的 FPS。
演示项目
查看并运行 Demo/FHHFPSIndicatorDemo
安装
CocoaPods
- 在 Podfile 中添加
pod "FHHFPSIndicator"
。 - 执行
pod install
或pod update
。 - 导入
<FHHFPSIndicator/FHHFPSIndicator.h>
。
手动安装
- 将
FHHFPSIndicator
文件夹中的所有源代码拖入项目中。 - 导入主头文件:
#import "FHHFPSIndicator.h"
。
### 使用说明 在 AppDelegate.m 文件的 didFinishLaunchingWithOptions 方法中,当执行了 [self.window makeKeyAndVisible];
后,调用 [[FHHFPSIndicator sharedFPSIndicator] show]
。
建议:在调试模式下使用显示 FPS 功能。
#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; }
许可证
FHHFPSIndicator 采用 MIT 许可证,详细信息请参阅 LICENSE 文件。