uiimageview可以播放gif吗 ios

2025-03-26 09:39:46
推荐回答(1个)
回答1:

ls这个是基于OpenGL ES的实现。。。

UIImage支持的gif如下。。。
Supported Image Formats
Table 1 lists the file formats that can be read by the UIImage class.
Table 1 Supported file formats
Format
Filename extensions
Tagged Image File Format (TIFF)
.tiff, .tif
Joint Photographic Experts Group (JPEG)
.jpg, .jpeg
Graphic Interchange Format (GIF)
.gif
Portable Network Graphic (PNG)
.png
Windows Bitmap Format (DIB)
.bmp, .BMPf
Windows Icon Format
.ico
Windows Cursor
.cur
XWindow bitmap
.xbm
Note: Windows Bitmap Format (BMP) files that are formatted as RGB-565 are converted to ARGB-1555 when they are loaded.

但是支持gif不代表能动。。。

播放gif动画除过OpenGL ES实现,也可尝试一下UIWebView