UIPageViewController page control background color

后端 未结 9 1338
一个人的身影
一个人的身影 2020-12-13 00:23

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

9条回答
  •  再見小時候
    2020-12-13 00:45

    Add the following code in the UIPageViewController.

    - (void)viewDidLoad {
        [super viewDidLoad];
        [[UIPageControl appearance] setPageIndicatorTintColor: [UIColor grayColor]];
        [[UIPageControl appearance] setCurrentPageIndicatorTintColor: [UIColor whiteColor]];
        [[UIPageControl appearance] setBackgroundColor: [UIColor darkGrayColor]];
    }
    

提交回复
热议问题