내가 정의 전환 관리 개체가 작동하지 않습니다 새 UIViewController에 대한 내비게이션사용자 정의 전환
- (void)navigateToNewScreen
{
DetailedNewsController *secVC = [[DetailedNewsController alloc] init];
secVC.fullDescription = fullDescription;
secVC.headerImage = a.imageView.image;
self.transitioningDelegate = self;
[self.navigationController pushViewController:secVC animated:YES];
}
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented
presentingController:(UIViewController *)presenting
sourceController:(UIViewController *)source
{
self.animationController.isPresenting = YES;
return self.animationController;
}
- (id <UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed
{
self.animationController.isPresenting = NO;
return self.animationManager;
}
@end
전환의 기본 애니메이션이 수행됩니다. 또한 내비게이션 컨트롤러 막대는 탐색 후에 표시되지 않습니다.
UPDATE : 난`이 AppDelegate에에서 UINavigationController가를 만드는 방법 방법
나는 것은 문제 :
firstVC = [[ViewController alloc] init];
navController = [[UINavigationController alloc] initWithRootViewController:firstVC];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor blackColor];
self.window.rootViewController = navController;
[self.window makeKeyAndVisible];
푸시에 대해 사용자 지정 전환을 한 적이 없지만 'secVC.transitioningDelegate = self;'가 아니어야합니다. – mbo42
변경 : secVC.transitioningDelegate = self; secVC.modalPresentationStyle = UIModalPresentationCustom; [self presentViewController : secVC 애니메이션 : 예 완료 : 없음]; 그리고 그것은 작동합니다. 그러나 navigationBar가 숨겨져 있습니다 – Dimitrio
내 대답을 확인하고 작동하는지 알려주세요 – mbo42