D
D
Dima Grib2018-03-24 18:33:02
Images
Dima Grib, 2018-03-24 18:33:02

How to add Activity Indivator ImageView.image?

Friends, I need help
1. The application implements an activityIndicator, and it is displayed while json loads an array of media.
2. But from the moment it is loaded until the photo appears, for example, on imageView, 1-1.6 seconds pass, when it is not there and the photo is not displayed.
3. I tried using dispatch to delay the display of the indicator for a given time difference, but I would not like a "crutch-style" solution
4. Does anyone have any ideas?
PS
Display via switch with check for nil imageView.image didn't work either

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Glueckskind, 2018-03-26
@Glueckskind

in the next line, how do you set the imageView.image value to hide the indicator
activityIndicator.stopAnimating()
activityIndicator.isHidden = true

A
Aleksandr Govorukhin, 2018-04-26
@SnapSh0t

I faced the same situation. I turned on the indicator at the beginning of the session and turned it off when it downloaded all the photos. I do not understand the complexity of the task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question