I am building an iPhone app and I have implemented a section for knowledge base about the app's subject matter. I used a table view and navigation viewController so that upon selecting any cell in the table a new view controller will be created and added on to the navigation stack.
I tried to implement the curl up/ down animation myself but i get this error at runtime
Parent view controller is using legacy containment in call to -[UIViewController transitionFromViewController:toViewController:duration:options:animations:completion:]'
here is the code sample
(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];
}];
Any help, advice and tips is very much appreciated! Thanks!