PGSSoft / ParallaxView

tvOS controls and extensions that add parallax effect to your application.
https://pgssoft.github.io/ParallaxView/
MIT License
483 stars 51 forks source link

Suggestion: canbecomefocused #9

Closed ninokierulf closed 5 years ago

ninokierulf commented 6 years ago

working with collectionView, sometimes you want the collectionViewDelegate to decide whether to allow focus or not via func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool

after some time of investigation, I discovered that when a collectionviewcell overrides canBecomeFocused, the collectionViewDelegate function func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool doesn't get called.

to solve this issue, I just commented the code in ParallaxCollectionViewCell,

//open override var canBecomeFocused : Bool {
//        return true
//}
nonameplum commented 5 years ago

Addressed with https://github.com/PGSSoft/ParallaxView/commit/28963a536a0b026dec7ba0413022268ecf1a9cc5