Closed khuong291 closed 8 years ago
Hello, @khuong291. I think I had similar problem in the past and solved by clearing "User defined runtime attributes" for the cosmos view (shown in the screenshot).
I have also made a quick test and put cosmos in a table view, could not reproduce your issue (see the attached demo project).
Let me know how it goes.
I have not tried your example project yet. But now It works well.
Thanks @evgenyneu. +1 ⭐ 👍
I am glad it worked. Feel free to comment if you have any other issues. Have a good day.
Can I ask one more question: Is CosmosView Rating max = 5
I think it would more covenient if you can add one more choice like so: cosmosView.ratingWithRatio(starCount: 5, maxRating: 100) = 90 So the CosmosView will have 4.5 star. 😸
Sorry, I do not understand your question. Can you give me an example of what you want to achieve in your app?
For example, I want to rating a movie, its rating has 94/100 point, So I the CosmosView.rating should be 94*5/100 = 4.7 if I want maximum with 5 star.
So If I want to use with 10 star, it should be 94*10/100 = 9.4.
I just recomend for you to implement more 😄
Oh, sorry, you have done with it. My fault.
I do value your recomendations, @khuong291. I just wanted to understand what you meant. Did you want Cosmos to show ten stars with rating 9.4? If so you can currently do it like this:
cosmosView.settings.totalStars = 10
cosmosView.settings.fillMode = .Precise // Others are .Half and .Full
cosmosView.rating = 9.4
Or you can do it from the Storyboard as well:
This is described in the configuration manual.
And thank you very much for the feedback.
Yes, I don't read your guide carefully, sorry. Your project is awesome 👍
Hello, @khuong291. I think I had similar problem in the past and solved by clearing "User defined runtime attributes" for the cosmos view (shown in the screenshot).
I have also made a quick test and put cosmos in a table view, could not reproduce your issue (see the attached demo project).
Let me know how it goes.
this solution solved my problem. thanks cleared user defined attributes from storyboard
I drag a view and set its class to CosmosView, but when I run the project, it crashes: