2012-05-29 18 views

Trả lời

20

Bạn có thể thay đổi cài đặt này bằng cách sử dụng phương án animateWithDuration:delay:options:animations:completion:. Gửi một mặt nạ UIViewAnimationOption cho thông số tùy chọn. Đây là các tùy chọn mà bạn quan tâm:

UIViewAnimationOptionCurveEaseInOut 
UIViewAnimationOptionCurveEaseIn 
UIViewAnimationOptionCurveEaseOut 
UIViewAnimationOptionCurveLinear 

Tài liệu nói rằng UIViewAnimationOptionCurveEaseInOut là giá trị mặc định.

Xem tài liệu để biết thêm chi tiết: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview/uiview.html

+0

Cảm ơn, giúp rất nhiều! – Fitzy

9

Bạn nên sử dụng, mà sẽ giải quyết vấn đề của bạn

[UIView animateWithDuration:duration delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ 
     //code with animation 
    } completion:^(BOOL finished) { 
     //code for completion 
    }]; 
Các vấn đề liên quan