Reveal是一个iOS程序界面调试工具,使用Reveal,我们可以在iOS开发时动态的查看和修改应用程序的界面,而不用反复的重启模拟器。
官网下载地址(30天免费试用):http://revealapp.com/
使用步骤:
(1)安装好 Reveal 后,我们使用 Xcode 创建一个名为「RevealTest」的工程
![](https://img.haomeiwen.com/i1068298/aac5507ee68435ff.png)
![](https://img.haomeiwen.com/i1068298/71a8d144b81c3f30.png)
(2)为「RevealTest」的工程添加「Reveal framework」;打开 Reveal 工具的 Help 菜单找到「Reveal framework」对应的路径,然后直接拖动他到我们的工程上,这时会弹出对话框,记得勾选「Copy items if needed」
![](https://img.haomeiwen.com/i1068298/3ab4bb600dcbc855.png)
![](https://img.haomeiwen.com/i1068298/e006116b8be4aa39.png)
![](https://img.haomeiwen.com/i1068298/a69e88be1e31607a.png)
![](https://img.haomeiwen.com/i1068298/c9f407f96f66901c.png)
(3)为「RevealTest」的工程的「Build Settings」下的「Other Linker Flags」添加「Any iOS Simulator SDK」项,对应的值为「-ObjC」
![](https://img.haomeiwen.com/i1068298/76df07e0de8c0579.png)
(4)这时运行工程,出现报错,报错内容为如下,这时我们需要引入「libz.dylib」库,然后重新运行工程
Undefined symbols for architecture x86_64:
"_deflate", referenced from:
-[IBAHTTPJSONResponse initWithJSONString:compress:] in Reveal(IBAHTTPJSONResponse.o)
"_deflateEnd", referenced from:
-[IBAHTTPJSONResponse initWithJSONString:compress:] in Reveal(IBAHTTPJSONResponse.o)
"_deflateInit2_", referenced from:
-[IBAHTTPJSONResponse initWithJSONString:compress:] in Reveal(IBAHTTPJSONResponse.o)
![](https://img.haomeiwen.com/i1068298/162e33970018ab07.png)
![](https://img.haomeiwen.com/i1068298/952bbbff396a7edf.png)
![](https://img.haomeiwen.com/i1068298/c1a7a3c0514631be.png)
(5)这时工程运行成功,提示「Reveal Server started (Protocol Version 18).」,这时就可以打开 Reveal 工具进行玩耍了
![](https://img.haomeiwen.com/i1068298/d4d555ecd9759b1d.png)
(6)打开 Reveal 工具,左上角选中我们的「RevealTest」工程,然后就可以查看工程内 UI 的结构了。
![](https://img.haomeiwen.com/i1068298/475dc489bcbe8990.png)
![](https://img.haomeiwen.com/i1068298/68ac2f52985372e3.png)
网友评论