UIPageViewController returns no gesture recognizers when using UIPageViewControllerTransitionStyleScroll

Originator:alexisgallagher
Number:rdar://12606964 Date Originated:31-Oct-2012 10:23 AM
Status:Open Resolved:
Product:iPadSDK Product Version:6.0
Classification: Reproducible:always
 
31-Oct-2012 10:23 AM alexis gallagher:
Summary:
UIPageViewController class documentation says that the readonly property gestureRecognizers will return an NSArray of of the class's gestureRecognizers. But when you set the transition style to UIPageViewControllerTransitionStyleScroll (newly supported on iOS6), the gestureRecognizers property always returns an empty array.


Steps to Reproduce:
1. in Xcode 4.5.1, create a new project using the iOS Page-Based Application template.
2. In the template-created file RootViewController.m, at the end of the implementation of viewDidLoad:, add the following NSLog statement:

NSLog(@"gestureRecognizers = %@",self.pageViewController.gestureRecognizers);

3. Run the app and observe that, as expected, the NSLog statement prints to the console the array of gesture recognizers setup by the UIPageViewController.

4. Now in the same file, go to line 28, and change UIPageViewControllerTransitionStylePageCurl to   UIPageViewControllerTransitionStyleScroll.

5. Run the app again, and observe that in the console the UIPageViewController now reports having no gesture recognizers.

Expected Results:
I would expect the -[UIPageViewController gestureRecognizers] to expose its gesture recognizers even when the UIPageViewControllerTransitionStyle is UIPageViewControllerTransitionStyleScroll.

Actual Results:
It returns an empty NSArray

Regression:
As near as I can tell, this happens always.

Notes:
Traffic on stack overflow suggests I'm not the only one to observe this.

Comments

I'm guessing not by design...

It looks more like an "oh crap, we can't provide the gesture recognizers for style scroll without breaking something so let's just take it out and comment it". Even if it truly is "by design", it's still a bug - a documentation bug. The documentation does not include the comment from the header.

By rich.wardwell at Dec. 7, 2012, 1:23 a.m. (reply...)

By design, not a bug!

According to UIPageViewController.h:


// Only populated if transition style is 'UIPageViewControllerTransitionStylePageCurl'.

@property(nonatomic, readonly) NSArray *gestureRecognizers;


So, there would be no gesture recognizers if the style is set to UIPageViewControllerTransitionStyleScroll.

By lisfolks.dev at Nov. 10, 2012, 5:57 p.m. (reply...)

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!