uipageviewcontroller

Swift/iOS8: Why are Page Control indicators not showing?

二次信任 提交于 2019-12-06 21:13:36
问题 I am implementing a straightforward gallery view controller where the app displays a small range of full-screen images that the user can scroll through. I'm using UIPageViewController which I thought, should display the Page Control indicators automatically if I implement the correct datasource functions. However I still cannot see any indicators. In my main GalleryViewController : class GalleryViewController: UIViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate {

API JSON & UIPageViewController optional Nil

强颜欢笑 提交于 2019-12-06 15:50:25
问题 Okay, I am trying to work out a pageview slider that retrieves images url from an API using this tutorial as a base. I have already coded the asynchronous downloading of images and appending it to the pageImages array. That part works fine. However, I received an error when I am trying to run the app in the simulator : fatal error: unexpectedly found nil while unwrapping an Optional value For some reason, fetching the JSON objects and populating the pageImages Array happens after I call my

How to Build A Dynamic UIPageViewController

纵然是瞬间 提交于 2019-12-06 13:41:34
问题 I have followed the basic tutorial here to create a UIPageViewController that swipes through different ViewControllers, all of which I create on Main.Storyboard. I want to make an application that generates dynamic ViewControllers, meaning I will have to instantiate the ViewControllers in the UIPageViewController programatically. However, I am trying to take everything a bit further. I am going to have a dynamic set of ViewControllers to display based on data I have in Firebase. On each swipe

Implementing UIPageViewController's logic as a subview to a UIViewController in Swift

我只是一个虾纸丫 提交于 2019-12-06 11:42:28
I have to implement a UIPageViewController as a subview to my UIViewController. The UIPageViewController has some logic and other ViewControllers inside. My question is how to connect these two pieces of code below. So this is my main UIViewController code: class MyMainViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } } and my UIPageViewController code, which implements an endless loop between ViewControllers that he contains (I copied the whole code, probably it wasn't necessary ):

Fast scroll UIPageViewController prevents viewcontroller from updating

做~自己de王妃 提交于 2019-12-06 06:00:33
问题 I have a UIPageviewcontroller which got two controllers inside. As you swipe to the next, I use the viewController argument to set the appropriate delegate. But I experience that if you swipe too fast, the function viewControllerAfter isn't updating the viewController correctly. The initially swipe should update the index of the viewcontroller from 0 to 1, but doesn't do so if you swipe too fast. import UIKit class WizardPageViewController: UIPageViewController, UIPageViewControllerDelegate,

UIPageViewController responds to vertical pan when orientation is set to horizontal

不想你离开。 提交于 2019-12-06 04:55:59
问题 I've burnt hours on this. I've initialized UIPageViewController with UIPageViewControllerNavigationOrientationHorizontal , but for some reason viewControllerBeforeViewController is called when user pans vertically. Also, when this happens, there's no page flipping and didFinishAnimating:didFinishAnimating:previousViewControllers:transitionCompleted isn't called at all. This means that the page view controller knows this is a vertical movement.. This is the initialization code - - (void

UIPageViewController UIImage not showing full screen

冷暖自知 提交于 2019-12-06 03:22:17
问题 I am making an application that is a tab-view controller. For the first tab, I have a UIPageViewController that is scrolling through pictures. Everything works properly, except for that the picture is not showing full screen. I have constraints set up for the image view to cover the whole view controller but when it gets loaded into the page view, it doesn't cover all the way to the bottom. The image gets cut off by the scrolling dot indicators and then it is just white. I'm sure it is simple

UINavigationController inside UIPageViewController with vertical scrolling, broken navigation bar height

只谈情不闲聊 提交于 2019-12-06 02:10:16
I'm using a UIPageViewController to display few controllers, the first one is UINavigationController, on first sight it looks fine, but when you scroll to next one, the first navigation bar changes the height, and puts title directly under status bar. I've already searched stack overflow but couldn't find any answer to my problem. Simple demo: https://github.com/augard/PageScrollingBug I fixed this in a very hacky way – subclassed UINavigationController and swizzled its navigationBar 's setCenter: method (swizzling done with Aspects library): // In subclassed UINavigationController: - (void)

Swift - UIPageViewController always repeats second ViewController

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 01:07:30
Setup: I'm trying to create a ViewController with an embedded UIPageViewController with 4 pages that are each their own ViewController. Problem: When scrolling the second view is always repeated. For example with View1, View2, View3, View4 scrolling reveals View1, View2, View2, View3, View4 then scrolling back has this order View4, View3, View3, View2, View1 even though the page control is accurate. I've look at many tutorials online including answers here and here . Here is my page view controller class: import UIKit class HostGamePageViewController: ROLViewController,

Unexpected UIPageViewController behaviour

会有一股神秘感。 提交于 2019-12-06 00:13:37
问题 I'm currently building a app using UIPageViewController . It is working as I expected until it reaches last page which contains numbers of UITextField. But when I tapped one of instances of UITextField, it suddenly jumps to the previous page without any reason instead of showing a keyboard. When I scroll through to the last page and tap a text field again, it works well without any problem. It is also fine when it shows last page immediately by tapping the navigation button that links to the