使用 facebook pop 遇见的问题及解决办法

Pop是Facebook写的一个animation engine,然后开源在了github上,赞一个! 要的请点击我:facebook pop 。

下面是我在使用Pop的时候遇见的2个问题,希望可以给同样遇见问题的同学带来帮助。

用cocoapods把facebook pop整合进自己的工程。

然后 

#import

就可以使用facebook pop提供的类了,比如 POPSpringAnimation。

1:

编译错误:

Undefined symbols for architecture i386:
  "std::__1::__vector_base_common::__throw_length_error() const", referenced from:
      std::__1::vector, std::__1::allocator > >::allocate(unsigned long) in libPods.a(POPAnimator.o)
  "std::__1::__shared_weak_count::__add_shared()", referenced from:
      _POPPropertyAnimationState::willRun(bool, objc_object*) in libPods.a(POPBasicAnimation.o)
      _POPPropertyAnimationState::computeProgress() in libPods.a(POPBasicAnimation.o)
      _POPPropertyAnimationState::readObjectValue(std::__1::shared_ptr*, objc_object*) in libPods.a(POPBasicAnimation.o)
      -[POPSpringAnimation velocity] in libPods.a(POPSpringAnimation.o)
      -[POPSpringAnimation setVelocity:] in libPods.a(POPSpringAnimation.o)
      _POPPropertyAnimationState::willRun(bool, objc_object*) in libPods.a(POPSpringAnimation.o)
      _POPSpringAnimationState::advance(double, double, objc_object*) in libPods.a(POPSpringAnimation.o)
      ...
解决办法:

到“Build Settings”里面,找到“Other Linker Flag”,添加上“-lc++”

2:

这个错误信息只会出现在真机运行调试的时候,编译没问题,但是运行到有调用pop代码的地方就会崩溃。在simulator上测试是不会有问题的。

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[POPSpringAnimation convertBounciness:speed:toTension:friction:mass:]: unrecognized selector sent to class 0x598f0'
解决办法:

到“Build Settings”里面,找到“Other Linker Flag”,添加上“-ObjC”


你可能感兴趣的:(ios开发杂记)