Unwind segue to dismiss modal doesn't work when using a navigation controller

Originator:kirby
Number:rdar://12693349 Date Originated:11/13/2012
Status:Open Resolved:
Product:iPad SDK Product Version:6.0
Classification:Serious Bug Reproducible:Always
 
Summary:
When you define an unwind segue that dismisses a modal view, the transition from the source to destination does not work when the destination is contained in a navigation controller. The problem only occurs on the iPad. It does not happen on the iPhone.

Steps to Reproduce:

1. Create a single view app targeting the iPad.

2. In the main storyboard, drop a button onto the initial view controller scene. 

3. Add a new view controller to the storyboard.

4. Control-Drag from the button to the new view controller, and create a modal segue.

5. Set the presentation to Form Sheet and the transition to Default for the modal segue.

6. Add a toolbar to the second view controller. 

7. Change the Item bar button to Done.

8 . In the ViewController.m add the following unwind action:
- (IBAction)dismissAbout:(UIStoryboardSegue*)segue
{
   
}

9. In the storyboard, connect the Done bar button item to the exit unwind action dismissAbout:

10. Run the app and verify that the second scene displays when the button is tapped, and that the scene dismisses when the Done button is taped.

11. Select the initial view controller and select Editor > Embedded In > Navigation Controller. The navigation controller should now be the initial view controller.

12. Run the app, tap the button to display the second scene. Tap the Done button to dismiss the second scene.

Expected Results:

The second should should dismiss as it did before the navigation controller was added.

Actual Results:

The second scene does not dismiss.

Regression:

Notes:

Note the problem only occurs on the iPad. The iPhone does not have the same problem. 

I have attached a sample project, with a universal target, that illustrates the problem when run on the iPad.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!