OrzSysDebug 0.0.6

OrzSysDebug 0.0.6

wangzhizhou 维护。



OrzSysDebug

一个用于启用 iOS 10 & 11 & 12 的 UIDebuggingInformationOverlay 工具。

使用方法

该 Pod 使用苹果的私有 API,因此您应该只为调试目标依赖这个 Pod,而不是为 AppleStore 打包。

添加到 Podfile

source 'https://github.com/OrzGeeker/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'

pod 'OrzSysDebug', :configurations => ['Debug']

显示调试覆盖层

  1. 您可以通过双指触摸状态栏来显示 UIDebuggingInformationOverlay,此方法不会侵入代码。

  2. 您也可以通过摇晃来显示调试覆盖层。

  3. 如果您想通过代码显示调试覆盖层,请参考以下示例

#import "ViewController.h"
#import <OrzSysDebug/OrzSysDebug.h>
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}


- (BOOL)canBecomeFirstResponder {
    return YES;
}

// Motion Event
-(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
    if(motion != UIEventSubtypeMotionShake) return;
    [OrzSysDebug toggle];
}

// Button Action
- (IBAction)showSysDebug:(UIButton *)sender {
    [OrzSysDebug toggle];
}

@end

演示

显示调试层

show

调试层的功能

OrzSysDebug.gif