i\'m using UIPageViewController in my app and it\'s working fine. however, it\'s page control which has been added automatically has a black background which is hiding the c
Well, I found a working solution. Inside your UIPageViewController, just add this code:
-(void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
for (UIView *view in self.view.subviews)
{
if ([view isKindOfClass:UIScrollView.class])
{
CGRect frame = view.frame;
frame.size.height = view.superview.frame.size.height;
view.frame = frame;
}
if ([view isKindOfClass:UIPageControl.class])
{
CGFloat newHeight = 22;
CGRect frame = view.frame;
frame.origin.y += frame.size.height - newHeight;
frame.size.height = newHeight;
view.frame = frame;
view.backgroundColor = UIColor.darkGrayColor;
view.alpha = 0.3;
}
}
}