Attempt to dismiss from view controller UINavigationController while a presentation or dismiss is in progress

I am using Xcode v4.6.1 and am trying to learn to make apps for the iPhone. I am creating a 'to do list'. The opening view is a tableView embedded in a navigation controller; 'Checklist'. The navigation controller has an add bar button which on tap will display a scene (another tableView embedded in a navigation controller); 'Add Item') . The Add Item scene's navigation controller has a 'Cancel' bar button. When the 'Cancel' button is tapped, I get the following message:

"Attempt to dismiss from view controller <UINavigationController: 0x713d260> while a presentation or dismiss is in progress!"

The code for dismissing the 'Add Item scene is a delegate from the 'Add Item' scene. The code below is a delegate protocol declared in the controller for the 'Add Item' tableView.

- (void)itemDetailViewControllerDidCancel:(ItemDetailViewController *)controller
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

Any suggestions would be appreciated.

Thanks
jbottsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pgnatyukCommented:
You need to show the code opening the detail view you're talking about.

Mainly, if you use UINavigationController you should see a navigation bar and button back on left. This button is supposed to bring you back from the detailed view.

In this case you don't need to call any dismissViewController method - this method is used when you show a view in a "modal" mode by using presentViewController method.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
iOS

From novice to tech pro — start learning today.