presenting view controller is nil

Originator:steipete
Number:rdar://22398420 Date Originated:24-Aug-2015 11:04 AM
Status:Open Resolved:
Product:iOS SDK Product Version:8.4.1
Classification:Other Bug Reproducible:Always
 
Summary:
When the UIViewControllerTransitioningDelegate method 
- presentationControllerForPresentedViewController:presentingViewController:sourceViewController: is called, the presenting view controller is unexpectedly nil.

Steps to Reproduce:
1. Open the attached sample project, which implements presentationControllerForPresentedViewController:presentingViewController:sourceViewController: and asserts all the arguments are non-nil
2. Run it
3. Tap to present a view controller

Expected Results:
For no assertion to fail. I.e. for presented, presenting, and source to to non-nil, as they are documented as nonnull.

Actual Results:
presenting is nil.

Notes:
Workaround: the source is often good enough so we are currently basing decisions about what presentation controller to return by querying `presenting ?: source`. Dupe of rdar://22394059 (PSPDFKit)

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!