0

我想实现这样的目标:

在此处输入图像描述

总共应该有 5 个点,但黑色的点可以是可变的。是否有任何 Github 项目或类似的项目?我尝试使用 UIProgressbar 的子类,但效果并不好!

cell.ratingDot.numberOfPages = 5;
cell.ratingDot.alignment = GTControlAlignmentLeft;
cell.ratingDot.pageIndicatorTintColor = [UIColor whiteColor];
//Its not possible as you can see to set more than one dot to the  ratingDot value
cell.ratingDot.currentPageIndicatorTintColor = [UIColor blackColor];
4

2 回答 2

1

怎么样…

A UIView,有 5UIImageView个子视图,每个 imageView 都有一个常规且突出显示的图像:

- initWithImage:highlightedImage:

然后highlighted根据评分设置每个 imageView 的属性。

与其只是引入一些第 3 方代码,不如把它当作学习的机会!

于 2015-04-23T09:56:11.340 回答
1

在 GitHub 上将ios 评级为查询的快速搜索给了我这个:

提示:浏览 GitHub 时,最多输入一两个字。描述您需要的内容,然后是官方 StackOverflow 标签(例如 ios、java 等)。

于 2015-04-23T09:51:42.240 回答