Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is tvOS working? #24

Open
f1nality opened this issue Dec 6, 2015 · 7 comments
Open

is tvOS working? #24

f1nality opened this issue Dec 6, 2015 · 7 comments

Comments

@f1nality
Copy link

f1nality commented Dec 6, 2015

Hello!

is tvOS working?
I tried to add UIScrollView-InfiniteScroll to my project - addInfiniteScrollWithHandler is not called and it's not called for me in supplied Demo tvOS project either.
P.S. I'm trying to use with collectionView

@pronebird
Copy link
Owner

Hi,

I played with tvOS a month ago and there was a number of issues in how scrolling is handled and the mask view on scroll view that tends to cover half of activity view as you pan with remote. Not sure if things changed since then.

@f1nality
Copy link
Author

f1nality commented Dec 7, 2015

I tried to debug it, looks like panGestureRecognizer's selector pb_handlePanGesture: is not called for me. iOS demo works fine.

@pronebird
Copy link
Owner

@f1nality scrolling on tvOS is very different.

  • I don't think scroll view manages isDragging
  • There is no concept of elastic bounce, which means that loader should kick in as soon as scroll view hits the bottom.

You can comment a couple of lines in pb_scrollViewDidScroll to see how it works.

Essentially:

  • Comment out any checks for [self isDragging]
  • Make sure contentOffset.y >= actionOffset because there is no elastic bounce as I mentioned so > check would not pass, needs equality check.

Then what I observe is a mask view with gradient that covers the activity indicator.

@f1nality
Copy link
Author

f1nality commented Dec 7, 2015

@pronebird
yes, this two changes fixed the problem, thanks!

By the way, it's a common practice to have horizontal collectionviews in tvOS apps. This extension works only for vertical, right?

@pronebird
Copy link
Owner

@f1nality yes, vertical only so far.

@zvonicek
Copy link

I'm using this fork for horizontal Collection Views and it works nicely. Maybe you could consider a merge.

https://github.com/pilot34/UIScrollView-InfiniteScroll

@pronebird
Copy link
Owner

@zvonicek thanks for the link. It should be fairly easy to implement horizontal behavior. Unfortunately I don't have time to test and implement that yet, but I'd gladly accept a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@pronebird @zvonicek @f1nality and others