erndev / edstarrating Goto Github PK
View Code? Open in Web Editor NEWConfigurable Star Rating control for iOS and OSX
Home Page: http://www.cocoawithchurros.com
Configurable Star Rating control for iOS and OSX
Home Page: http://www.cocoawithchurros.com
Hi
First thanks for the excellent control.
When I use cocoapod it says it uses 1.1 but the source code is not the same as on the github page, especially the tintColor does not work (blank images).
kind regards
graham
UIImage *star = [UIImage imageNamed:@"star"];
_starRating.starImage = [star imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
Hi,
Thanks for making this awesome control available. I was using Apple's NSLevelIndicator until I saw this. The level indicator doesn't let you have a different image for the different states of the stars like yours does. This is so much nicer.
So I ran into a problem with your code because I am using it within a view-based NSTableView and so have it embedded within an NSTableCellView. In this situation, the mouseUp and mouseDown events aren't called.
To solve the problem, I added this code to your mouseDown event:
if (![self.superview isKindOfClass:[NSTableCellView class]]) {
[super mouseDown:theEvent];
}
Essentially, when [super mouseDown:theEvent] is called when inside an NSTableView, the mouseUp and mouseDragged events will never be called. Adding this code solved the problem for me.
Thanks!
Brendan
Hi,
I have used this Pod within my workspace. Is the pod spec the latest version?
I have a custom cell setup, I have dragged a UIView and sized it then changed the class to EDStarRating and created an outlet. In the UITableViewController I access the cell.starRatingView property and update using the same code in your example but no stars are showing.
The example sets the stars to 2.5 I have made no changes there. The only part is that I am not setting a delegate but I do not need the stars to update by the user they are loaded from values we already have/collect.
Is there anything to look out for from the above? I checked your other issues etc and see starSize was added but that is not available from the pod install that I have completed.
Thanks
Its working perfectly fine in +iOS7, please share if faced the same issue.
I add a EDStarRating to a UICollectionViewCell. This seems to work until I start scrolling, then a crash occurs (looks like a memory issue)
Would it be possible to include the version number in the header file comment for the library? It would make it easier to keep track of the version currently included in a project (assuming the project doesn't use CocoaPods, etc).
When creating view programmatically and then calling ratingView.translatesAutoresizingMaskIntoConstraints = false
it stops being editable
It's now 2020.
However, the latest release is 1.1 (commit 0b04b6c) in 2013 and there are some commits not released.
Can you please release 1.2 and push into CocoaPods?
Hi there,
Nice library!
I know it's possible to programmatically select half a star (e.g. 2.5 stars) using code like the below[1], but is it possible to do the same on touch?
Your iOS Sample project only seems to return whole stars when I change the star value on touch.
[1]
// This allows you to programmatically set a half star value.
_starRating.rating= 2.5;
_starRating.displayMode=EDStarRatingDisplayHalf;
Cheers.
Looks like installing via CocoaPods doesn't include fix for ignoring editable property in onTouchMoved:
How do I set the star size? Right now we're using images with different sizes but this method isn't very scalable.
Thanks
The line where the warning appears:
https://github.com/erndev/EDStarRating/blob/master/EDStarRating/EDStarRating.m#L186
The warning is: "Incorrect decrement of the reference count of an object that is not owned at this point by the caller"
The colorSpace
object is created on line 182:
CGColorSpaceRef colorSpace = [[color colorSpace] CGColorSpace];
The method should return an autoreleased CF object, afaict. It should not be released, or it would be overreleased and it could lead to a crash. It might still work ok if color spaces are singletons and never released, which I suspect is probably the case (I don't think a new color space obejct is created every time a color is created).
In any case, removing the release call would get rid of the static analyzer warning, and as far as I can tell, things work perfectly well without it.
Hi, I've added the EDStarRating pod and ran "pod install" (which has worked for 100% of pods in the past), but the class doesn't come up when setting it as the custom class on a View in Interface Builder. I can see that the pod files have been pulled into the workspace -> pod project, but just can't use them.
I'm not an expert in pods and podfiles, so if there's something else that needs to be done for this one particular any help is appreciated.
Thanks
Hi, there thanks for this, working great so far, I am using Parse.com as my back end and when a user rate something I save the rating to it. And then when the user comes back I want to be able to set the number of starts to that users current rating. I have it set up just like in your sample and it is working until I try to do this. I get the number as a float from my server and then try to set _starRating.rating but then it just sets all 5 starts when the number that is being returned is 3. I have also tried using [self starsSelectionChanged:_starRating rating:number]; But I don't think this is what is should be used should it? And when I try it the app crashes.
So is there something I am doing wrong or can I not get data from the web and set that to the current number of starts.
Thanks for your help
Can you please make a completion block?
I definitely can do it by myself, however I work with ARC and iOS only.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.