uipageviewcontroller

Can we customize the page indicator in UIPageViewController?

社会主义新天地 提交于 2019-11-27 05:15:54
问题 Now it's white dots with black background. What about if I want it to be black dots with white backgrounds? - (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController NS_AVAILABLE_IOS(6_0) { return _imageArrays.count; }// The number of items reflected in the page indicator. - (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController NS_AVAILABLE_IOS(6_0) { return self.intCurrentIndex; }// The selected item reflected in the

topLayoutGuide in child view controller

荒凉一梦 提交于 2019-11-27 05:06:02
问题 I have a UIPageViewController with translucent status bar and navigation bar. Its topLayoutGuide is 64 pixels, as expected. However, the child view controllers of the UIPageViewController report a topLayoutGuide of 0 pixels, even if they're shown under the status bar and navigation bar. Is this the expected behavior? If so, what's the best way to position a view of a child view controller under the real topLayoutGuide ? (short of using parentViewController.topLayoutGuide , which I'd consider

UIPageViewController gesture is calling viewControllerAfter: but doesn't animate

六月ゝ 毕业季﹏ 提交于 2019-11-27 02:51:19
问题 I have a really interesting issue with UIPageViewController. My project is set up very similarly to the example Page Based Application template. Every now and then (but reproducible to a certain extent) a certain pan gesture will call out to -(UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController . I return the viewcontroller for the next page, but a page flip animation is never ran and my delegate

Assertion failure in UIPageViewController

拜拜、爱过 提交于 2019-11-27 01:54:12
问题 I have an Assertion Failure in UIPageViewController. Assertion failure in -[UIPageViewController _flushViewController:animated:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.60.12/UIPageViewController.m Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Don't know about flushed view <UIView: 0x15a5bff30; frame = (0 0; 768 903); autoresize = W+H; layer = <CALayer: 0x15a5bfc30>>' *** First throw call stack: (0x181ebedb0 0x181523f80

How to Make the scroll of a TableView inside ScrollView behave naturally

我们两清 提交于 2019-11-26 23:49:51
问题 I need to do this app that has a weird configuration. As shown in the next image, the main view is a UIScrollView. Then inside it should have a UIPageView, and each page of the PageView should have a UITableView. I've done all this so far. But my problem is that I want the scrolling to behave naturally . The next is what I mean naturally . Currently when I scroll on one of the UITableViews, it scrolls the tableview (not the scrollview). But I want it to scroll the ScrollView unless the

PageViewController delegate functions called twice

痴心易碎 提交于 2019-11-26 23:22:06
问题 I am working with UIPageViewController , to make a product tour for my application. I followed this link http://www.appcoda.com/uipageviewcontroller-tutorial-intro/ I am doing is simple task of changing backgound color of my "root VC" on swipe, based on the index value I get, but as the delegate functions are called twice, my index value is not correct and because of that, I am not able to get it right, below is my code #import "APPViewController.h" #import "APPChildViewController.h"

How do I make the bottom bar with dots of a UIPageViewController translucent?

谁都会走 提交于 2019-11-26 22:31:53
问题 I'm in the process of making a tutorial, and I'm trying to emulate the style of Path's tutorial like so: http://www.appcoda.com/wp-content/uploads/2013/06/UIPageViewController-Tutorial-Screen.jpg My issue is that if set the delegate method as so: - (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController { // The number of items reflected in the page indicator. return 5; } Then I get this stupid black bar under the dots: http://i.stack.imgur.com/pUEdh.png

Get user swiping direction in UIPageViewController

大城市里の小女人 提交于 2019-11-26 21:36:44
问题 These two methods viewControllerBeforeViewController and viewControllerAfterViewController of the UIPageViewControllerDataSource don't tell the direction of the swipe. The method transitionCompleted of the UIPageViewController delegate doesn't help us much either. It just tells if the page was fully swiped. So what method should I use to detect exactly the user direction (left or right)? Probably these two properties may help: let directionForward = UIPageViewControllerNavigationDirection

how to make UIPageViewController reuse controller like tableview reuse cell?

南楼画角 提交于 2019-11-26 20:37:17
问题 I need a way to make UIPageViewController reuse controllers to save memory, because I have a huge number of pages to show! I did the basic implementation of the UIPageViewController but couldn't manage to make controller reusable, please advice! 回答1: To solve this problem in my current project, I cache all view controllers that are created as pages for the UIPageViewController in a Set . Whenever the UIPageViewController requests a new view controller from its data source, I filter out an

Disable UIPageViewController bounce

回眸只為那壹抹淺笑 提交于 2019-11-26 19:59:40
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 ? Dong Ma 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:[UIScrollView class]]) { ((UIScrollView *)view).delegate = self; break; } } The implementation for