zl程序教程

您现在的位置是:首页 >  其他

当前栏目

[翻译] LASIImageView - 显示进度指示并异步下载图片

下载异步 显示 图片 翻译 进度 指示
2023-09-14 08:57:59 时间

 

LASIImageView – download image with progress indicator

翻译原网址:http://lukagabric.com/lasiimageview-download-image-with-progress-indicator/#more-797

LASIImageView is a UIImageView subclass that supports asynchronous image download with different progress indicators. It is possible to choose among three different progress indicator styles, with or without percent text.

LASIImageView继承自UIImageView,支持异步下载图片,并在图片上显示下载进度指示条。当然,你可以选择3种不同的指示条显示风格,每种指示条风格都可以显示或者不显示数字百分比。

In order to use it, just add LASIImageView class files to the project and set the instance imageUrl property to download and display the image.

使用很简单,把LASIImageView类拖入到你的工程中,设置好属性imageUrl,然后显示图片。

LASIImageView includes shared appearance settings. Appearance can also be specified for any LASIImageView instance, overriding the global appearance for that object.

LASIImageView包含全局显示的设定。当然呢,你也可以给任意指定的LASIImageView单独设定,用你新设定的值覆盖全局的那个值即可。

ASIHTTPRequest is used for image download. Request settings can be set for LASIImageView instances globally, or per instance, overriding the global settings.

ASIHTTPRequest开源库用来下载图片。网络请求的设定可以用来给LASIImageView设定全局的值,或者给每一个实例对象单独设置(新赋值覆盖全局的值即可)。

On request finished – success or fail blocks are called (LASIImageViewDownloadFinishedBlock or LASIImageViewDownloadFailedBlock).

当网络请求结束后,成功或者失败的block将会被调用。

LASIImageView is hosted on my GitHub


几种播放音频文件的方式(一) —— 播放本地音乐几种播放音频文件的方式(二) —— 音效播放几种播放音频文件的方式(三) —— 网络音乐播放几种播放音频文件的方式(四) —— 音频队列服务(Audio Queue Services)(一)几种播放音频文...
某次被问到如何实现一个滚筒状的控件,就是可以将一张很长的图片沿着Y轴无限旋转,如下图所示: 大概就是这个意思,当时还不知道图片可以裁剪,想不出整个流程怎么搞,后来得知Bitmap有裁剪功能,才想到这个功能怎么实现,花了一下午时间整了一下有了成果。