嗯,正如我所說的,我以前也這樣做過這個,我只是檢查了我的其他項目,我發現我的問題,我發佈答案在這裏分享知識的任何有興趣的人,因爲我不能谷歌此前的時刻。
的問題是,收縮或使用他們的框架成長的觀點是不是正確的方法做到這一點。
錯誤的例子:
[UIView animateWithDuration: 0.4 delay:0 options: UIViewAnimationCurveEaseInOut animations:^{
self.frame = CGRectMake(frame.origin.x + frame.size.width/2, frame.origin.y + frame.size.height/2, 10, 10);
} completion: nil];
代替,變換應使用:
self.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1, 1);
[UIView animateWithDuration: 0.4 delay:0 options: UIViewAnimationCurveEaseInOut animations:^{
self.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.001, 0.001);
} completion: nil];
以上地方他們都應該經過我收縮和增長自己的看法元素,考慮到那只是爲了動畫的目的。
希望它有幫助。