画面の右側には同じ情報が表示されますが、画面の左側には異なる情報が表示される UIViewControllers がいくつかあります。一方から他方に移行したいが、左側のみをアニメーション化する。つまり、左側を上にスライドさせ、右側を静止させたい。
-(void)goNextStep{
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil];
NSString *identifier = @"";
if (_model.isLoggedIn) {
//The user is already logged in, don't display the loginViewController
// instead take them to the next viewController
identifier = [_model nextStepIdentifier];
if ([identifier isEqualToString:@""]) {
identifier = @"loginController";
}
}else{
identifier = @"loginController";
}
UIViewController *nextVC = (UIViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:identifier];
[nextVC setHidesBottomBarWhenPushed:YES];
CATransition *transition = [CATransition animation];
transition.duration = 0.5f;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromBottom;
transition.delegate = self;
//I would love to have
//transition.rect=MyRect;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:nextVC animated:NO];
}
この遷移を画面の定義された四角形に制限したいと思います。
遷移アニメーションを四角形に制限する方法はありますか? もしそうなら、どのように?