嗨,我在获得视图控制器动画后尝试加载视图,并且我使用控制器标识符“theSetting”作为最后一行来查找我的情节提要 ID 以获取视图,但是此方法正在加载控制器但不是加载视图。我还有什么可以尝试的吗?我是使用 CATransitions 的新手,感觉好像遗漏了一些东西。谢谢
- (void)bottomButtonScreen4:(UIGestureRecognizer *)gestureRecognizer {
NSLog(@"Swipe Up Worked");
settingsViewController = [[SettingsViewController alloc] init];
CATransition* transition = [CATransition animation];
transition.duration = 0.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromTop;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:settingsViewController animated:NO];
[settingsViewController.storyboard instantiateViewControllerWithIdentifier:@"theSetting"];
}