Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

My image and `withTintColor`

Open matsotaa opened this issue 4 years ago • 2 comments

Hello, evgenyneu Thank you for your pod) I've got some question here. I have image in png format. I'm able to change tint of it in casual UIImageView with help of .withTintColor(_:) as it expected, but when I add image to rateView.settings.filledImage or rateView.settings.emptyImage with this method nothing happens. It adds my image with origin tint color. Is that supposed to be like that or kinda bug? How can I change tint color of added image in your pod?

And one more question: Is it possible to change alignment of stars? Default statement like on left side. Can I make all stars aimed on center in my view?

Sincerely, Andrew

  • Library setup method: CocoaPods
  • Version of the library: 23.0
  • Xcode version. 12.0
  • OS version. Example: 13.0

matsotaa avatar Jan 24 '21 13:01 matsotaa

Hi @matsota, thanks for reporting the issues.

It adds my image with origin tint color. Is that supposed to be like that or kinda bug? How can I change tint color of added image in your pod?

Yes, it's a bug in Cosmos library, there is no way to display tinted images for the stars at the moment. It has not been implemented. Cosmos does not use UIImageView, but instead draws the stars images using CALayers (see code). If we want to implements the tint, we need to update the library and do something like this.

Is it possible to change alignment of stars? Default statement like on left side. Can I make all stars aimed on center in my view?

You can use auto layout and center the cosmos view in your screen, as shown here.

evgenyneu avatar Jan 25 '21 00:01 evgenyneu

Oh, thanks a lot)

matsotaa avatar Jan 27 '21 06:01 matsotaa