evgenyneu / Cosmos

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

How to use it as a control in tvOS #21

Open arsonik opened 8 years ago

arsonik commented 8 years ago

It does work on iOS because of the touch thingy but what about tvOS ?

Can we copy what TVML offers ? https://developer.apple.com/library/tvos/documentation/LanguagesUtilities/Conceptual/ATV_Template_Guide/RatingTemplate.html#//apple_ref/doc/uid/TP40015064-CH39-SW6

tvOS Rating TVML

Cheers & Congrats for your work !

evgenyneu commented 8 years ago

Hello, @arsonik, thanks for the feedback. I am sorry, I am completely new to TVML. Can you explain a bit more about it and what you want to achieve in your tvOS app?

arsonik commented 8 years ago

Hi !

I used the tvml (look and feel) as an example. It does look like a traditional UIAlertController with a star rating subview.

So basically what I want to do is add your cosmos pod on a tvOS app not just to display a rating. (Which is working already) But also being able to rate stuff. And on tvOS it's all about element (UIView) getting focused...

So I've forked your repo, tried to play with it, but because it's made of CALayer I'm having hard time making it work.

evgenyneu commented 8 years ago

Oh I see. I have no idea how to make the user input work on tvOS, need to research it. You are right the individual stars are made of CALayers, because of the performance benefits (not sure how faster it actually is than similar thing with uiviews would be, we can test). Thank you for reporting the issue, I did not test user input on tvOS and was misleading people. Now I have put a note in the readme saying that input only works on iOS.