Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lihei12345/CYFastImage
DEPRECATED
https://github.com/lihei12345/CYFastImage
Last synced: 3 months ago
JSON representation
DEPRECATED
- Host: GitHub
- URL: https://github.com/lihei12345/CYFastImage
- Owner: lihei12345
- License: mit
- Created: 2014-06-17T11:27:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-28T11:07:53.000Z (over 9 years ago)
- Last Synced: 2024-08-01T19:31:31.548Z (6 months ago)
- Language: Swift
- Homepage:
- Size: 426 KB
- Stars: 77
- Watchers: 4
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-swift-cn - CYFastImage - display images from web. (Libs / Images)
README
DEPRECATED
==========CYFastImage
===========A iOS library for displaying web images by Swift. It's inspired by SDWebImage and Volley.
I tried some features in Swift:
* fulfilling namespace feature in Swift by using nest types and extensions
* accomplishing singleton by type properties
* using custom NSOperation to do simple network quque
* using lovely and great closures to remove delegates ! It's much more elegate than block.There are also many things need to be done, such as runloop in separate thread for NSURLConnection, using NSURLSession instead of NSURLConnection.
Example
========
Just like this:imageView.setImageURL("http://g.hiphotos.baidu.com/image/pic/item/dc54564e9258d1097dec49e3d358ccbf6c814d50.jpg",
placeHolderImage: UIImage(named: "default_placeholder.png"))