evgenyneu / Cosmos

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

Cosmos RTL not working properly inside UITableView #151

Open mubashirhussain opened 5 years ago

mubashirhussain commented 5 years ago

Please consider submitting the following information (if relevant):

Half of the rows displayed are correct but the other half created from the reused cell is not correct.

Screen Shot 2019-11-19 at 4 15 17 PM
abdallahnh commented 4 years ago

Having the same issue, was this solved?

freemansion commented 2 months ago

Had the same issue with CosmosView instance embedded into UICollectionViewCell and RTL content semantics. My workaround to bypass this issue is to wrap view configuration code into async update with GCD.

if RTL {
  DispatchQueue.main.async {
      self.ratingView.rating = stars
  }
} else {
    ratingView.rating = stars
}

Aforementioned hack, schedules ratingView aka CosmosView is being updated after collection view methods did their job. Looks like race condition issue.