UIPageControll - 图片格式

设置pageCon的显示风格:

  • 1. 颜色
1 page.pageIndicatorTintColor = [UIColor redColor];
2 page.currentPageIndicatorTintColor = [UIColor greenColor];

UIPageControll - 图片格式_第1张图片

  • 2. 平铺图片
1 page.currentPageIndicatorTintColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"dot_selected"]];
2 page.pageIndicatorTintColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"dot_normal"]];

UIPageControll - 图片格式_第2张图片

  • 3. 修改属性
1 [page setValue:[UIImage imageNamed:@"compose_keyboard_dot_normal"] forKeyPath:@"pageImage"];
2 [page setValue:[UIImage imageNamed:@"compose_keyboard_dot_selected"] forKeyPath:@"currentPageImage"];

UIPageControll - 图片格式_第3张图片

你可能感兴趣的:(UIPageControll - 图片格式)