Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fractional rating doesn't work for small images (11x11) #9

Closed
nurey opened this issue Mar 5, 2012 · 6 comments
Closed

fractional rating doesn't work for small images (11x11) #9

nurey opened this issue Mar 5, 2012 · 6 comments

Comments

@nurey
Copy link

nurey commented Mar 5, 2012

There seems to be a problem when using small images. 11x11 px in my case. Not sure why.
Here's how it looks like rendered with DLStarRatingControl -- http://a.yfrog.com/img812/9646/l37.png

Here's the 11x11 star -- http://a.yfrog.com/img576/7623/qr8d.png

@dlinsin
Copy link
Owner

dlinsin commented Mar 5, 2012

Thanks, I'll look into it as soon as I get around

@dlinsin
Copy link
Owner

dlinsin commented Mar 11, 2012

I could reproduce this if isFractional is set to YES if you set it to NO you should be okay:

[[DLStarRatingControl alloc] initWithFrame:CGRectMake(0, 154, 320, 153) andStars:5 isFractional:NO];

I'll investigate further, but the code was provided by @kuchmiyalex and I need to dig into it first.

@dlinsin
Copy link
Owner

dlinsin commented Mar 11, 2012

@kuchmiyalex I could use your support on this. The method - (UIImage *)croppedImage:(UIImage*)image in DLStarView.m doesn't work with smaller images. I don't really understand why.

@kuchmiyalex
Copy link
Contributor

You should use image with width fractional by 10, so it could be 10x10/20x20/30x30px image.

@dlinsin
Copy link
Owner

dlinsin commented Mar 11, 2012

Thanks for the feedback, I'll add it to the docs.

with kind regards,

David Linsin


// web: http://dlinsin.github.com

On 11.03.2012, at 13:44, kuchmiyalexreply@reply.github.com wrote:

You should use image with width fractional by 10, so it could be 10x10/20x20/30x30px image.


Reply to this email directly or view it on GitHub:
#9 (comment)

@nurey
Copy link
Author

nurey commented Mar 11, 2012

Great. Thanks Alex. I goess it would also work well with images in increments of 5 if you set kNumberOfFractions to 5.

dlinsin added a commit that referenced this issue Jul 14, 2012
* master:
  updated podspec
  Basic spec file, the version and tag/commit for the build will need to be updated.
  no not retain delegate
  Added description for fractional images #9
  adopted description
  dropping ios3 support
  minor cleanup of #7
  Unused method removed
  Fractional rating support
  added zucchini reference
  Added UI testing with zucchini
  Added accessibility labels for individual stars
  moved link to main repo
  Revert "moved sample screenshot to Downloads area"
  moved sample screenshot to Downloads area
  added ability to set custom images for single stars and updated the demo project with this setting
  added ability to set custom images for single stars and updated the demo project with this setting
  updated for xcode 4

Conflicts:
	DLStarRating/DLStarRatingControl.h
	DLStarRating/DLStarRatingControl.m
	DLStarRatingDemo/Classes/DLStarRatingDemoViewController.m
	DLStarRatingDemo/DLStarRatingDemo.xcodeproj/project.pbxproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants