1
맞춤 세그먼트를 수행 할 때 탐색 막대에 애니메이션을 적용하려고합니다. 내비게이션 막대는 내비게이션 컨트롤러로 제어됩니다. 다음 코드를 사용하면 포함 된 뷰가 사라지고 뷰가 확대 될 수 있지만 탐색 막대는 일치하지 않습니다. 탐색 바의 변경 사항을 애니메이션화하는 방법은 무엇입니까?맞춤 세그먼트의 탐색 모음 애니메이션
#import "MDAZoomSegue.h"
@implementation MDAZoomSegue
- (void)perform {
UIViewController *sourceViewController = (UIViewController *) self.sourceViewController;
UIViewController *destinationViewController = (UIViewController *) self.destinationViewController;
[sourceViewController.view addSubview:destinationViewController.view];
[destinationViewController.view setFrame:sourceViewController.view.window.frame];
[destinationViewController.view setTransform:CGAffineTransformMakeScale(1.2,1.2)];
[destinationViewController.view setAlpha:0];
[UIView animateWithDuration:0.5
delay:0.0
options:UIViewAnimationCurveEaseOut
animations:^{
[destinationViewController.view setTransform:CGAffineTransformMakeScale(1.0,1.0)];
[destinationViewController.view setAlpha:1.0];
}
completion:^(BOOL finished){
[destinationViewController.view removeFromSuperview];
[sourceViewController.navigationController pushViewController:destinationViewController animated:NO];
}];
}
@end