Skip to content

可拖动的 iOS 页面 FPS 监控器 Simple FPS Indicator

License

Notifications You must be signed in to change notification settings

cheenbee/AYYFPSIndicator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AYYFPSIndicator

Simple FPS Indicator FPS = Frames Per Second , 每秒显示帧数 - 帧率测量单位,详情请参阅 FPS 维基百科

使用方法

请在 DEBUG 模式下使用 FPS 监控

1. 默认位置显示 FPS 值
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    
#ifdef DEBUG
    // 1. 默认位置开启 FPS 监听,可拖动
    [[AYYFPSIndicator sharedInstance] start];
#endif
    return YES;
}

FPSDemo1 set up-w300

2. statusBar 显示 FPS值
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    
#ifdef DEBUG
    // 2. 在 statusBar 显示 FPS
    [[AYYFPSIndicator sharedInstance] start];
    [AYYFPSIndicator sharedInstance].indicatorPosition = AYYFPSIndicatorPositionStatusBar;
#endif
    return YES;
}

FPSDemo2 set up-w300

参阅

iOS-Core-Animation-Advanced-Techniques
YYFPSLabel
WWFPSIndicator

About

可拖动的 iOS 页面 FPS 监控器 Simple FPS Indicator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published