如何删除pageViewController的底部空间?
所以它可以显示图像上的控件图标而不是黑色空间..
答案 0 :(得分:0)
this post中提到了几种解决方案!它们是:将转换样式从UIPageViewControllerTransitionStyleScroll
切换到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指示符。