uipageviewcontroller

How to change position of UIPageControl in iOS >=8.0?

爱⌒轻易说出口 提交于 2019-12-03 07:09:53
问题 I have a simple UIPageViewController which displays the default UIPageControl at the bottom of the pages. I wonder if it's possible to modify the position of the UIPageControl, e.g. to be on top of the screen instead of the bottom. I've been looking around and only found old discussions that say I need to create my own UIPageControl. Is this thing simpler with iOS8 and 9? Thanks. 回答1: Yes, you can add custom page controller for that. self.pageControl = [[UIPageControl alloc] initWithFrame

UIPageViewController: Child Controller ignoring status bar height during scrolling

狂风中的少年 提交于 2019-12-03 06:45:33
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 questions here but no answers ( link ) UPDATE Another reason for the jumping are 'Margins' from

UIButton interaction inside UIPageViewController

感情迁移 提交于 2019-12-03 05:54:56
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 priority than the UIPageViewController so that when I tap the button, it applies the appropriate

Nesting a (vertical) UIPageViewController inside another (horizontal) UIPageViewcontroller

Deadly 提交于 2019-12-03 04:36:52
问题 I have a big problem with my UIPageViewController . I want to present content in my app using sections and sub-sections. So, I have created "two" instances of UIPageViewController - horizontal (red) and vertical (blue): Earlier I said I have created "two" instances - it is not quite true - there can be tens of instances, but only 2 are presented at the same time, you know what I mean . Both controllers have transitionStyle set to UIPageViewControllerTransitionStyleScroll . The red

How to add UIBarButtonItem to NavigationBar while using UIPageViewController

帅比萌擦擦* 提交于 2019-12-03 03:32:38
Please forgive me, there are already a ton of questions on how to add a UIBarButtonItem to a NavigationBar programmatically but I just can't seem to get any of the solutions to work in my situation. Here is the layout of a simple test app I have been working with to learn the UIPageViewController. I have the page view controller working nicely with three unique viewControllers. I would now like to set unique rightBarButtonItems for each of the view controllers. I can easily set a common barButtonItem in the DetailViewController by simply doing this. UIBarButtonItem *newButton = [

Assertion failure in UIQueuingScrollView didScrollWithAnimation:force:

霸气de小男生 提交于 2019-12-03 03:05:03
问题 I've got a UIPageViewController set up paging my ImageViewController . The ImageViewController contains a UIScrollView with a UIImageView inside. Nothing else. I'm testing at the moment with 3 "items" in my datasource for the UIPageViewController (i.e. three pages). It all works fine and I can scroll and zoom and then page for about 30 seconds and then suddenly I get this warning... *** Assertion failure in -[_UIQueuingScrollView _didScrollWithAnimation:force:], /SourceCache/UIKit/UIKit-2372/

Horizontal padding between UIPageViewController child view controllers

£可爱£侵袭症+ 提交于 2019-12-03 02:24:09
I am using UIPageViewController to display images that are embedded in child view controllers. NSDictionary *options = [NSDictionary dictionaryWithObject: [NSNumber numberWithInteger:UIPageViewControllerSpineLocationMin] forKey: UIPageViewControllerOptionSpineLocationKey]; self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options: options]; self.pageViewController.dataSource = self; self.pageViewController.view.frame = self.view.bounds;

Page ViewController with 4 viewControllers - How to set view 2 as initial viewController?

让人想犯罪 __ 提交于 2019-12-03 00:42:28
问题 I have created a pageViewController with four view controller. Right now the order is: VC1, VC2, VC3, VC4: var pageControl = UIPageControl() var pendingPage: Int? lazy var viewControllerList: [UIViewController] = { let sb = UIStoryboard(name: "Main", bundle: nil) let vc1 = sb.instantiateViewController(withIdentifier: "VC1") let vc2 = sb.instantiateViewController(withIdentifier: "VC2") let vc3 = sb.instantiateViewController(withIdentifier: "VC3") let vc4 = sb.instantiateViewController

UIPageViewController views messed up if user moves too quickly

谁说我不能喝 提交于 2019-12-03 00:30:24
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 *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController { if (pageNumber == 0) {

Releasing unused pages in UIPageViewController

巧了我就是萌 提交于 2019-12-03 00:23:01
I am using a separate .h , .m , and .xib files for each UIViewController based page of a UIPageViewController based picture book. Each page is loaded with animations, music, etc. and takes about 4MB of memory. In Instruments, the free memory drops down about 4MB as each page is loaded. This memory is never released as the pages are turned. It eventually gives memory warnings. UIPageViewController seems to keep each page it instantiates in memory and won't unload it. So when pages are turned fast, the app crashes. I would like to be able to unload all pages except the 3 needed by