uipageviewcontroller

How to use UIPageViewController to also display a part of the previous and next views

你离开我真会死。 提交于 2019-12-22 06:59:24
问题 I used this amazing tutorial How to Use UIPageViewController in Swift to understand and implement an UIPageViewController in my app. I have successfully completed the integration, but I need to modify a little bit the behavior now. Instead of viewing only one colored view at a time, I would like to view 25% of the previous view and 25% of the next one. I think I have to use this method passing the 3 viewcontrollers: func setViewControllers(_ viewControllers: [UIViewController]?, direction:

How do I use UIPageViewController to load separate XIBs?

南笙酒味 提交于 2019-12-22 04:56:17
问题 I'm delving into the new world of UIPageViewControllers and there are a lot of tutorials out there, however all of them seem to create one view, and then just use new instances of it with different content. I'd really like to be able to create multiple XIBs and then just chain them together with the UIPageViewController but it's too new and I can't get my head around the way it works. 回答1: Well, here's a long answer that you should be able to copy and paste. (This code was adapted from Erica

iOS - UIPageViewControllerDataSource method called twice

元气小坏坏 提交于 2019-12-22 04:18:06
问题 I found a weird issue with the two UIPageViewControllerDataSource methods: the first time I enter the page view controller scene and drag on the content of the controller, no matter what the dragging direction is, both of the data source methods get called. I suppose that when I'm at the first page and drag to the right, which means that there is no more page before the first page, neither of the methods should get called. And if I drag to the left, only the after method should get called. I

UIPageViewController and UIButton mix use

≯℡__Kan透↙ 提交于 2019-12-21 21:46:44
问题 Here's the thing: my app needs a series of tutorial screens at the beginning when people launch it, along with two buttons on the bottom of the screen to let people register or login. (like the image shows) My question is : how can I keep the buttons on the screen when people slide the tutorial images ? I tried several ways: In PageContentViewController (subclass of UIViewController), I have a UIImageView for the tutorial image, and two UIButton for the buttons. This way, the buttons also get

UIPageViewController inside a custom UIViewController

▼魔方 西西 提交于 2019-12-21 21:35:40
问题 I am stucked with this problem for all the afternoon. I made a custom UIViewController. Up to now I shown custom views inside this custom viewcontroller. All fine. Now what I want to do is to show a pageviewcontroller inside the custom controller. No error, but the view of the pagecontroller is shown outside the bounds of the custom controller (. Here is my code - (void)viewDidLoad { [super viewDidLoad]; self.monthYearController = [[avvAgendaMonthViewController alloc] init]; self

background Images on pageViewController overlap in reverse

╄→尐↘猪︶ㄣ 提交于 2019-12-21 17:51:50
问题 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

How to set first page in UIPageViewController

こ雲淡風輕ζ 提交于 2019-12-21 17:13:08
问题 When the user is on the first page of a UIPageViewController and tries to go back, I simply return nil. In iOS 5 this works fine. It is causing a crash in iOS 6. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The number of view controllers provided (0) doesn't match the number required (1) for the requested transition' Here is my code. When returning contentViewController instead of nil , it works fine. What should I put instead of nil ? -

UIPageViewController Traps All UITapGestureRecognizer Events

时光总嘲笑我的痴心妄想 提交于 2019-12-21 16:58:38
问题 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

Passing data between UIPageViewController Child views with Swift

心已入冬 提交于 2019-12-21 15:09:12
问题 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 "

Passing data between UIPageViewController Child views with Swift

旧时模样 提交于 2019-12-21 15:09:11
问题 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 "