Skip to content

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

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

3 participants

@nurey
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
Owner
dlinsin commented Mar 5, 2012

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

@dlinsin
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
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

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

@dlinsin
Owner
@nurey
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 dlinsin added a commit that referenced this issue Mar 18, 2012
@dlinsin Added description for fractional images #9
* closes #9
cb64146
@dlinsin dlinsin added a commit that closed this issue Mar 18, 2012
@dlinsin Added description for fractional images #9
* closes #9
cb64146
@dlinsin dlinsin closed this in cb64146 Mar 18, 2012
@dlinsin dlinsin added a commit that referenced this issue Jul 14, 2012
@dlinsin Merge branch 'master' into 4_ARC
* 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
6aa5e51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.