How to show blurry image before loading (e.g. in whatsapp) in ios?

I am making a chat application to send and upload images. I want to do some animation, like in WhatsApp. So how to show blurry image? My image is being downloaded from the server. Please help me.

+4
source share
2 answers

Enlarge the image to a very small size, for example, 8x8 pixels. Send this data to the client. It should not be more than 4 * 8 * 8= 256 B or 0.25 KB, so sending it to the client will not be a problem no matter how slow the speed of connection with the client.

8x8 (, 256x256). 8x8, UIImageView (. ). "" .

, / iOS, . iOS iOS.

+4

, ... , 2 .

  • - .. ( )

, URL- , , .. async .

...

, !

+1

Source: https://habr.com/ru/post/1627775/


All Articles