Git Product home page Git Product logo

edstarrating's People

Contributors

erndev avatar nicklockwood avatar nnd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edstarrating's Issues

mouseUp and mouseDragged events not called when in NSTableCellView

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

Completion block

Can you please make a completion block?
I definitely can do it by myself, however I work with ARC and iOS only.

Can provide a new release?

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?

Outdated Pod spec

Looks like installing via CocoaPods doesn't include fix for ignoring editable property in onTouchMoved:

Custom Class not found

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

Align stars left/right

It could be nice to align the stars to either the left or right side.

My text above is aligned to left and the stars are indented, it looks funny.

skaermbillede 2014-12-27 kl 01 03 40

PodSpec does not use the version with the tintColor

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

iOS: Select half a star with touch event?

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.

Stars Not Showing

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

Include version number in header

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).

Set initial rating from data from web

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

Set star size?

How do I set the star size? Right now we're using images with different sizes but this method isn't very scalable.

Thanks

Static analyzer warning

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.

Which license?

The README lists a BSD 3-Clause license (2014) while the Podspec has an MIT license (2013).

Which license is the correct one?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.