user6934446 user6934446 - 1 month ago 6
iOS Question

Load multiple images from web directory objective c ios

Good day,

I require a simple but potentially complex solution that I can't seem to find code that translates from Android for my IOS version APP.

I simply need a imageview grid such as shown here from a single web directory: https://www.youtube.com/watch?v=fIX4SnBLaZg

I have a working version on Android but can't seem to figure it out on objective C.

My working version uses JSON to find each file in the directory and associated text, then simply adds each entry to the grid. The iOS version doesn't need to be as complicated if anyone has any examples?

Would anyone have any examples/snippets/api's of implementing something like this into iOS?

Or even a simplified version such as only images from a directory. Simply have the thread read an entire folder from URL, file by file, and populate it in imageview's. Then once a user clicks on an image, simply view it full screen?

Many thanks for the help.

Answer

For your requirement you can use collection view . Please follow the below tutorial

uicollectionview-basic-tutorial

And to get images of jpg stored in bundle under folder named Images

NSArray *imagesOfjpgType = [[NSBundle mainBundle]pathsForResourcesOfType:@"jpg"
                                                                    inDirectory:@"Images"];