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

Item selection #4

Closed
sebastienboulogne opened this issue Sep 9, 2016 · 3 comments
Closed

Item selection #4

sebastienboulogne opened this issue Sep 9, 2016 · 3 comments

Comments

@sebastienboulogne
Copy link

Hey, very cool work but how do you retrieve an item index click ? I mean i want to perform a segue retrieving the index item and its label title ? Thx :)

@v-braun
Copy link
Owner

v-braun commented Sep 9, 2016

I didn't handle any user interactions within the View.
The instances you return with
piledView(viewForPiledView: VBPiledView, itemAtIndex index: Int) -> UIView
are stored within the view and get never removed.

For your case:

  • Create your views
  • Attach gesture recognizer to them (only once and not on every call of "viewForPiledView")
  • Set the dataSource and show the PiledView

IMPORTANT:
This behavior means that all of the views get never removed!
You shouldn't use to many views within the PiledView (maybe not more than 100!???)

Hope this help you?

@v-braun v-braun closed this as completed Sep 23, 2016
@wdcurry
Copy link

wdcurry commented Nov 10, 2018

beautiful end result in this repo but the view retrieval count is staggering. One simple view with a few seconds of scrolling can result in thousands of calls, thousands! That is just too much. Love the look though, and perhaps will revisit to fork and re-jig unless it gets optimized before i can. Great inspiration though, thank you.

@v-braun
Copy link
Owner

v-braun commented Nov 11, 2018

@wdcurry thanks for your feedback!
Unfortunately, I'm busy with some projects and have not the time to work on that.
If you find the time it will be great! Thanks again

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

3 participants