我一直在寻找 5 星级评级控件,但尚未找到可靠的解决方案。
这个问题:
有人知道是否有iPhone 上的 5 星级组件?
提供了一些不再可用的项目链接,但我无法找到它们。
编辑:我显然不擅长跟踪项目,但我认为我的部分问题仍然存在。以下是更新后的链接 http://code .google.com/p/s7 ratingview/downloads/detail?name=s7atingview-basic-release.zip
所以这个问题分为两部分 - 是否有可靠的预制解决方案,您能指导我吗?
开发自己的解决方案是否更好/相当容易(是的,我意识到这两个方面是冲突的)?您能给我一些提示/资源吗?我理解子类化 UIView 和跟踪触摸事件以将图像扩展到另一个图像上以看起来像星星的基本思想,但更多的方向会有所帮助。我在 iPhone 上进行开发已经不到一周了,仍然需要一些指导。
I have been looking for a 5-Star rating control for a while now and have not found a solid solution.
This question:
Anyone know whether there is a 5-star rating component on iPhone?
Provided a couple of links to projects which are no longer available, and i have not been able to track them down.
Edit: I am apparently bad at tracking down projects, but I think part of my question still stands. Here is the updated link http://code.google.com/p/s7ratingview/downloads/detail?name=s7ratingview-basic-release.zip
So this questions is 2 part - Is there a solid premade solution out there, and could you direct me to it?
Is it better / fairly easy to (yes, i realize these two facets are in conflict) grow my own solution? Could you give me some tips/resources to do so. I understand the basic idea of subclassing UIView and tracking touch events to expand an image ontop of another image to look like stars, but a little more direction would be helpful. I have been developing on the iphone for a little under a week and still need a bit of hand-holding.
发布评论
评论(4)
您可以尝试一下DYRateView。我想尽可能地重用 Ray 教程中的那个,但是其中缺少几个功能,所以我自己制作了一个。
您可以查看我的博客,了解有关如何在项目中使用 DYRateView 的更多详细信息:http://iappexperience.com/post/23227218867/dyrateview-a-simple-yet-powerful- rating-control-for。
You can give DYRateView a try. I wanted to reuse the one in Ray's tutorial as much as possible, but there were several features missing from it, so I made one myself.
You can check out my blog for further details on how to use DYRateView in your project: http://iappexperience.com/post/23227218867/dyrateview-a-simple-yet-powerful-rating-control-for.
尝试 Ray Wenderlich 的 具有 5 星级评级的自定义 UIView。
[编辑]
您还可以尝试使用 UISlider 并提供最小/最大轨道图像。
Try Ray Wenderlich's custom UIView with a 5-star rating.
[EDIT]
You can also try using UISlider and supplying a minimum/maximum track images.
您可以尝试的另一种方法 DLStarRating 可让您自定义星星下方的区域,检测触摸。
Another way you may try DLStarRating lets you customize the area below the stars, detecting touches.
只需简单地给一颗星即可遵循此代码并将其复制并粘贴到您的项目中并轻松运行。
Just Easy to Give a Star Follow this Code and Copy and Paste into Your Project and Simply Run.