Closed latne1ec closed 7 years ago
Thanks for trying it out. It's still in it's early stages so I hope you can make use of it. I love to get your feedback.
First of all, make sure you are using the newest version, v0.1.5. I just updated it yesterday and adjusted some issues with customizing wedge shapes and labels.
What I've done in my practice apps is to create an array of colors like so:
let colorPalette: [UIColor] = [UIColor.blue, UIColor.brown, UIColor.cyan, UIColor.darkGray, UIColor.green, UIColor.magenta, UIColor.red, UIColor.orange, UIColor.black, UIColor.gray, UIColor.lightGray, UIColor.purple, UIColor.yellow, UIColor.white]
Then in wedgeForSliceAtIndex, setting the color like so:
let wedge = SpinWheelWedge()
wedge.shape.fillColor = colorPalette[Int(index)].cgColor
You can also set the wedge's label like so:
wedge.label.text = "Label #" + String(index)
Then close out the function by returning the wedge:
return wedge
Hope this helps. I'll try to get an example app uploaded in the near future.
My notifications are sent to an old email so I am just now seeing this. Thanks a ton for the detailed info, implementing now!
Cheers!
Thanks for the lib! You're saving me a ton of time.
I've tried setting the wedge background color directly in wedgeForSliceAtIndex but it isn't working
How do you modify the color of each wedge?