JWAutumn / ACarousel

A carousel view for SwiftUI | SwiftUI 旋转木马效果
MIT License
406 stars 81 forks source link

what should the index be when there are no items? #21

Closed nimrodbens closed 2 years ago

nimrodbens commented 2 years ago

i’m having a crash in this library and i can’t seem to pinpoint it.

i have dynamic data so it can also have zero items.

in this case what seems to be the only working thing is to set the index to -1, but i’m not sure if it’s the right way.