Tag: uipageviewcontroller

不能在UIPageViewController里实现UITextview

我有一个奇怪的问题,我有一个页面的应用程序,其中一个页面我使用了一个UITextView ,但是当我点击UITextView它移动到下一个页面,不能写任何东西。 当我使用UIPageViewControllerTransitionStylePageCurl时没有问题。 唯一的问题是与UIPageViewControllerTransitionStyleScroll 。 任何人都知道解决scheme 请帮帮我

在页面视图控制器中以编程方式使用Storyboard中的View Controller

我有一个故事板的应用程序。 我使用几个视图控制器与segues从表视图中select取决于select。 我想要一个页面视图控制器,其中的页面将是故事板中的一个或多个视图控制器,甚至重复它们。 我试图像这样init页面视图控制器:…. self.dataSource = self; UIViewController *initialViewController =[self viewControllerAtIndex:current]; NSArray *viewControllers = [NSArray arrayWithObject:initialViewController]; [self setViewControllers:viewControllers direction:UIPageViewControllerNavigationOrientationHorizontal animated:NO completion:nil]; …. – (UIViewController *)viewControllerAtIndex:(NSUInteger)index { if ((descriptions.count == 0) || (index >= descriptions.count)) { return nil; } current=index; // Create a new view controller and pass suitable data. NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0]; […]

UIPageViewController在内存不足时翻转速度过快时会崩溃

我有一些内存问题,由于Xcode的UIPageViewController的模板caching所有的页面数据,所以我改变它来dynamic加载页面,所以现在当我的应用程序收到一个低内存警告,它释放页面的内存不显示,但如果用户正在通过点击屏幕边缘来真正快速地浏览页面,它仍然崩溃。 我猜这是因为当didReceiveMemoryWarning被调用时,它不能足够快地释放内存。 如果用户慢慢翻转,它可以正常工作。 我限制了用户翻转页面的速度,但仍然发生。 我希望能够在每次翻页时释放内存,而不必等待低内存警告。 我正在使用ARC。 有没有办法做到这一点? 还有什么我可以做,以防止这一点? 谢谢。 编辑: (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController { NSUInteger index = [self indexOfViewController:(SinglePageViewControllerSuperclass *)viewController]; if ((index == 0) || (index == NSNotFound)) { return nil; } index–; return [self viewControllerAtIndex:index]; } (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController { NSUInteger index = [self indexOfViewController:(SinglePageViewControllerSuperclass *)viewController]; if (index == NSNotFound […]

预加载UIPageViewController的页面

我无法find一个很好的解决scheme,使UIPageViewController预加载周围的ViewControllers。 现在发生什么事是当用户开始翻页,没有任何反应,代码调用 – (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController 一旦它加载,那么它显示animation。 这花了太长时间,并不平坦。 任何人都有解决scheme?

UIPageViewController在iOS6中

在iOS6中的方法viewControllerAfterViewController和viewControllerBeforeViewController如果我返回零(用于阻止页面导航,当我在第一页或最后一页)应用程序崩溃与此exception: '所提供的视图控制器的数量(0)与请求的转换所需的数量(1)不匹配' 在iOS5中一切正常。

UIPageViewController在iOS中自动滚动

我正在做一个应用程序,其中PageViewController应该在一定的时间间隔滚动。 目前我已经完成,直到手动滚动。 用户可以滚动任何图像,它会工作。 但坚持实现用户触摸自动滚动。 以下是我的代码。 请帮助我。 – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. _pageTitles = @[@"", @"", @"", @""]; _pageImages = @[@"page1.png", @"page2.png", @"page3.png", @"page4.png"]; // Create page view controller self.pageViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PageViewController"]; self.pageViewController.dataSource = self; PageContentViewController *startingViewController = [self viewControllerAtIndex:0]; NSArray *viewControllers = @[startingViewController]; [self.pageViewController setViewControllers:viewControllers […]

如何改变UIPageViewController分页curlanimation的方向

我需要显示阿拉伯语(右到左)的内容,找不到任何方法来旋转UIPageViewControllerfind的页面curl的animation,因为基本上阿拉伯书籍应该从左转到右。

UIPageViewController – 如何跳转到特定的页码?

我已经花了近8小时了解如何跳转到UIPageViewController中的特定页码…下面是我的项目看起来像 我想做一个应用程序,看起来像Ibooks — 我已经从这里提供的代码的帮助 – http://www.ioslearner.com/tag/uipageviewcontroller-sample-code/ 我做了一个plist和UITableView,我从TableView中select的值,并显示在UIPAgeiewController上放置的webView相同,但问题是,只有在Web视图中的页面更改,而不是UIPageViewController的实际页码…. 如果我缩小我的问题,它会看起来像是—有没有办法在UIPageViewController中的页码之间切换…. ???

刷新UIPageViewController – 重新排列页面并添加新页面

我有一个UIPageViewController ,我正在提供使用UIPageControllerDelegate和UIPageControllerDataSource的实现的页面数据。 这一切都工作正常,但我希望能够添加项目的页面数据和重新sorting页面数据。 如果用户已经到了最后的页面,然后我添加一个项目,他们不能进入下一个页面,因为viewControllerAfterViewController:已经被调用。 如果他们回滚一个,然后转发两个,他们可以很好地到达新的页面,所以数据设置正确。 我怎么能告诉UIPageViewController刷新它的下一个存储? 同样,我想重新sorting支持页面视图的集合。 但是,如果我这样做,我会得到同样的问题 – 页面视图会认为下一页仍然是上次加载当前页面。 我想我正在寻找类似reloadData:在UITableView 。

UIPageViewController的setViewControllers,UIPageControl不显示正确的当前编号

我使用UIPageViewController水平滚动…只要用户滚动,UIPageControl工作正常,以编程方式跳转到下一页或上一页时出现问题 [self.pageViewController setViewControllers:@[[self viewControllerWithIndex:index]] direction:UIPageViewControllerNavigationDirectionReverse animated:YES completion:nil]; 比UIPageControl的索引是不正确的(我会自己提供索引,但不能访问UIPageViewController的UIPageControl) – (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController { return IntroScreensCount; } – (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController { return 0; } 当以编程方式更改UIPageViewController页面时,如何获取UIPageControl的当前点索引?