- </pre>
- <p style="padding-top:0px; padding-bottom:0px; color:rgb(51,51,51); max-width:100%; clear:both; min-height:1em; white-space:pre-wrap; font-family:'Helvetica Neue',Helvetica,'Hiragino Sans GB','Microsoft YaHei',微软雅黑,Arial,sans-serif; font-size:18px; line-height:28.7999992370605px; margin-top:1.2em!important; margin-bottom:1.2em!important; word-wrap:break-word!important">
- Reveal是一个iOS程序界面调试工具。使用Reveal,我们可以在iOS开发时动态地查看和修改应用程序的界面。
- </p>
- <p style="padding-top:0px; padding-bottom:0px; color:rgb(51,51,51); max-width:100%; clear:both; min-height:1em; white-space:pre-wrap; font-family:'Helvetica Neue',Helvetica,'Hiragino Sans GB','Microsoft YaHei',微软雅黑,Arial,sans-serif; font-size:18px; line-height:28.7999992370605px; margin-top:1.2em!important; margin-bottom:1.2em!important; word-wrap:break-word!important">
- 对于动态或复杂的交互界面,手写UI是不可避免的。通过Reveal,我们可以方便地调试和修改应用界面,免去了每次修改代码后重新启动的痛苦。
- </p>
- <p>
- </p>
- <p>
- <span style="font-size:18px;">
- 1、首先需要下载Reveal工具,可以在下面链接下载
- <a target=_blank target="_blank" href="http://revealapp.com/download/">
- http://revealapp.com/download/
- </a>
- </span>
- </p>
- <p>
- <span style="font-size:18px;">
- 2、下载之后,安装很简单,由于这个是app格式的,以下的方法是需要把它放在应用程序里面的。所以第二步需要拷贝下载好的app到 "应用程序"里面。
- </span>
- </p>
- <p>
- <span style="font-size:18px;">
- 3、接下来,如果是个人开发练习,可以直接采用静态链接的办法,这样会把Reveal 添加到工程中(不太适合团队开发)。下面提供官方教程链接:
- <a target=_blank target="_blank" href="http://support.revealapp.com/kb/getting-started/reveal-2">
- http://support.revealapp.com/kb/getting-started/reveal-2
- </a>
- ,还可以使用动态链接的方法,
- <a target=_blank target="_blank" href="http://support.revealapp.com/kb/getting-started/revealrevealxcode">
- http://support.revealapp.com/kb/getting-started/revealrevealxcode
- </a>
- </span>
- </p>
- <p>
- <span style="font-size:18px;">
- </span>
- </p>
- <p>
- <span style="font-size:18px;">
- 如果不想把Reveal添加到Xcode工程中,可以使用下面官方提供的办法,
- <a target=_blank target="_blank" href="http://support.revealapp.com/kb/getting-started/revealxcodereveal">
- http://support.revealapp.com/kb/getting-started/revealxcodereveal
- </a>
- ,此种方法说是只支持模拟器操作,不支持真机操作,
- </span>
- </p>
- <p>
- <span style="font-size:18px;">
- 然后还有另一种办法,我是从《iOS开发进阶》(唐巧 著)这本书中得知的,因为本人接触iOS时间不久,感觉看书可以快速得到很多技巧,所以买了两本书,加快了解iOS的开发及其一些技巧。
- </span>
- </p>
- <p>
- <span style="font-size:32px;">
- 下面介绍 模拟器中使用的办法,
- </span>
- </p>
- <p>
- <span style="font-family:'Helvetica Neue',Helvetica,'Hiragino Sans GB','Microsoft YaHei',微软雅黑,Arial,sans-serif;font-size:18px;color:#333333;line-height:28.7999992370605px; white-space:pre-wrap">
- 首先打开Terminal,输入
- </span>
- <code style="margin:0px 0.15em; padding:0px 0.3em; max-width:100%; color:rgb(51,51,51); white-space:pre-wrap; font-size:0.85em; font-family:Consolas,Inconsolata,Courier,monospace; border:1px solid rgb(234,234,234); display:inline; word-wrap:break-word!important; background-color:rgb(248,248,248)">
- vim ~/.lldbinit
- </code>
- <span style="font-family:'Helvetica Neue',Helvetica,'Hiragino Sans GB','Microsoft YaHei',微软雅黑,Arial,sans-serif;font-size:18px;color:#333333;line-height:28.7999992370605px; white-space:pre-wrap">
- 会自动创建一个名为
- </span>
- <code style="margin:0px 0.15em; padding:0px 0.3em; max-width:100%; color:rgb(51,51,51); white-space:pre-wrap; font-size:0.85em; font-family:Consolas,Inconsolata,Courier,monospace; border:1px solid rgb(234,234,234); display:inline; word-wrap:break-word!important; background-color:rgb(248,248,248)">
- .lldbinit
- </code>
- <span style="font-family:'Helvetica Neue',Helvetica,'Hiragino Sans GB','Microsoft YaHei',微软雅黑,Arial,sans-serif;font-size:18px;color:#333333;line-height:28.7999992370605px; white-space:pre-wrap">
- 的文件,然后将如下内容输入到该文件中:
- </span>
- </p>
- <p>
- <span style="font-family:'Helvetica Neue',Helvetica,'Hiragino Sans GB','Microsoft YaHei',微软雅黑,Arial,sans-serif;font-size:18px;color:#333333;line-height:28.7999992370605px; white-space:pre-wrap">
- </span>
- </p>
- <pre name="code" class="objc">
- command alias reveal_load_sim expr (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib",
- 0x2); command alias reveal_load_dev expr (void*)dlopen([(NSString*)[(NSBundle*)[NSBundle
- mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4],
- 0x2); command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter
- defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
- command alias reveal_stop expr (void)[(NSNotificationCenter*)[NSNotificationCenter
- defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil];
来源: http://lib.csdn.net/snippet/ios/42291