美文网首页
iOS UI调试软件

iOS UI调试软件

作者: 风雨彩虹_123 | 来源:发表于2021-05-12 15:54 被阅读0次

    Lookin 可以查看与修改 iOS App 里的 UI 对象,类似于 Xcode 自带的 UI Inspector 工具,或另一款叫做 Reveal 的软件。当我们需要了解老项目时,它是一款高效率的UI调试神器,Lookin是完全免费的。

    优点

    1.控制台随时访问 iOS App 里的任意 NSObject 的属性或方法;
    2.Lookin Mac版可以显示变量名,以及 indexPath 等各种提示;
    3.选择 App 时,也可一眼找到你要的那个应用;
    4.可以监听某个类的某个方法,此方法调用时软件会打印堆栈信息;
    5.可以查看2维,3维等视图层级;

    使用 CocoaPods

    1.下载Mac Lookin
    2.在Mac上安装Lookin应用;

    截屏2021-05-12 下午3.44.57.png

    3.在需要调试的项目中添加 pod 'LookinServer', :configurations => ['Debug'];
    4.打开Lookin


    截屏2021-05-12 下午3.46.39.png

    5.在执行pod 后运行项目,第一次运行比较缓慢请耐心等待


    截屏2021-05-12 下午3.49.29.png
    6.双击打开上面的窗口,可以查看大图
    截屏2021-05-12 下午3.49.47.png
    7.愉快的开始我们的调试之路吧!

    手动导入

    1.从Github下载LookinServer 源代下载地址:https://github.com/QMUI/LookinServer
    2.将SourceCode文件夹移动到你的 iOS 项目文件夹里。

    截屏2021-05-12 下午5.26.19.png 截屏2021-05-12 下午5.27.13.png
    1. 打开你的 iOS 项目,把 Lookin.xcodeproj 文件从 Finder 拖到你的 xcodeproj 下面,即把 Lookin 作为你的 iOS 主工程的子工程。


      截屏2021-05-12 下午5.29.29.png
    2. 选择你的 iOS target,在右侧 General 面板下找到 “Frameworks, Libraries, and Embedded Content” 这一栏,点击添加,然后在弹出的面板中找到 LookinServer.framework,点击 “Add” 确认添加。

      image
    ![image](https://img.haomeiwen.com/i11244884/2acd16dd419d1442.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
    
    1. 把 LookinServer.framework 设置为 “Embed & Sign”

      image

    6.重新编译运行你的 app,Lookin 应该已经可以正常工作了。


    截屏2021-05-12 下午5.31.50.png

    相关文章

      网友评论

          本文标题:iOS UI调试软件

          本文链接:https://www.haomeiwen.com/subject/mfpadltx.html