How to randomly show 1 or multiple images from assets listed/numbered in plist

Hello. I'm starting to learn Swift mostly for a singular purpose - to create a personal app for only myself that will randomly show me images from those I've put into an asset folder. The assets are also listed/numbered in a plist. One example is a folder of images from places I've traveled in life that, for various reasons aside from COVID, I can no longer get to and some can never get to again. There are a little more than 10,000 of these. Being able to look at them is one thing, but I've found that randomly scrolling and looking at whichever one pops up seems to trigger pretty intense memories and happiness. I'd like to replicate that.

What I can't find is how to create a button that when pushed will select a random image and display it or another button that can display multiple images - either a number I enter or just a manually coded number (like 3 at a time, or a dozen, or something).

Most of the images will be the same size - most of them iPhone pictures from when I was at various places - but some won't be exactly the same size - for example, pictures from other family members' iPhones or cameras.

To be honest, I have no idea where to start because some of the bits I've found through searching have pulled up really old results or ones that won't work for me due to limits on the number. For example, random number or randomly show one of three images that have been manually typed out, etc.

I'd appreciate any guidance on this part.

Terms of Service

Privacy Policy

Cookie Policy