B4i Library [Class] ImageDownloader

Discussion in 'iOS Libraries' started by Erel, Mar 16, 2015.

  1. Erel

    Erel Administrator Staff Member Licensed User

    This class helps with downloading multiple images and setting them to multiple ImageViews.

    It is similar to B4A ImageDownloader class: http://www.b4x.com/android/forum/th...-simple-way-to-download-images.30875/#content

    Using it is simple, you just need to create a map that maps between the ImageViews and the links with the images and it will download the images and set them.
    You can call Download multiple times with different maps.

    Note that ImageDownloader object should usually be referenced with a global variable.
     

    Attached Files:

  2. Mashiane

    Mashiane Expert Licensed User

    Thanks
     
  3. susu

    susu Well-Known Member Licensed User

    Note: This class can not deal with file name contains space.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You are responsible for url escaping the parameters. You can use StringUtils for this.
     
  5. jazzzzzzz

    jazzzzzzz Active Member Licensed User

    Why there is no caching in this class like in android...?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    iOS is simpler than Android. The purpose of the cache in the B4A version is to reuse the images when the activity is recreated (mainly when the screen is rotated). This is not relevant here as the pages are only created once.
     
  7. jazzzzzzz

    jazzzzzzz Active Member Licensed User

    That make sense
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    upload_2016-7-31_9-23-35.png

    Example of CustomListView with ImageDownloader.
     

    Attached Files:

    Jamie8763 and MarcoRome like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice