hualuoshuijia

github地址https://github.com/jvjishou/FHHFPSIndicator

1.使用cocoapods  pod \'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];
之后添加。

 

分类:

技术点:

相关文章:

  • 2022-01-09
  • 2021-07-26
  • 2022-12-23
  • 2021-12-30
  • 2021-11-27
  • 2021-08-25
  • 2022-02-07
猜你喜欢
  • 2021-11-17
  • 2021-11-23
  • 2021-08-02
  • 2021-08-22
相关资源
相似解决方案