Name: NZCircularImageView
Owner: Grupo NZN
Description: UIImageView class extension. Performs async download image and leaves with rounded edge, used for presenting pictures of user profiles.
Created: 2013-12-10 15:38:25.0
Updated: 2018-01-12 16:46:34.0
Pushed: 2015-08-25 15:25:33.0
Homepage: null
Size: 898
Language: Objective-C
GitHub Committers
User | Most Recent Commit | # Commits |
---|---|---|
Ernesto Rivera | 2014-08-12 08:42:46.0 | 2 |
Darren Ehlers | 2014-04-04 20:09:40.0 | 3 |
Bruno Tortato Furtado | 2014-09-25 13:02:20.0 | 23 |
Elie Soueidy | 2014-02-01 21:10:41.0 | 1 |
Other Committers
User | Most Recent Commit | # Commits | |
---|---|---|---|
Bruno Tortato Furtado | bruno.furtado@gruponzn.com | 2013-12-14 21:01:51.0 | 11 |
NZCircularImageView is a UIImageView extension. Its performs async download image and leaves with rounded edge.
It can be used, for example, to presenting pictures of user profiles.
NZCircularImageView works on iOS 6.0+ version and is compatible with ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:
You will need LLVM 3.0 or later in order to build NZCircularImageView.
NZCircularImageView uses SDWebImage and UIActivityIndicator-for-SDWebImage to download async images.
CocoaPods is the recommended way to add NZCircularImageView to your project.
pod 'NZCircularImageView'
pod install
.Alternatively you can directly add source files to your project.
NZCircularImageView
folder onto your project (use the “Product Navigator view”). Make sure to select Copy items when asked if you extracted the code archive outside of your project.The class overrides -(void)setFrame:
, thus ensuring that every time an image is set, it will be presented in a rounded shape.
This class also uses UIViewContentModeScaleAspectFill
contentMode with the clipsToBounds
flag so that the image resolution is not changed.
ularImageView.image = [UIImage imageNamed:@"Default-Avatar"];
his method append parameters at url:
width: image view width
height: image view height
mode: crop (crop image from center)
cularImageView setImageWithResizeURL:@"http://example.com/image.png"];
.. with custom loading indicator
cularImageView setImageWithResizeURL:kImageUrl
usingActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
.. with placeholder image
f.imageView setImageWithResizeURL:kImageUrl
placeholderImage:[UIImage imageNamed:@"Sample"]
usingActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
To enable the logs in debug/release mode, add #define NZDEBUG
at *-Prefix.pch
file in your project.
This code is distributed under the terms and conditions of the MIT license.
A brief summary of each NZCircularImageView release can be found on the wiki.