我想实现这样的目标:
总共应该有5个点,但黑色圆点可以变化。 是否有任何Github项目或类似的东西? 我尝试使用UIProgressbar的Subclasses,但这并不是很好用!
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];
答案 0 :(得分:1)
quick search on GitHub with rating ios as query给了我这个:
提示:浏览GitHub时,最多输入一个或两个单词。描述你需要的东西,然后是官方的StackOverflow标签(例如ios,java等)。
答案 1 :(得分:1)
怎么样......
UIView
,包含5个UIImageView
子视图,每个imageView都有一个常规且突出显示的图片:
- initWithImage:highlightedImage:
然后根据评级设置每个imageView的highlighted
属性。
不要只是引入一些第三方代码,而是将其作为学习的机会!