Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 1.75 KB

README_Chinese.md

File metadata and controls

61 lines (41 loc) · 1.75 KB

JPFPSStatus

Pod Version Pod Platform Pod License

README English

JPFPSStatus是用来显示FPS状态在iOS状态栏,FPS是一秒钟渲染多少帧 Frame Per Second = FPS,FPS的值最佳为60左右,一般来说小于这个值就较为卡顿了。

Podfile

platform :ios, '7.0'
pod 'JPFPSStatus', '~> 0.1.1'

######使用: 注意请在DEBUG模式下使用 JPFPSStatus 在AppDelegate.m里面加入下面代码就可以了

#import "JPFPSStatus.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
#if defined(DEBUG)||defined(_DEBUG)
    [[JPFPSStatus sharedInstance] open];
#endif
    return YES;
}

#if defined(DEBUG)||defined(_DEBUG)
	[[JPFPSStatus sharedInstance] openWithHandler:^(NSInteger fpsValue) {
		NSLog(@"fpsvalue %@",@(fpsValue));
	}];
#endif

不需要的时候可以关闭它在状态栏显示

#if defined(DEBUG)||defined(_DEBUG)
    [[JPFPSStatus sharedInstance] close];
#endif

JPFPSStatus的显示效果如图:

Licenses

All source code is licensed under the MIT License.