如何删除pageViewController的底部空间?
所以它可以在图像上而不是在黑色空间上显示控制图标..
这篇文章中提到了几种解决方案!它们是:将转换样式从UIPageViewControllerTransitionStyleScroll
to切换UIPageViewControllerTransitionStylePageCurl
或在 viewDidLoad 中实现以下代码:
NSArray *subviews = self.pageController.view.subviews;
UIPageControl *thisControl = nil;
for (int i=0; i<[subviews count]; i++) {
if ([[subviews objectAtIndex:i] isKindOfClass:[UIPageControl class]]) {
thisControl = (UIPageControl *)[subviews objectAtIndex:i];
}
}
thisControl.hidden = true;
self.pageController.view.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height+40);
它会自动隐藏 pageControl 指示器。