写入入口类内即可.两个指头点击statusbar触发
oc:
#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")];
});
#endif
swift:
let overlayClass = NSClassFromString("UIDebuggingInformationOverlay") as? UIWindow.Type
_ = overlayClass?.perform(NSSelectorFromString("prepareDebuggingOverlay"))
具体使用方法见链接:
http://swift.gg/2017/05/27/ui-debugging-information-overlay/
网友评论