TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Feb 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Drew Kiino.
An image downloading and processing framework powered by Gavin Bunney’s Toucan, Olivier Poitrey’s SDWebImage, and Due Munk’s AsyncSwift all wrapped in an efficient yet powerful wrapper.
With a single fully-featured extension, you can perfrom image downloads, image processing, and image handling all in one go just with a single line of code. All of these processes happen in the background-thread and is never invasive, is performant, and clean.
pod 'Tide'
profileImageView.imageFromSource("https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg")
These are all the options:
profileImageView.imageFromSource(
URL: "https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg",
placeholder: UIImage(named: "default-placeholder"),
fitMode: .Clip,
mask: .Squared,
cornerRadius: 8.0,
borderWidth: 1.0,
borderColor: .redColor(),
animated: true,
forced: false,
progress: { progress in
// do something with progress
}) { image in
// do something with image
}
URL: String?
placeholder: UIImage?
fitMode: Tide.fitMode
mask: Tide.Mask
cornerRadius: CGFloat
borderWidth: CGFloat
borderColor: UIColor
animated: Bool
forced: Bool
progress: (Float -> Void)?
block: (image: UIImage?) -> Void)?
.imageFromSource()
extends to UIButtons as well! It comes with all the features along with a UIControlState parameter.
The methods listed below also extend from both UIImageView and UIButton:
.fitClip(image: UIImage?, fitMode: .Clip, completionHandler: ((image: UIImage?) -> Void)?)
.rounded(image: UIImage?, cornerRadius: CGFloat, borderWidth: CGFloat, borderColor: UIColor, completionHandler: ((image: UIImage?) -> Void)?)
.squared(image: UIImage?, cornerRadius: CGFloat, borderWidth: CGFloat, borderColor: UIColor, completionHandler: ((image: UIImage?) -> Void)?)
Credit goes to Gavin Bunney, Olivier Poitrey, and Due Munk for providing a foundation for this wrapper.
If your work is presented in this framework and you do not want it to be, please let me know at:
[email protected]
Copyright © 2016 by Andrew Aquino, TotemV.LLC
License MIT (Pacific)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Status API Training Shop Blog About