Latest 0.0.1
Homepage https://github.com/kysonyangs/YSFPSStatus
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation, UIKit
Authors

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

使用

YSFPSStatus 直接使用

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

// 只在DEBUG模式下使用
#if defined(DEBUG)||defined(_DEBUG)
    [[YSFPSStatus sharedInstance] open];
#endif

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

    return YES;
}

YSFPSStatus

YSFPSLabel 自定义使用

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    ...

#if defined(DEBUG)||defined(_DEBUG)
    YSFPSLabel *fpsLabel = [[YSFPSLabel alloc] initWithFrame:CGRectMake(10, 300, 60, 30)];
//    fpsLabel.fpsHandler = ^(NSInteger fpsValue) {
//        NSLog(@"fpsvalue %@",@(fpsValue));
//    };
    [self.window.rootViewController.view addSubview:fpsLabel];
#endif

    return YES;
}

![](https://github.com/kysonyangs/YSFPSStatus/blob/master/screenshot/on_view.png)

Latest podspec

{
    "name": "YSFPSStatus",
    "version": "0.0.1",
    "summary": "show FPS status on StatusBar or custom",
    "homepage": "https://github.com/kysonyangs/YSFPSStatus",
    "license": "MIT",
    "authors": {
        "kyson": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kysonyangs/YSFPSStatus.git",
        "tag": "0.0.1"
    },
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "YSFPSStatus/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This