Không có hằng số nào chứa giá trị này. Tuy nhiên, bằng cách sử dụng UINavigationControllerDelegate
phương pháp sau đây:
- (void) navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
startTime = [[NSDate date] retain];
}
- (void) navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
NSLog(@"Duration %f", [[NSDate date] timeIntervalSinceDate: startTime]);
}
... Tôi có thể thấy rằng thời gian là khoảng 0,35 giây
Điều thú vị là, các bộ phận khác nhau của các quan điểm lấy thời điểm khác nhau để chuyển vào vị trí. Xem bài đăng blog tuyệt vời này để biết thêm chi tiết:
http://www.iclarified.com/12396/a-closer-look-at-iphone-transition-animations
Nguồn
2011-09-30 10:54:41
Bài đăng trên blog tuyệt vời! Cảm ơn các liên kết. – morais
Trên iOS 8, thời lượng hoạt ảnh xuất hiện là '0,2' giây. (Hiện tại có một hằng số bạn có thể tham khảo: 'UINavigationControllerHideShowBarDuration'.) – zekel
Nhận xét này phải là câu trả lời, nó giúp tôi rất nhiều lần – fpg1503