改变颜色uipagecontroller

时间:2015-11-30 06:20:11

标签: ios uipageviewcontroller uipagecontrol

enter image description here

我怎么能改变这样的颜色uipagecontroler?

UIPageControl *pageControl = [UIPageControl appearance];
pageControl.pageIndicatorTintColor = [?];
pageControl.currentPageIndicatorTintColor = [?];
pageControl.backgroundColor = [?];
pageControl.tintColor = [?];

我已经尝试改变色调颜色whitecolor和背景clearcolor但它不起作用,mabye我想念一些东西吗?

帮助我

1 个答案:

答案 0 :(得分:0)

在applicationdidfinish Launch in App Delegate

中添加
UIPageControl *pageControl = [UIPageControl appearance];
pageControl.pageIndicatorTintColor = [UIColor lightGrayColor];
pageControl.currentPageIndicatorTintColor = [UIColor blackColor];
pageControl.backgroundColor = [UIColor whiteColor];