1
我如何显示不同 - 所有页面的不同颜色。Uipageviewcontroller pager点颜色 - 改变所有页面的diff颜色
- (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController {
[self setupPageControlAppearance:currentPageIndex];
return currentPageIndex;
}
- (void)setupPageControlAppearance:(NSInteger)index
{
UIPageControl * pageControl = [[self.view.subviews filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"(class = %@)", [UIPageControl class]]] lastObject];
pageControl.pageIndicatorTintColor = [[UIColor lightGrayColor] colorWithAlphaComponent:0.2];
pageControl.currentPageIndicatorTintColor = [ColorUtils getCurrentPageColor];
}
它不改变当前页面颜色,因为添加视图时调用的外观。
注 - 上面的代码是为了改变当前页面的颜色我试过了。
,但有什么办法,我怎么能做到这一点 -
任何帮助吗?
感谢您的查询。 – San007