Search code examples
iosobjective-ciphonedelayindicator

IOS indicator before change the view


i have a collectionView, with 8 Items. One item is TableViewController, and downloading Images for cell BackgroundView.

When i just click on Item, the TableView appears 2-3 second later. (Sometimes 5sec., when bad connection). For this reason, the users will think the app is frozen.

I want to implement an indicator, which appears until the view is loaded. When do i know the TableView is finished with downloading?

Because when i click the item, the code from "TableViewController" is running, but i see the collectionView, and after 3-4 sec it appears

Need help :/

Thanks


Solution

  • I think you are not using LazyLoding for Image downloading. If you download image in main Thread then application is stuck until the image is not downloaded and display.

    You can use SDWebImage for image downloading.

    Here is the steps to implement into your application:

    -Click on Zip tag and download the archive.

    -Unarchive the file.

    -You will find the "SDWebImage" folder.

    -see that path and add this folder in your project. (don't forget to take copy of folder in your project instead of jusk linking).

    Happy Coding :)