Code Monkey home page Code Monkey logo

fhhfpsindicator's Introduction

FHHFPSIndicator

License MIT  CocoaPods  CocoaPods 

FHHFPSIndicator can show FPS in your APP

Demo Project

See Demo/FHHFPSIndicatorDemo






Installation

CocoaPods

  1. Add pod "FHHFPSIndicator" to your Podfile.
  2. Run pod install or pod update.
  3. Import <FHHFPSIndicator/FHHFPSIndicator.h>.

Manually

  1. Drag all source files under floder FHHFPSIndicator to your project
  2. Import the main header file:#import "FHHFPSIndicator.h"

###Instruction you shoud call after the keyWindw becomes keyAndVisible;

Advice:Use FHHFPSIndicator in DEBUG mode

add the code in 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;
}

License

FHHFPSIndicator is provided under the MIT license. See LICENSE file for details.


--- 中文介绍 ============== FHHFPSIndicator可以用于在iOS开发中显示当前画面的FPS.

演示项目

查看并运行 Demo/FHHFPSIndicatorDemo






安装

CocoaPods

  1. 在 Podfile 中添加 pod "FHHFPSIndicator"
  2. 执行 pod installpod update
  3. 导入 <FHHFPSIndicator/FHHFPSIndicator.h>。

手动安装

  1. FHHFPSIndicator文件夹中的所有源代码拽入项目中。
  2. 导入主头文件:#import "FHHFPSIndicator.h"

###使用说明 在AppDelegate.m文件中的didFinishLaunchingWithOptions方法中,当执行了[self.window makeKeyAndVisible];后,调用[[FHHFPSIndicator sharedFPSIndicator] show]
建议:在DEBUG模式下使用显示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 文件。

fhhfpsindicator's People

Contributors

002and001 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.