我正在构建一个iPhone应用程序,我已经实现了一个关于应用程序主题的知识库部分.我使用了表视图和导航viewController,以便在选择表中的任何单元格时,将创建一个新的视图控制器并将其添加到导航堆栈中.
我试图自己实现curl up/down动画但是我在运行时遇到这个错误
父视图控制器在调用时使用遗留包含 - [UIViewController transitionFromViewController:toViewController:duration:options:animations:completion:]'
这是代码示例
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
// change the accessory button to activity indicator
UITableViewCell *cell = [mTableView cellForRowAtIndexPath:indexPath];
SomeViewController *ad = [[SomeViewController alloc] initWithNibName:@"SomeViewController" bundle:[NSBundle mainBundle]];
ad.title = cell.textLabel.text;
[self.navigationController addChildViewController:ad];
[self.navigationController transitionFromViewController:self toViewController:ad duration:0.7 options:UIViewAnimationOptionTransitionCurlUp animations:^{} completion:^(BOOL completed){
[ad release];
}];
Run Code Online (Sandbox Code Playgroud)
非常感谢任何帮助,建议和提示!谢谢!
objective-c uinavigationcontroller uiviewanimationtransition