evgenyneu / Cosmos

A star rating control for iOS/tvOS written in Swift
MIT License
2.18k stars 366 forks source link

Allow adding of subviews #187

Open UnknownJoe796 opened 2 years ago

UnknownJoe796 commented 2 years ago

This fixes an issue where adding a subview to a CosmosView would cause a crash.

evgenyneu commented 2 years ago

Thanks for the PR. Before fixing the issue, I would like to reproduce it first. How do I reproduce the bug?

UnknownJoe796 commented 2 years ago

Oh, sorry I missed your comment in my notifications! AFAIK all you have to do is add a subview to a CosmosView and it'll crash. I caused it working with something very similar to LifecycleHooks.
If you need me to create a test for it, I can do that. Thanks!

evgenyneu commented 2 years ago

Oh I see, adding subviews to Cosmos view is not supported, to make the code simple. Sorry.