Cosmos
Cosmos copied to clipboard
Star Size In tableView Cell
Hi, thanks the library first! It's Great!
But I have some issue to user Cosmos View in TableView Cell
The star size is not fit the view size
like this:
Am I miss something?
Thanks for reporting. How do you position the Cosmos view in your cell? Do you limit its width and height?
Thanks for reply quickly.
Yes, I have limit its like this:
and I build for iOS 11 on iPhone 5s:
Debug View Hierarchy like this:
Is there something wrong?
Thanks for explaining your layout. Yes, this won't work, unfortunately. The size of cosmos view is determined automatically by the size of the stars and separation between them. It's like UILabel. In your layout the width of the cosmos view is limited by the leading and trailing constraints. It can't fit the stars inside this width. I would suggest using just one constraint (leading or trailing) and let cosmos view grow to the size it needs. Same applies to height. Let me know if it helps. :)
Oh, I understand! But for generally, developer usually give the view size in storyboard, and expect the star size would fit the view size automatically I think. In a word, thanks very much for your help. :)
But for generally, developer usually give the view size in storyboard, and expect the star size would fit the view size automatically I think.
Yes, that would be nice to implement, totally agree.
Thanks for your reply, if you agree with that, maybe we can implement in this way. Let me know what you think, thank you. :)
I'm currently in the middle of the semester in uni and don't have time to develop new features. Pull requests are always welcome :).
Ok, Good luck! And I don't think I am entitled to pull request because I am just a beginner. So, we can do that after end of the semester. :)
And I don't think I am entitled to pull request because I am just a beginner.
I'm a beginner as well.
So, we can do that after end of the semester. :)
Yeah, I hope so, but I would not put my money on it.
hi
But It is possible you can change size in storyboard as small as you want ,default is 20. Library is awesome, but i need how to centre that starts in broader frame .