Bez popisu

mortimer 21932aaaf0 a %!s(int64=6) %!d(string=před) roky
..
Classes 21932aaaf0 a %!s(int64=6) %!d(string=před) roky
.DS_Store 21932aaaf0 a %!s(int64=6) %!d(string=před) roky
LICENSE 21932aaaf0 a %!s(int64=6) %!d(string=před) roky
README.md 21932aaaf0 a %!s(int64=6) %!d(string=před) roky

README.md

APAvatarImageView

APAvatarImageView

Subclass of UIImageView to create a circle avatar image view with configurable border width and border color

Usage

Usage is easy:

Add the dependency to your Podfile:

platform :ios
pod 'APAvatarImageView'
...

Run pod install to install the dependencies.

Next, import the header file wherever you want to use the avatar image view:

#import <APAvatarImageView/APAvatarImageView.h>

Finally, add the Custom class of APAvatarImageView to UIImageView in Interface Builder or you can create it programatically using the following code:

APAvatarImageView *avatarImageView = [[APAvatarImageView alloc] initWithImage:[UIImage imageNamed:@"profile"] borderColor:[UIColor blackColor] borderWidth:1.0];

You can change the color or width of the border by setting borderColor or borderWidth value

avatarImageView.borderColor = [UIColor redColor];
avatarImageView.borderWidth = 3.0;

Demo

There is a Demo XCode project in the Demo folder. Just clone the repository and run pod install and finally run the project by opening the Avatar.xcworkspace

License

Usage is provided under the MIT License. See LICENSE for the full details.