UIPageControll - 图片格式

时间:2023-03-08 18:40:22
UIPageControll - 图片格式

设置pageCon的显示风格:

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

UIPageControll - 图片格式

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

UIPageControll - 图片格式

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

UIPageControll - 图片格式