Xcode热重载神器---InjectionIII

2019-06-06  本文已影响0人  其实你懂De
神器.png

长着一副针管的样子,对喽,一个UI调试的神器。在我们开发过程中,避免不了重复修改UI,运行Xcode,command+R,可是有的页面可能要点击点击点击...才能看到我们调试的页面,耽误了很长时间。比如我们马上上线,就因为调试一个页面可能机会耽误我们很多时间。还好没放弃,神器来了。
1.首先我们去AppStore去下载这个神器。

2. 屏幕快照 2019-06-06 下午3.23.02.png

点击Open Project 去选择一个项目调试。
3.代码当然要写了在APPDelegate.m

#if DEBUG
    // iOS
    [[NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle"] load];
    // tvOS
    //    [[NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/tvOSInjection.bundle"] load];
    // macOS
    //    [[NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/macOSInjection.bundle"] load];
#endif

4.然后在调试页面

}


效果图.gif

效果图,这样可以省去很多时间去做很多事情。

上一篇下一篇

猜你喜欢

热点阅读