大佬教程收集整理的这篇文章主要介绍了ios – 使用UINavigationController在UIPageViewController中下载内容,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我一直在使用4英寸设备在iOS模拟器中运行和测试我的应用程序.如果我使用3.5英寸设备运行,标签不会跳转.在我的.xib中,在Simulated Metrics下,我将它设置为ReTina 4英寸全屏.知道为什么我只在4英寸设备上看到这个问题吗?
更新1
在IB中,如果我在模拟指标中选择“导航栏”,我的标签仍然会跳转.我可以在第一个屏幕上正确呈现标签的唯一方法是不将导航控制器设置为我的窗口的根视图控制器.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
我的窗口的rootViewController被设置为一个UINavigationController,其rootViewController嵌入了一个UIPageViewController.
当我的应用加载时,会显示初始视图,其内容会向下推一点,大小与导航栏大致相同.当我滚动pageViewController时,内容会跳转到它在nib中的位置,而pageViewController加载的所有其他viewControllers都可以.
在我的appDelegate中:
self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[ContainerViewController new]];
在ContainerViewController中:
- (void)viewDidLoad { [super viewDidLoad]; self.pvc = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil]; self.pvc.datasource = self; self.pvc.delegate = self; DetailViewController *detail = [DetailViewController new]; [self.pvc setViewControllers:@[detail] direction:UIPageViewControllerNavigationDirectionForWARD animated:false completion:nil]; [self addChildViewController:self.pvc]; [self.view addSubview:self.pvc.view]; [self.pvc didMoveToParentViewController:self]; }
- (void)viewDidLoad { [super viewDidLoad]; self.automaticallyAdjustsScrollViewInsets = false; DetailViewController *detail = [[DetailViewController alloc] init]; [self setViewControllers:@[detail] direction:UIPageViewControllerNavigationDirectionForWARD animated:false completion:nil]; }
以上是大佬教程为你收集整理的ios – 使用UINavigationController在UIPageViewController中下载内容全部内容,希望文章能够帮你解决ios – 使用UINavigationController在UIPageViewController中下载内容所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。