寫入入口類內(nèi)即可.兩個(gè)指頭點(diǎn)擊statusbar觸發(fā)
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/