uipageviewcontroller

UIPageViewController/TextKit Reflowing Text on paging

人走茶凉 提交于 2019-12-03 17:10:44
I'm working on a multi-page reading application backed by TextKit, based off of the "Advanced Text Layouts and Effects with Text Kit" session from WWDC 2013 (but with some code reconstructed from incomplete example). The basic structure is you calculate the number of pages needed for your text upfront, then create an NSTextContainer for each page and add it to the NSLayoutManager. Whenever the UIPageViewController asks for the next or previous page, you create a new UITextView and set its backing text container by selecting the correct one out of the NLayoutManger's array of NSTextContainers.

UIImageView resizing issue in UIPageViewController

只谈情不闲聊 提交于 2019-12-03 17:07:00
问题 I'm building a new app and wish to have a "Welcome walkthrough" at the beginning wherein I have a storyboard with a series of images presented in a UIPageViewController. I have it loading the images and all of that just fine, however the images are resized whenever they go beyond being the "previous" or "next" ViewController. I am using Swift to develop. Here is a video of the issue: http://youtu.be/dXcjjT-8Bk0 I have tried all of the different View Modes (Aspect fit, aspect fill, redraw etc.

UIButton interaction inside UIPageViewController

◇◆丶佛笑我妖孽 提交于 2019-12-03 16:44:48
问题 I'm using an UIPageViewController in my application and I wanted to have a few UIButtons inside it, sort of like a menu. The problem I have is that when I put an UIButton (or any other interactive element) near the edges of the screen and tap it, instead of the UIButton action being applied, what happens is that the page changes (because the tap on the edge of the screen changes the page on the UIPageViewController). I'd like to know if there's a way to make it so that the UIButton has higher

iOS: UIPageViewController - Use button to jump to next page

心不动则不痛 提交于 2019-12-03 12:55:52
I have a series of VCs in a PageViewController that a user navigates left to right through with their fingers. I need to add in buttons that essentially perform the same action as the finger swiping, moving left or right by one through the VCs . How can I do this? Right now I am using these two methods to dynamically setting the VCs as the user swipes: - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController; - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController

UIPageViewController NSInternalInconsistencyException

我怕爱的太早我们不能终老 提交于 2019-12-03 12:30:56
I'm developing a simple UIPageViewController that has two pages. Each page is loaded from a different ViewController with their specific xib files, named PViewController and TViewController . For PViewController , there are three different views, let's call them A , B , and C . When the application launches, PViewController appears successfully and I can swipe left to see the TViewController , also with no problems. However, when I'm in PViewController and as a response to an event I change the current view A to another view B , then swipe left to go to TViewController , I receive the

UIPageViewController views messed up if user moves too quickly

一世执手 提交于 2019-12-03 09:55:26
问题 I have a UIPageViewController that uses an integer to tell which page it is on. It works fine, but if the user quickly swipes several times to get to a page further back, the integer changes more quickly than the views do, and then the whole thing falls apart (the app thinks it is on page 7 when it could be displaying page 3). What am I doing wrong? Is there a different method I should use to tell where I am? Thanks. - (UIViewController *)pageViewController:(UIPageViewController *

Keep previous pages in UIPageViewController

蹲街弑〆低调 提交于 2019-12-03 08:47:45
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. So no replies to this but this question has an upvote this time, I am assuming that someone might

Changing UIPageViewController own PageController regarding Color of Dots

℡╲_俬逩灬. 提交于 2019-12-03 08:42:38
问题 Hey I'm using a UIPageViewController to control what page I am on and for scrolling. I know it's possible to show a Page Controller along with it by simply adding the following two functions. - (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController - (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController What I want to know is if it's possible to change the color of the page controller, so the dots are more visible on

PageViewController current page index in Swift

橙三吉。 提交于 2019-12-03 08:21:43
问题 I want to get current index of a pageViewController, I don't know how I get the visible pages index. func pageViewController(pageViewController: UIPageViewController, didFinishAnimating finished: Bool,previousViewControllers: [UIViewController],transitionCompleted completed: Bool) { // How to get it? } 回答1: You can use didFinishAnimating, and set tags to viewcontrollers. try this func pageViewController(pageViewController: UIPageViewController, didFinishAnimating finished: Bool,

PageViewController - Pass variables to child views

落爺英雄遲暮 提交于 2019-12-03 07:57:22
What I have I have a ViewController (TutorialViewController) and a UIPageViewController (TutorialPageViewController). There are also 3 extra views on the storyboard with StoryBoard ID's: GreenViewController BlueViewController RedViewController I have been following this tutorial (Kudos to the author, very well written). On the Green View Controller I have defined a variable: var passedVariable = "" And in the ViewDidLoad I print it out. Here are the two controllers that have the code: UIViewController (TutorialViewController): class TutorialViewController: UIViewController { @IBOutlet weak var