iOS8上放大縮小的動畫

CGAffineTransformMakeScale這個方法咱們之前常用,可是在IOS8上出現問題了ios

 [UIView animateWithDuration:0.3 animations:^{xcode

        bgView.frame=CGRectMake(0,0-(y/2), WIDTH, HEIGHT);code

        logoImageView.transform=CGAffineTransformMakeScale(0, 0);orm

    }];animation

    ios8上面若是是0的話,則會產生忽然消失的狀況,須要修改代碼爲0.1才能夠,正確代碼以下 :it

[UIView animateWithDuration:0.3 animations:^{io

        bgView.frame=CGRectMake(0,0-(y/2), WIDTH, HEIGHT);form

        logoImageView.transform=CGAffineTransformMakeScale(0.1, 0.1);transform

        //xcode6上面須要改成0.1纔有效果,0則忽然消失ios8

        

    }];

相關文章
相關標籤/搜索