uipageviewcontroller

Keep previous pages in UIPageViewController

China☆狼群 提交于 2019-12-04 15:11:33
问题 So I want to create an interface like the image above (it is a snapshot form the mosaic app). When you turn the page this is the kind of behavior happening. So what is different here is that the cover (the black part) is still visible once you turn the page (the cover is flippable as well, not just a static asset). In a UIViewController when I flip the page it unloads the previous view. So how do I go about implementing this ? Any help or nudge in the right direction will be much appreciated.

How do I add multiple ViewControllers to my UIPageViewController?

筅森魡賤 提交于 2019-12-04 15:00:31
so I'm pretty new to Obj-C and have tried looking at sample code and other online resources to answer my question, but I can't seem to find anything that really helps. Essentially what I'm trying to do is to add multiple UIViewControllers that I created in Storyboard to a UIPageViewController - the first place I looked to for help was Xcode itself by using a template of a PageBased application. That actually helped quite a lot and I got a PageController up and running. Then I turned to online resources but most (if not all of them) use a single viewController (like this ). Then I turned to

Fast scroll UIPageViewController prevents viewcontroller from updating

好久不见. 提交于 2019-12-04 14:07:24
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, UIPageViewControllerDataSource { lazy var orderedViewControllers: [UIViewController] = { return [self

UIPageViewController: Child Controller ignoring status bar height during scrolling

筅森魡賤 提交于 2019-12-04 11:00:46
问题 I'm having some trouble with a UIPageViewController . If I scroll to a new page, the new view controller is behind the status bar while I'm scrolling. After the scrolling, the view controller position itself below the status bar. I'm using Storyboard (Universal). UIPageViewController has attribute Extend Edges: Under Top Bars . What am I missing? set automaticallyAdjustsScrollViewInsets to false didn't work use of edgesForExtendedLayout = UIRectEdge.None didn't work either found some open

UIPageViewController responds to vertical pan when orientation is set to horizontal

时间秒杀一切 提交于 2019-12-04 10:49:43
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)initPageViewController { self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle

background Images on pageViewController overlap in reverse

喜你入骨 提交于 2019-12-04 09:38:49
I have a pageViewController that shows a background image per the index. It works fine swiping left to right (forward), but when you swipe in reverse the background images overlap each other. Before I implemented the background image, the UI on each VC worked fine forward and reverse, so I know it's the background image. Also if I change to page curl instead of scroll in my storyboard it works fine in reverse, just doesn't work for scroll . This apparently is a known bug ( Removing a view controller from UIPageViewController ) however I need a solution in Swift. pageviewController: func

UIPageViewController Traps All UITapGestureRecognizer Events

∥☆過路亽.° 提交于 2019-12-04 08:37:46
It's been a long day at the keyboard so I'm reaching out :-) I have a UIPageViewController in a typical implementation that basically follows Apple's standard template. I am trying to add an overlay that will allow the user to do things like touch a button to jump to certain pages or dismiss the view controller to go to another part of the app. My problem is that the UIPageViewController is trapping all events from my overlay subview and I am struggling to find a workable solution. Here's some code to help the example... In viewDidLoad // Page creation, pageViewController creation etc.... self

Passing data between UIPageViewController Child views with Swift

旧时模样 提交于 2019-12-04 08:12:31
I cant seem to find a specific answer to my direct dilemma. I have a UIPageViewController that programmatically loads through 6 child UIView scenes. They host various stages of an 'add' element functionality. Currently the PageViewController Class adds each child view into an array and instantiates them when required with: storyboard?.instantiateViewControllerWithIdentifier("editViewController") The natural delegate is set-up to swipe between each child scene and therefore no " prepareForSegue " function is run. As the pages swipe, a new scene with different identifier is instantiated. From my

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

£可爱£侵袭症+ 提交于 2019-12-04 08:05:32
问题 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? 回答1: 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

Transition PageCurl to Scroll with UIPageViewController

霸气de小男生 提交于 2019-12-04 07:13:00
I would like to change my animation between the view. Currently i have the PageCurl but i would like to have a Scroll animation like Snapchat. I can not use the var transitionStyle: UIPageViewControllerTransitionStyle { get } My ViewController : import UIKit class ViewController: UIPageViewController, UIPageViewControllerDataSource{ let pageViewController = UIPageViewController(transitionStyle: .Scroll, navigationOrientation: .Horizontal, options: nil) var messagesViewController : MessagesViewController! var searchViewController : SearchViewController! var friendsViewController :