uipageviewcontroller

UIPageViewController memory leak

戏子无情 提交于 2019-11-28 20:53:00
It seems that UIPageViewController is holding the initial content view controller forever. For example: DataViewController *startingViewController = [self.modelController viewControllerAtIndex:0 storyboard:self.storyboard]; NSArray *viewControllers = @[startingViewController]; [self.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:NULL]; self.pageViewController.dataSource = self.modelController; The startingViewController is never released until the pageViewController itself it released. To reproduce this bug,

Increase the size of the indicator in UIPageViewController's UIPageControl

只谈情不闲聊 提交于 2019-11-28 20:27:11
Is it possible to Increase the size of the indicator in UIPageViewController ? I have this: And my requirement is this: Scaling the page control will scale the dots, but will also scale the spacing in between them. pageControl.transform = CGAffineTransform(scaleX: 2, y: 2) If you want to keep the same spacing between dots, you'll need to transform the dots individually: pageControl.subviews.forEach { $0.transform = CGAffineTransform(scaleX: 2, y: 2) } However, if you do this in viewDidLoad , the transform has been reset by the time the view appears, so you should do this in

iOS Swift: UIPageViewController - Turning page programmatically

∥☆過路亽.° 提交于 2019-11-28 20:24:33
I have a UIPageViewController, which works fine when we swipe left or right to turn pages. class ViewController: UIViewController, UIPageViewControllerDataSource { ... } Now I intend to provide Previous/Next button on the page too, so that pages can be turned by clicking on these buttons. How can I trigger the swipe left/right behaviour OR turn pages programmatically? Note This is a question for Swift language, not Objective-C. Use this funtion and set the transition style for the animation you want. There's generally no need to fiddle around with page indexes and what not. Chances are you are

UIPageViewController in iOS6

妖精的绣舞 提交于 2019-11-28 20:17:21
问题 In iOS6 in the methods viewControllerAfterViewController and viewControllerBeforeViewController if I return nil (for block the page navigation when I am in the first or last page) the app crash with this exception: 'The number of view controllers provided (0) doesn't match the number required (1) for the requested transition' In iOS5 all works good. 回答1: I had the same issue. I found that the cause was replacing the delegate on the UIPanGestureRecognizer of the UIPageViewController, a no-no

Tell When a UIPageViewController is Scrolling (for Parallax Scrolling of an Image)

僤鯓⒐⒋嵵緔 提交于 2019-11-28 17:14:50
I am trying to make an effect similar to that found in the new Yahoo weather app. Basically, each page in the UIPageViewController has a background image, and when scrolling through the page view, the Image's location only scrolls about half the speed. How would I do that? I thought I could use some sort of Delegate Method in the UIPageViewController to get the current offset and then update the images like that. The only problem is that I cannot find anyway to tell if the UIPageViewController is being scrolled! Is there a method for that? Thanks! Pavel Gurov for (UIView *view in self

UIPageViewController page control background color

醉酒当歌 提交于 2019-11-28 16:50:13
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. You can use appearance to change the color of UIPageControl as otherwise it is not accessible. Try doing it in your AppDelegate's

Content pushed down in a UIPageViewController with UINavigationController

女生的网名这么多〃 提交于 2019-11-28 16:10:21
UPDATE 2 I've been running and testing my app in the iOS Simulator using a 4-inch device. If I run using a 3.5-inch device the label doesn't jump. In my .xib, under Simulated Metrics, I have it set as Retina 4-inch Full Screen. Any idea why I'm only seeing this problem on a 4-inch device? UPDATE 1 In IB, if I choose "Navigation Bar" in Simulated Metrics, my label still jumps. The only way I can get my label to render correctly on the first screen is to not set a navigation controller as my window's root view controller. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ My window's rootViewController is

how to pass data from UIPageViewController to child ViewController using delegates

痴心易碎 提交于 2019-11-28 13:59:42
问题 I want to pass data from a UIPageViewController to one of its child ViewControllers . I have a protocol set like so: protocol Delegate : class{ func protocolMethod(count:Int) } And in UIPageViewController : class PageVC : UIPageViewController{ var delegate : Delegate? var count : Int = 1 func classMethod(){ self.displayPageForIndex(5) //this controlls the tranistion to the child ViewController self.delegate?.protocolMethod(count : self.count) } } In the conforming child ViewController : class

Adding ViewController's View as subview to UIPageViewController in iOS 8 gives weird UINavigationBar while show/hide

▼魔方 西西 提交于 2019-11-28 13:02:39
问题 I have been working on a project where I needed to show list of images with zoom / swipe feature as presented view modal. I created custom ImageViewer using ContainerView in which I have added UIPageViewController . And on demand, I added ImageViews over the UIPageViewcontroller's view. When user taps to imageView , the top UINavigation gets shown and hidden on toggle basis. Everything worked as expected in iOS 7.1 and less. However when I tested the functionality in iOS 8 devices and

UIPageViewController gesture is calling viewControllerAfter: but doesn't animate

三世轮回 提交于 2019-11-28 09:23:18
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 method is never called. Here is the code for viewControllerAfterViewController -(UIViewController *