OK, this might sound a bit weird, but here it is:
I want to mimic the Camera Roll. I know I can have all my files in a separate folder in my app, but I want to display them to the user like the Camera Roll displays your photos.
I tried using several ui Views (i'm trying to use the ui module), but none seem to match what I want.
Just a bunch of boxes, each with a document or photo attached to them. If the box is clicked, I will use the quicklook() function to show it. I thought of buttons inside of a scrollView, but I can't figure out how to implement that because the positions change when the user scrolls.
which has some code that does what you are asking. @omz provided an knitial implementation, @phuket2 showed how he adapted it for his own use.
You can easily make your own subclass of a
ui.Viewthat contains all of the necessary components that are required to show each individual image. You can also make it so that the custom subclass can just be an image, and still be tapped and run an action. This is useful since normal
ui.ImageViewobjects don't handle touches like buttons do.