akiroom / axratingview Goto Github PK
View Code? Open in Web Editor NEWStar mark rating view with flat design for iOS8, iOS9, iOS10
License: MIT License
Star mark rating view with flat design for iOS8, iOS9, iOS10
License: MIT License
Using the following modification to the current sample:
diff --git a/AXRatingViewDemo/AXRatingViewDemo/AXOnTheCellViewController.m b/AXRatingViewDemo/AXRatingViewDemo/AXOnTheCellViewController.m
index d5f33bb..685a3c8 100644
--- a/AXRatingViewDemo/AXRatingViewDemo/AXOnTheCellViewController.m
+++ b/AXRatingViewDemo/AXRatingViewDemo/AXOnTheCellViewController.m
@@ -55,12 +55,14 @@
[ratingView addTarget:self action:@selector(changeRate:) forControlEvents:UIControlEventValueChanged];
cell.accessoryView = ratingView;
[cell.accessoryView sizeToFit];
+ ratingView.baseColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
+ //ratingView.baseColor = [UIColor greenColor];
}
[cell.textLabel setText:[NSString stringWithFormat:@"No.%d", (int)(indexPath.row + 1)]];
// Setup rating view for each cell.
AXRatingView *ratingView = (AXRatingView *)cell.accessoryView;
- ratingView.value = [_ratingNumbers[indexPath.row] floatValue];
+ ratingView.value = 3;
ratingView.tag = indexPath.row;
return cell;
…will change the base color to red and force all cells to three stars. When a cell is highlighted during touch, the red stars won't be drawn as shown in this screenshot:
However, if the color set to baseColor
is one of the defaults provided by the UIColor
class, then it will show during highlight. Why? How can this be avoided with a custom color?
I put AXRatingView in the table cell. When the cell was selected, StarMaskLayer was disappeared.
why not publish to cocoapods
Are there any plans to support Autolayout?
Great work.
I can not find a interface to set the space between stars.The default space looks crowded.
It would be nice if the stars has height , right now it is hardcoded.
How can i increase the size of star
I am getting two error for IB Designables
Thanks!
Is it possible to display stars in the centre of the AXRatingView ?
How to get support for ios6
thank you for your working but I'm doubt how to set custom height
Rather than having a hard coded spacing between rating items, it'd be nice to evenly space them across the view.
It would be pretty cool if we could use 2 different symbols, for example ★ for when its highlighted and ☆ when its not.
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.