uipageviewcontroller

Changing UIPageViewController own PageController regarding Color of Dots

心已入冬 提交于 2019-12-02 22:36:46
Hey I'm using a UIPageViewController to control what page I am on and for scrolling. I know it's possible to show a Page Controller along with it by simply adding the following two functions. - (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController - (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController What I want to know is if it's possible to change the color of the page controller, so the dots are more visible on the background I'm using? I know a regular page controller has the properties: @property(nonatomic

PageViewController current page index in Swift

徘徊边缘 提交于 2019-12-02 22:06:14
I want to get current index of a pageViewController, I don't know how I get the visible pages index. func pageViewController(pageViewController: UIPageViewController, didFinishAnimating finished: Bool,previousViewControllers: [UIViewController],transitionCompleted completed: Bool) { // How to get it? } You can use didFinishAnimating, and set tags to viewcontrollers. try this func pageViewController(pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [UIViewController], transitionCompleted completed: Bool) { if (!completed) { return } self

uipageviewcontroller class crashing on setting more than one view controllers

☆樱花仙子☆ 提交于 2019-12-02 21:48:00
My app keeps crashing, when I set more than one view controller in my app, like below. [self setViewControllers:_images direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:NULL]; My images is an array of view controllers. The app crashes saying the following error. I have no idea where to start. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The number of view controllers provided (9) doesn't match the number required (1) for the requested transition As the error says,you are providing more view controllers than needed. You should

UIPageViewController transition 'Unbalanced calls to begin/end appearance transitions for '

南笙酒味 提交于 2019-12-02 20:38:28
When I navigate through UIPageViewController faster than its transition animation I am getting ' Unbalanced calls to begin/end appearance transitions for <MyDataViewController> ' and one of the two views in landscape isn't shown until I try to turn the page. Anybody has an idea to solve this bug? The above answers were right, but I think more elaborate than needed, and cookbook is helpful. So here is what seems to be working for me: In the view controller that sets up and calls the pageViewController, declare: @property (assign) BOOL pageIsAnimating; and in viewDidLoad: pageIsAnimating = NO;

Nesting a (vertical) UIPageViewController inside another (horizontal) UIPageViewcontroller

耗尽温柔 提交于 2019-12-02 18:54:02
I have a big problem with my UIPageViewController . I want to present content in my app using sections and sub-sections. So, I have created "two" instances of UIPageViewController - horizontal (red) and vertical (blue): Earlier I said I have created "two" instances - it is not quite true - there can be tens of instances, but only 2 are presented at the same time, you know what I mean . Both controllers have transitionStyle set to UIPageViewControllerTransitionStyleScroll . The red UIPageViewController is responsible for horizontal scrolling between sections and blue are responsible for

Assertion failure in UIPageViewController

陌路散爱 提交于 2019-12-02 15:30:13
While switching between Tabs too fast in UIPageViewController, App getting crash in line [UIPageViewController queuingScrollView:didEndManualScroll:toRevealView:direction:animated:didFinish:didComplete:] with errors Assertion failure and Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No view controller managing visible view. Error Log as below *** Assertion failure in -[UIPageViewController queuingScrollView:didEndManualScroll:toRevealView:direction:animated:didFinish:didComplete:], /SourceCache/UIKit/UIKit-3318.0.1/UIPageViewController.m:1875 2014-09-29

Delegate seems to not be working, according to the console

£可爱£侵袭症+ 提交于 2019-12-02 13:36:44
问题 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

UIPageViewController using Storyboard and Xcode 4.5

这一生的挚爱 提交于 2019-12-02 09:52:23
问题 I want to ask some question about Xcode 4.5. I am creating app with storyboard. This app has UIPageViewController . But if I want to define identifier of UIViewController in IB of storyboard, there is no place for it anymore. Can you please tell me, where can I simple define (using IB) identifier of view controller? 回答1: It seems that in XCode 4.5 Identifier below Attributes inspector has moved to Storyboard ID below Identy inspector. 来源: https://stackoverflow.com/questions/12471429

UIPageViewController using Storyboard and Xcode 4.5

被刻印的时光 ゝ 提交于 2019-12-02 07:27:36
I want to ask some question about Xcode 4.5. I am creating app with storyboard. This app has UIPageViewController . But if I want to define identifier of UIViewController in IB of storyboard, there is no place for it anymore. Can you please tell me, where can I simple define (using IB) identifier of view controller? It seems that in XCode 4.5 Identifier below Attributes inspector has moved to Storyboard ID below Identy inspector. 来源: https://stackoverflow.com/questions/12471429/uipageviewcontroller-using-storyboard-and-xcode-4-5

UIPageViewController: Fade In/Out Animation Between Viewcontrollers?

左心房为你撑大大i 提交于 2019-12-02 06:34:37
问题 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 回答1: Use the delegate pageViewController:willTransitionToViewControllers: . This is called as the gesture begins. You know what the old view controller