通过查看生成的崩溃报告,我发现这个错误出现的次数很多。但是,很难确定是什么导致了它的失败:
Exception name: CALayer position contains NaN:
在我的代码中,我有一个NSTimer,在X秒延迟后删除包含动画CALayers的自定义MKAnnotation。我猜在调用removeFromSuperView之前需要调用view.layer removeAllAnimations。
当前,我只调用removeFromSuperView。
堆栈日志:
Exception name: CALayer position contains NaN: [nan 163.74]
__exceptionPreprocess + 1241536
objc_exception_throw + 34136
+[NSException raise:format:] + 1241348
CA::Layer::set_position(CA::Vec2<double> const&, bool) + 1101236
-[CALayer setPosition:] + 1101608
-[CALayer setFrame:] + 1103040
-[UIView(Geometry) setFrame:] + 39996
Mapbox (4306594984 + 60584)
Mapbox (4306593356 + 58956)
Mapbox (4306685072 + 150672)
Mapbox (4306682568 + 148168)
__NSFireDelayedPerform + 998556
非常感谢您的反馈!