uiview动画闪现问题


如果不能确定内存释放,最好不要使用uiview动画


建议简单的直线动画使用,cabasicanimation




CABasicAnimation  * translation = [CABasicAnimation animationWithKeyPath:@"position"];

        translation.delegate = self;
        ///从屏幕外开始
        translation.fromValue = [NSValue valueWithCGPoint:CGPointMake(kYBScreenWidth + animate_View.frame.size.width/2, animate_View.center.y)];
        translation.toValue = [NSValue valueWithCGPoint:CGPointMake(-animate_View.frame.size.width/2, animate_View.center.y)];
        //         translation.byValue = [NSValue valueWithCGPoint:CGPointMake(announceView.frame.size.width/2, announceView.center.y)];
        translation.removedOnCompletion = NO;
        translation.fillMode = kCAFillModeForwards;
        translation.duration = 5;//动画持续时间 跟后面的延迟方法差一秒是 驻留时间
        translation.repeatCount = 1;//动画重复次数
        translation.autoreverses = NO;//是否自动重复
        [animate_View.layer addAnimation:translation forKey:@"translation"];
        [self performSelector:@selector(removeAnimate_View) withObject:nil afterDelay:5.1];
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值