my spineLocationForInterfaceOrientation-method is not called; therefore, the spine is always on the left, but I would like to have it in the middle… what am I doing wrong?
if ([UIPageViewController class]) {
self.pageViewController = [[UIPageViewController alloc]
initWithTransitionStyle:UIPageViewControllerTransitionStylePageCurl
navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil];
self.pageViewController.view.backgroundColor = [UIColor redColor];
self.pageViewController.delegate = self;
NotesPageController *notesPageController = [[NotesPageController alloc]
initWithNibName:@"NotesPageController" bundle:nil];
NSArray *pageViewControllers = [NSArray arrayWithObjects:notesPageController, nil];
[self.pageViewController setViewControllers:pageViewControllers
direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:NULL];
self.pageViewController.dataSource = self;
[self addChildViewController:self.pageViewController];
[self.navigationController pushViewController:self.pageViewController animated:NO];
}
Thanks a lot!
Have you tried setting the spine property manually?
To set the spine location, wrap one of these constants in an NSNumber object and set it as the value for the UIPageViewControllerOptionSpineLocationKey key in the options dictionary passed to the initWithTransitionStyle:navigationOrientation:options: method.
Ref: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIPageViewControllerClassReferenceClassRef/UIPageViewControllerClassReference.html