- UIDebuggingInformationOverlay调试视
- iOS UI调试_UIDebuggingInformationO
- UIDebuggingInformationOverlay调试信
- Apple隐藏的Debug利器UIDebuggingInform
- Advanced.Apple.Debugging.&.Rever
- UIDebuggingInformationOverlay 界面
- UIDebuggingInformationOverlay:iO
- 【译】UIDebuggingInformationOverlay
- UIDebuggingInformationOverlay使用介
- UIDebuggingInformationOverlay(译文
方法一 (启动直接显示)
需要写在- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions里
ifdef DEBUG
pragma clang diagnostic push
pragma clang diagnostic ignored "-Warc-performSelector-leaks"
id debugClass = NSClassFromString(@"UIDebuggingInformationOverlay");
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[debugClass performSelector:NSSelectorFromString(@"prepareDebuggingOverlay")];
});
id debugOverlayInstance = [debugClass performSelector:NSSelectorFromString(@"overlay")];
[debugOverlayInstance performSelector:NSSelectorFromString(@"toggleVisibility")];
pragma clang diagnostic pop
endif
方法二 (双指同时点击状态栏显示)#推荐#
需要写在- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions里
ifdef DEBUG
pragma clang diagnostic push
pragma clang diagnostic ignored "-Warc-performSelector-leaks"
//可视化调试
Class overlay = NSClassFromString(@"UIDebuggingInformationOverlay");
[[overlay class] performSelector:NSSelectorFromString(@"prepareDebuggingOverlay")];
pragma clang diagnostic pop
endif
效果














网友评论