tapptitude / TTFortuneWheel-iOS

Fortune spinning wheel that supports custom drawing.
MIT License
132 stars 41 forks source link

If there are only two slices in the array, it always fails. #3

Closed Zedd0202 closed 6 years ago

Zedd0202 commented 6 years ago

How should I fix it?

EfraimB commented 6 years ago

Hello, can send us the line of code where it does fail and what exception does it throw. Thanks!

Zedd0202 commented 6 years ago

(Even if the grammar is not natural, please understand...:-)...)

Just a couple of slice arrays from the example source.. let slices = [ CarnivalWheelSlice.init(title: "1"), CarnivalWheelSlice.init(title: "2") ] Roulette can not choose. Once you run it, you will understand!!!!!! (And even when there are three slice arrays, they do not come exactly to the center.)

EfraimB commented 6 years ago

Just tried it and it works fine, with both 2 or 3 slices. Can tell us the line where it does crash? screen shot 2018-05-02 at 11 12 54 am screen shot 2018-05-02 at 11 11 08 am