iOS-遇到的坑

1.cocoapod GPUImage里面的代码不加载它对应文件的资源图片


屏幕快照 2017-06-16 下午6.17.02.png

加入代码
<pre>
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_resource "GPUImage/framework/Resources/lookup.png"
install_resource "GPUImage/framework/Resources/lookup_amatorka.png"
install_resource "GPUImage/framework/Resources/lookup_miss_etikate.png"
install_resource "GPUImage/framework/Resources/lookup_soft_elegance_1.png"
install_resource "GPUImage/framework/Resources/lookup_soft_elegance_2.png"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_resource "GPUImage/framework/Resources/lookup.png"
install_resource "GPUImage/framework/Resources/lookup_amatorka.png"
install_resource "GPUImage/framework/Resources/lookup_miss_etikate.png"
install_resource "GPUImage/framework/Resources/lookup_soft_elegance_1.png"
install_resource "GPUImage/framework/Resources/lookup_soft_elegance_2.png"
fi
</pre>

2.使用CAAnimationGroup组合关键帧动画,设置delegate,造成VC无法释放问题

在代理方法写
<pre>

  • (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag
    {

    if (flag) {
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
    //解决 使用CAAnimationGroup组合关键帧动画,设置delegate,造成VC无法释放问题
    [self.animationView.layer removeAllAnimations];
    });
    }
    }
    </pre>

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容