uipageviewcontroller

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

╄→尐↘猪︶ㄣ 提交于 2019-11-26 05:19:10
问题 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]

UIPageViewController and storyboard

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 05:16:13
问题 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; }

UIPageViewController: return the current visible view

廉价感情. 提交于 2019-11-26 04:26:04
How do you know what is the current page/view displayed inside an UIPageViewController ? I have overridden the viewDidAppear method of my child views, so that they send an id to the parent view in their viewDidAppear method. However, the problem is this: i cannot reliably use that id as id for the displayed page. because if the user turns the page but halfway through decides to stop the turning and put the page back, viewDidAppear will already have been called. (the view is visible behind the curled page). Maybe i should only switch to a new id if the current view disappears. But I wonder if

Is it possible to Turn page programmatically in UIPageViewController?

筅森魡賤 提交于 2019-11-26 01:56:47
问题 Is it possible to turn page programmatically in UIPageViewController ? 回答1: 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

UIPageViewController: return the current visible view

纵饮孤独 提交于 2019-11-26 01:16:41
问题 How do you know what is the current page/view displayed inside an UIPageViewController ? I have overridden the viewDidAppear method of my child views, so that they send an id to the parent view in their viewDidAppear method. However, the problem is this: i cannot reliably use that id as id for the displayed page. because if the user turns the page but halfway through decides to stop the turning and put the page back, viewDidAppear will already have been called. (the view is visible behind the

Progress of UIPageViewController

ぐ巨炮叔叔 提交于 2019-11-25 15:18:33
I would like to receive updates from the uipageviewcontroller during the page scrolling process. I want to know the transitionProgress in %. (This value should update when the user move the finger in order to get to another page). I'm interested in the animation progress from one page to another, not the progress through the total number of pages. What I have found so far: There is a class called UICollectionViewTransitionLayout that have the property corresponding to what I am looking for, "transitionProgress". Probably uipageviewcontroller implement this method somehow? I can call the