IOS indicator before change the view

一个人想着一个人 提交于 2019-12-25 07:03:44

问题


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


回答1:


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 :)



来源:https://stackoverflow.com/questions/29210771/ios-indicator-before-change-the-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!