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

cannot run didScroll correctly. why use backgroundImageView? #152

Closed
alexookah opened this issue Jan 8, 2020 · 5 comments
Closed

cannot run didScroll correctly. why use backgroundImageView? #152

alexookah opened this issue Jan 8, 2020 · 5 comments

Comments

@alexookah
Copy link
Contributor

alexookah commented Jan 8, 2020

I noticed that in the example for multiple images:
agrume.didScroll = { [unowned self] index in self.collectionView.scrollToItem(at: IndexPath(item: index, section: 0), at: [], animated: false) }
does not work because the UIViewController behind Agrume is not really shown.
When using blur a backgroundImageView is taking some snapshot which is between UIViewController and Agrume.
What's the usage of backgroundImageView?

after it is dismissed for some reason the didScroll function is being called with some delay in the change.

@alexookah alexookah changed the title why use backgroundImageView? cannot run didScroll correctly. why use backgroundImageView? Jan 8, 2020
@JanGorman
Copy link
Owner

IIRC this was a workaround for a bug at the time that it didn't take the correct snapshot and this was a way to pass in the correct view for it to snapshot. This functionality can probably be removed

@alexookah
Copy link
Contributor Author

@JanGorman
https://streamable.com/szwtf
I can see that its not working correctly in presenting mode. I agree this should be removed. Should i make a PL?

@alexookah
Copy link
Contributor Author

@JanGorman
I see you did some cleanup. Did you have a chance to check BackgroundImageView if the functionality can be removed eventually.

@JanGorman
Copy link
Owner

It was only a quick 15 mins of cleanup when I got home yesterday. If you have time to check this further please feel free to do so

@JanGorman
Copy link
Owner

I'm on it. My earlier statement was about something else, I got the two mixed up. So… reason to have the background image view was back then (I wrote the first version 5 years ago 😅) blurring was a bit of a performance concern but indeed these days not an issue. I'll push something shortly

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

No branches or pull requests

2 participants