Forum Archive

File Storing

NoBetterName

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.

Any ideas?

JonB

Check out
https://forum.omz-software.com/topic/1934/virtual-display-container/8
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.

AtomBombed

You can easily make your own subclass of a ui.View that 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.ImageView objects don't handle touches like buttons do.

Phuket2

@NoBetterName , you m9ght want to,also look at this post. A think @JonB helped me with

https://forum.omz-software.com/topic/3297/ui-tableviewcell-returning-a-custom-class-instead