使用Reveal調試和分析UI

reveal下載地址:reveal 密碼:mZTeUfapp

下面的方法只適用於模擬器,真機請看轉載原文(最下方)

一、在Xcode項目中,選擇「View → Navigators → Show Breakpoint Navigator」。Add Symbolic Breakpoint佈局

二、在左邊底部面板,點擊"+"號按鈕,而後選擇「Add Symbolic Breakpoint」。lua

三、在Symbol字段裏面填入「UIApplicationMain」。code

四、點擊「Add Action」按鈕,並確認一下「Action」是設置到「Debugger Command」。圖片

五、在Action下的文本框中貼入以下表達式get

expr (Class)NSClassFromString(@"IBARevealLoader") == nil ? (void *)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2) : ((void*)0)

檢查選項

六、檢查選項「Automatically continue after evaluating actions」是否勾選了。it

七、右鍵點擊新建的斷點,而後選擇「io

Move Breakpoint To → User編譯

Move Breakpoint To → User

八、編譯,在模擬器上運行你的程序,而後打開Reveal,查看你的佈局。下載

打開Reveal

相關文章
相關標籤/搜索