Reveal 介紹
![Reveal](http://i.imgur.com/OKKIRbq.jpg)
Reveal
Reveal 最早是在唐巧的《iOS 開發(fā)進(jìn)階》看到的,當(dāng)時不以為然巨柒。其實(shí)書中很多內(nèi)容都不以為然,因?yàn)槟菚r候還是入門階段,自然看不懂的洋满。主要缺乏交流晶乔,自悟容易自誤。
最近 GeekBand 的段松老師的課程芦岂,純代碼的 UI 布局瘪弓,就遇到了極大的困惑:布局錯了不知道在哪里,控件失蹤了(跑到屏幕外的 frame)禽最。搜索了一下腺怯,重新找到 Reveal 介紹的文章,試用了一下很強(qiáng)大川无∏赫迹可以實(shí)時更改控件屬性、大小位置等等懦趋,同步顯示在真機(jī)或 Simulator 中晾虑。和 Sketch、Photoshop 的 Mirror 功能差不多仅叫,當(dāng)然只是調(diào)試帜篇,實(shí)際更改還要在 Xcode 中完成。
Reveal 使用方法
Reveal 官方教程:http://support.revealapp.com/kb/getting-started/integrating-reveal-add-reveal-to-your-xcode-project
推薦越獄诫咱,只要簡單配置一下笙隙,還可以查看手機(jī)安裝的第三方 APP。
- 越獄后安裝 Apple File Conduit "2" 和 OpenSSH
- 導(dǎo)入 libReveal.dylib :
scp /Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib root@192.168.0.X:/Library/MobileSubstrate/DynamicLibraries
- 導(dǎo)入 libReveal.plist坎缭,格式如下:
{
Filter = {
Bundles = (
"com.apple.test",
);
};
}
scp ~/Documents/libReveal.plist root@192.168.0.X:/Library/MobileSubstrate/DynamicLibraries
小技巧:網(wǎng)上下載的 Demo 直接改 Bundle ID:com.apple.test竟痰,即可開始 Reveal 了。
Debug View Hierarchy in Xcode
Xcode 的 Debug View Hierarchy 只能看看掏呼,就弱爆了坏快。而且極易造成 Xcode 崩潰。
![Debug View Hierarchy in Xcode](http://i.imgur.com/R7XAflX.jpg)
Debug View Hierarchy in Xcode