因项目需要浏览全景照片,故了解了一下PanoramaGL,不得不说很强大,但可惜现在没有维护更新了
*** First throw call stack:
(0x2fe25f4b 0x3a4f76af 0x2fe298e7 0x2fe281cb 0x2fd774d8 0x46c6f 0x3259d37b 0x3259d139 0x325a3e05 0x325a14db 0x3260c08d 0x27863 0x326092ff 0x32608d4f 0x32603353 0x3259e41f 0x3259d721 0x32602b3d 0x34a2e70d 0x34a2e2f7 0x2fdf09df 0x2fdf097b 0x2fdef14f 0x2fd59c27 0x2fd59a0b 0x32601dd9 0x325fd049 0x7b041 0x3a9ffab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
所以有很多坑点,为了大家能不掉到坑里所以将遇到的坑点一一列出,希望能有所帮助,总结的不好还请大家多多指教。
坑点一:只能在MRC环境下运行,所以要将Build Settings中的
Objective-c
Automatic Reference Counting设置为NO
坑点二:如果按照官方demo创建plView
的话
官方创建方法:
plView = (PLView *)self.view;
plView.delegate = self;
可能会报错
报错的代码:2014-08-13 17:09:57.042 Webtest[3157:60b] -[UIView setDelegate:]: unrecognized selector sent to instance 0x16d81be0
2014-08-13 17:09:57.045 Webtest[3157:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setDelegate:]: unrecognized selector sent to instance 0x16d81be0'
*** First throw call stack:
(0x2fe25f4b 0x3a4f76af 0x2fe298e7 0x2fe281cb 0x2fd774d8 0x46c6f 0x3259d37b 0x3259d139 0x325a3e05 0x325a14db 0x3260c08d 0x27863 0x326092ff 0x32608d4f 0x32603353 0x3259e41f 0x3259d721 0x32602b3d 0x34a2e70d 0x34a2e2f7 0x2fdf09df 0x2fdf097b 0x2fdef14f 0x2fd59c27 0x2fd59a0b 0x32601dd9 0x325fd049 0x7b041 0x3a9ffab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
这是因为
plView = (PLView *)self.view
中的
self.view 不是PLView类型
,变成了
ViewController,具体是为什么还不太清楚,还请大神指教
然后将创建代码改为
plView
= [
PLView
new
];
[plView setDelegate:self];
[plView setFrame:self.view.bounds];
[self.view addSubview:plView];
就没有问题了
坑点三:这个库亮点不支持64位
如果你工程的architectures为Standard Architectures(armv7,arm64)的话,请将其调成$(ARCHS_STANDARD_32_BIT)
需要导入的系统库有
最后两个不要及导入错了,不是libxml2.2.tbd 和libz.1.tbd
下面是导入libz.1.dylib的过程,libxml2.2.dylib是同样的步骤
1. 进入你项目的build phases
2.点击+号在弹出的对话框选择addother
3.在弹出的对话框中输入"cmd"+"shift"+"g"
4.输入/usr/lib
5.这个时候滑动到最下面就能看到libz.dylib了
demo下载地址:http://download.csdn.net/detail/nickyangbooy/9901478
如有什么问题可大家一起讨论讨论
demo下载地址:http://download.csdn.net/detail/nickyangbooy/9901478