您的位置:首页 > 产品设计 > UI/UE

Reveal调试UI工具的使用

2015-09-10 14:37 465 查看
在Commend命令行中,直接执行 vim ~/.lldbinit命令,将这个文件打开,输入下面语句
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];
完成之后,ESC ,shift+:,wq保存退出。
然后在你的项目的AppDelegate的FinishLaunch函数中打一个断点,右击编辑这个断点,Action命令里面输入Debugger Command命令,reveal_load_sim/reveal_load_dev这两个命令中的一个,前面是模拟器后面是真机。启动起来之后在Reveal中就可以调试UI操作了。

另外可以在Reveal的标签栏的帮助栏中的show Reveal library in folder,找到Reveal.framework,将Reveal.framework引用到工程中,添加libz.dylib,然后修改Settings的other Link,添加 -ObjC。
直接运行工程,在Reveal里可以直接调试UI。
final!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: