uipageviewcontroller

Disable bounce effect in UIPageViewController [duplicate]

老子叫甜甜 提交于 2019-11-26 17:48:59
问题 This question already has an answer here: Disable UIPageViewController bounce 9 answers I have implemented a UIPageViewController that contains two pages. On the right most page, I am able to swipe to the right, and pull the page back so that when I release, it bounces back. The same thing occurs on the left page when I swipe to the left. (The bouncing is like what happens when you reach the bottom of a safari page) Is there a way to disable the bounce effect? Thanks! 回答1: Thus far, none of

Disable UIPageViewController bounce

两盒软妹~` 提交于 2019-11-26 17:26:38
问题 Searched a lot for this one, but couldn't find a proper solution yet. Is it possible to disable the bounce effect of a UIPageViewController and still use the UIPageViewControllerTransitionStyleScroll ? 回答1: Disable UIPageViewController's bounce Add the <UIScrollViewDelegate> delegate to your UIPageViewController's header Set the UIPageViewController's underlying UIScrollView's delegates to their parent in viewDidLoad : for (UIView *view in self.view.subviews) { if ([view isKindOfClass:

UIPageViewController and storyboard

风格不统一 提交于 2019-11-26 17:09:42
I'm trying to configure a UIPageViewController SPECIFICALLY from storyboard: TutorialPageViewController.h #import <UIKit/UIKit.h> @interface TutorialPageViewController : UIPageViewController <UIPageViewControllerDelegate, UIPageViewControllerDataSource> @end TutorialPageViewController.m #import "TutorialPageViewController.h" @interface TutorialPageViewController () @property (assign, nonatomic) NSInteger index; @end @implementation TutorialPageViewController { NSArray *myViewControllers; } - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super

UIPageViewController, how do I correctly jump to a specific page without messing up the order specified by the data source?

故事扮演 提交于 2019-11-26 17:08:44
I've found a few questions about how to make a UIPageViewController jump to a specific page, but I've noticed an added problem with jumping that none of the answers seem to acknowledge. Without going into the details of my iOS app (which is similar to a paged calendar), here is what I'm experiencing. I declare a UIPageViewController , set the current view controller, and implement a data source. // end of the init method pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation

Refresh UIPageViewController - reorder pages and add new pages

≯℡__Kan透↙ 提交于 2019-11-26 15:19:37
问题 I have a UIPageViewController which I am providing page data for using an implementation of UIPageControllerDelegate and UIPageControllerDataSource . It's all working fine, but I want to be able to add items to the page data and reorder the page data. If a user has already got to the last of the pages, and then I add an item, they can't get to the next page because viewControllerAfterViewController: has already been called. If they scroll back one and then forward two they can get to the new

How do I Disable the swipe gesture of UIPageViewController?

守給你的承諾、 提交于 2019-11-26 14:13:57
In my case parent UIViewController contains UIPageViewController which contains UINavigationController which contains UIViewController . I need to add a swipe gesture to the last view controller, but swipes are handled as if they belong to page view controller. I tried to do this both programmatically and via xib but with no result. So as I understand I can't achieve my goal until UIPageViewController handles its gestures. How to solve this issue? The documented way to prevent the UIPageViewController from scrolling is to not assign the dataSource property. If you assign the data source it

iOS 8 UIPageViewController Applying Constraints After Transitions

↘锁芯ラ 提交于 2019-11-26 07:57:35
问题 My app has a multi-pane tutorial-style view that users swipe through to learn about the app. This is implemented very much as described in this tutorial. Having implemented it for both iOS 7 and 8, I\'m comparing how they work, and finding issues with the latter — I\'m running Xcode 6 GM here. It seems that the UIPageViewController is rendering the views after the transition is complete. I overrode the delegate methods to see what was going on: - (void)pageViewController:(UIPageViewController

UIPageViewController navigates to wrong page with Scroll transition style

我的梦境 提交于 2019-11-26 06:59:50
问题 My UIPageViewController was working fine in iOS 5. But when iOS 6 came along, I wanted to use the new scroll transition style (UIPageViewControllerTransitionStyleScroll) instead of the page curl style. This caused my UIPageViewController to break. It works fine except right after I\'ve called setViewControllers:direction:animated:completion: . After that, the next time the user scrolls manually by one page, we get the wrong page. What\'s wrong here? 回答1: My workaround of this bug was to

Is it possible to Turn page programmatically in UIPageViewController?

允我心安 提交于 2019-11-26 06:09:53
Is it possible to turn page programmatically in UIPageViewController ? Yes it is possible with the method: - (void)setViewControllers:(NSArray *)viewControllers direction:(UIPageViewControllerNavigationDirection)direction animated:(BOOL)animated completion:(void (^)(BOOL finished))completion;` That is the same method used for setting up the first view controller on the page. Similar, you can use it to go to other pages. Wonder why viewControllers is an array, and not a single view controller? That's because a page view controller could have a "spine" (like in iBooks), displaying 2 pages of

How do I Disable the swipe gesture of UIPageViewController?

雨燕双飞 提交于 2019-11-26 05:55:32
问题 In my case parent UIViewController contains UIPageViewController which contains UINavigationController which contains UIViewController . I need to add a swipe gesture to the last view controller, but swipes are handled as if they belong to page view controller. I tried to do this both programmatically and via xib but with no result. So as I understand I can\'t achieve my goal until UIPageViewController handles its gestures. How to solve this issue? 回答1: The documented way to prevent the