uipageviewcontroller

Page Indicator UIPageViewController

杀马特。学长 韩版系。学妹 提交于 2019-12-02 05:05:36
I have a page view controller in my iPhone app. The view is defined using the Interface Builder and a class to manage it. This class extends UIPageViewController <UIPageViewControllerDataSource,UIPageViewControllerDelegate> I used the following functions for page indicator. -(NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController {} -(NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController {} However, the number of pages in my application increased and the page indicator goes out of my current view (the starting and the

Delegate seems to not be working, according to the console

南笙酒味 提交于 2019-12-02 04:20:10
Here i have two classes. How do I make JournalPage call JournalEntryController didSubmit method. protocol JournalPageDelegate { func didSubmit(for commentText: String) } class JournalPage: UIViewController, UITextViewDelegate { var delegate: JournalPageDelegate? fileprivate let textView: UITextView = { let textView = UITextView() let attributedText = NSMutableAttributedString(string: "Enter Text Here.", attributes: [NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: 18)]) textView.textColor = UIColor.black textView.backgroundColor = UIColor.white textView.becomeFirstResponder() textView

UIPageViewController: Fade In/Out Animation Between Viewcontrollers?

拥有回忆 提交于 2019-12-02 03:16:24
I followed the tutorial over @ http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/ to implement a UIPageViewController. I need to make the transition between view controllers to fade in/out when the user scrolls between them. An example of an app that does this is over here https://itunes.apple.com/us/app/tapiture/id645402534?mt=8 Use the delegate pageViewController:willTransitionToViewControllers: . This is called as the gesture begins. You know what the old view controller is because it's already there. You know what the new view controller is because this message tells you.

A reliable way to get UIPageViewController current index

江枫思渺然 提交于 2019-12-01 21:06:47
问题 I'm looking for a reliable way to keep track of UIPageViewController current index. The problem is well known; Although viewControllers are being presented properly, it hard to keep track of the current index. I thought it will be good to refresh this topic across SO community since it remains unsolved for some reason I've browsed through many threads here, but most answers are outdated or marked as unreliable(The result depends on if user did a full swipe or just half swiped etc) I've

A reliable way to get UIPageViewController current index

…衆ロ難τιáo~ 提交于 2019-12-01 19:52:37
I'm looking for a reliable way to keep track of UIPageViewController current index. The problem is well known; Although viewControllers are being presented properly, it hard to keep track of the current index. I thought it will be good to refresh this topic across SO community since it remains unsolved for some reason I've browsed through many threads here, but most answers are outdated or marked as unreliable(The result depends on if user did a full swipe or just half swiped etc) I've visited this thread, but it doesn't provide any explicitly correct answer. I've tried: 1) Keeping track of

Restrict UIPageViewController (with TransitionStyleScroll) pan gesture to a certain area

徘徊边缘 提交于 2019-12-01 17:34:04
In my app I have a RootPageViewController which contains the UIPageViewController and one or more DetailPageViewController with a UITableView as a childview. DetailPageViewController / RootPageViewController - DetailPageViewController \ DetailPageViewController On top of every DetailPageViewController is a little space where it should be possible to swipe and get to the next DetailPageViewController. ------------------- | | | | -> UIPageViewController should respond to pan's | | |-------------------| -------------------------------------------- | CellContent | |-------------------| |

UIPageViewController direction only forward

廉价感情. 提交于 2019-12-01 17:26:00
The goal is to create a UIPageViewController that can only navigate forward. I am using a data source to provide the content for the UIPageViewController. The direction is set to UIPageViewControllerNavigationDirectionForward , the transition style is UIPageViewControllerTransitionStyleScroll . The implementation of - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController { // returns the next view controller } returns the next view controller, while the following should ensure navigating backwards

Restrict UIPageViewController (with TransitionStyleScroll) pan gesture to a certain area

萝らか妹 提交于 2019-12-01 16:12:25
问题 In my app I have a RootPageViewController which contains the UIPageViewController and one or more DetailPageViewController with a UITableView as a childview. DetailPageViewController / RootPageViewController - DetailPageViewController \ DetailPageViewController On top of every DetailPageViewController is a little space where it should be possible to swipe and get to the next DetailPageViewController. ------------------- | | | | -> UIPageViewController should respond to pan's | | |------------

UIPageViewController direction only forward

一个人想着一个人 提交于 2019-12-01 16:03:48
问题 The goal is to create a UIPageViewController that can only navigate forward. I am using a data source to provide the content for the UIPageViewController. The direction is set to UIPageViewControllerNavigationDirectionForward , the transition style is UIPageViewControllerTransitionStyleScroll . The implementation of - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController { // returns the next view

Disable Page scrolling in UIPageViewController [duplicate]

时间秒杀一切 提交于 2019-12-01 09:44:35
问题 This question already has answers here : How do I Disable the swipe gesture of UIPageViewController? (17 answers) Closed 5 years ago . I am working on app in which I'm using UIPageViewController. Now I want to disable page scrolling not Gestures. actually I want to draw signature in view that contain in UIPageViewController.For this I need to disable page scrolling. I've done Gesture disable but it is not what I want. for (UIGestureRecognizer *recognizer in pageViewController