写了一个检测FPS的控件 https://github.com/ray1942/RFPS
使用方式很简单,导入进去之后,在AppDelegate的
添加一句
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
//检测FPS
RFPS.trackFPS()
return true
}
显示效果如下: