uipageviewcontroller

How to remove the bottom gap of UIPageViewController

£可爱£侵袭症+ 提交于 2019-11-28 08:28:52
I am using UIPageViewController to show images full screen, the UIViewController which is added to UIPageController as a sub view / child has the images being showed using ImageView. Problem is the images arent comming fullscreen, instead the pagecontrol view's donts are appearing at the bottom and that space is completely wasted. Please check the image attached. Here is the code self.pageController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil]; self

Assertion failure in UIPageViewController

纵饮孤独 提交于 2019-11-28 07:39:09
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 0x181ebec80 0x182844154 0x1877a1c40 0x1877a1da8 0x18784e9c4 0x18784ebfc 0x187852318 0x18784dd98 0x1870101e4

UIPageViewController automatic scrolling in iOS

牧云@^-^@ 提交于 2019-11-28 06:00:27
问题 I am making one app, in which PageViewController should scroll in some time interval. Currently I have done till manual scrolling. User can scroll any images and it will work. But stuck with achieve automatic scrolling with user touches. Below is my code. Please help me on this. - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. _pageTitles = @[@"", @"", @"", @""]; _pageImages = @[@"page1.png", @"page2.png", @"page3.png", @"page4.png"]; // Create

Can we customize the page indicator in UIPageViewController?

浪子不回头ぞ 提交于 2019-11-28 03:48:27
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 page indicator. I don't believe that you can manipulate the UIPageViewController's page control. My

topLayoutGuide in child view controller

余生长醉 提交于 2019-11-28 03:05:34
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 a hack) NachoSoto While this answer might be correct, I still found myself having to travel the

Get user swiping direction in UIPageViewController

雨燕双飞 提交于 2019-11-27 23:55:58
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.Forward let directionReverse = UIPageViewControllerNavigationDirection.Reverse My code looks like this:

PageViewController delegate functions called twice

▼魔方 西西 提交于 2019-11-27 23:42:11
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" @interface APPViewController () @end @implementation APPViewController - (void)viewDidLoad { [super viewDidLoad

UIPageViewController didFinishAnimating not called if swiped quickly

浪尽此生 提交于 2019-11-27 23:29:59
问题 I have a UIPageViewController that works as expected. I can scroll left and right and the delegate method didFinishAnimating is called when I scroll each direction. However, if I scroll too quickly I end up on a page where didFinishAnimating is not called, though it is called for all previous pages. Does anyone know why this might be happening? I would think that didFinishAnimating would be called on every page transition regardless (e.g., even if the turn was aborted). 回答1: This bug is still

how to make UIPageViewController reuse controller like tableview reuse cell?

…衆ロ難τιáo~ 提交于 2019-11-27 21:19:51
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! 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 unused from that cache by checking the parentViewController property; if no unused view controller is available

UIPageViewController page control background color

微笑、不失礼 提交于 2019-11-27 19:59:18
问题 i'm using UIPageViewController in my app and it's working fine. however, it's page control which has been added automatically has a black background which is hiding the current view controller's bottom material (See picture below). is it possible to call the UIPageViewController's page control and change it's color? i want the page control to be shown over the view controller (example, the Path app's walkthrough) like setting the color instead of black to clear. 回答1: You can use appearance to