interactivePopGestureRecognizer.delegate is not wired correctly when custom transition delegate methods present

Originator:greg
Number:rdar://15215690 Date Originated:10/12/2013
Status:Open Resolved:
Product:Developer Tools Product Version:5A2034a
Classification:Other Bug Reproducible:Always
 
Summary:
If UINavigationControllerDelegate's `navigationController:animationControllerForOperation:fromViewController:toViewController:` is present, even if only returning nil (which the documentation states will use the default transitions), UINavigationController's interactivePopGestureRecognizer.delegate is nil. If the delegate is nil, then the default interactive pop transition can't be triggered.  This is a problem if you only want to use custom push transitions (not pop), or maybe custom transitions only to/from certain views or in specific situations.

Steps to Reproduce:
1. Setup new project with one view controller that can push new VCs within a navigation controller
2. Set up a UINavigationController delegate
3. Push VCs and see that you can pop them with the default interactive pop pan gesture transition.
4. Add `navigationController:animationControllerForOperation:fromViewController:toViewController:` and set the body to `return nil;` which should provide the defaults.  You can even add the interactive equivalent method.
5. Run the project and try to use the interactive pop gesture recognizer transition

Expected Results:
Since we return nil in these delegate methods, the defaults should be maintained.  You should be able to navigate backwards with the default interactive left-to-right pan gesture.

Actual Results:
Panning left-to-right only leaves fingerprint smudges on your screen.  The navigation controller does not pop.

Version:
Xcode Version 5.0.1 (5A2034a), iOS 7

Notes:
Workaround I've found is to set the interactivePopGestureRecognizer.delegate to self when viewWillAppear and nil out the delegate on viewWillDisappear, where self is a UIViewController<UINavigationControllerDelegate> within a UINavigationController where the animation transitions delegate methods are defined.

Attachments:
'Tst.zip' was successfully uploaded.

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!