I am using UIPageControl
and trying to make the background transparent.
UIPageControl *pageControl = [UIPageControl appearance];
pageControl.pageInd
pageControl.backgroundColor = [UIColor clearColor];
is working but!! than you have to set the backgroundColor
of the UIPageViewController
also on [UIColor clearColor]
and than! you will see the backgroundcolor of the container view.
- (void)initPageViewController
{
_pageController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll
navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal
options:nil];
UIImageView *imgView= [[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
imgView.image = [UIImage imageNamed:@"NiceBGImage"];
[self.view addSubview:imgView];
self.view.backgroundColor = [UIColor clearColor];
_pageController.view.frame = ({
CGRect frame = [[UIScreen mainScreen] bounds];
frame;
});
_pageController.delegate = self;
_pageController.dataSource = self;
_pageController.view.backgroundColor = [UIColor clearColor];
NSArray *controllers = @[_controllers[0]];
[self.pageController setViewControllers:controllers
direction:UIPageViewControllerNavigationDirectionForward
animated:NO
completion:nil];
UIPageControl *pageControl = [UIPageControl appearance];
pageControl.pageIndicatorTintColor = [UIColor lightGrayColor];
pageControl.currentPageIndicatorTintColor = [UIColor whiteColor];
pageControl.backgroundColor = [UIColor clearColor];
pageControl = [UIPageControl appearanceWhenContainedIn:[_pageController class], nil];
[self addChildViewController:_pageController];
[[self view] addSubview:_pageController.view];
[self.pageController didMoveToParentViewController:self];
}