Declared in UIImageView+BFKit.h

Overview

This category adds some useful methods to UIImageView

Tasks

Class Methods

initWithImage:center:

+ (instancetype _Nonnull)initWithImage:(UIImage *_Nonnull)image center:(CGPoint)center
Discussion

Create an UIImageView with the given image and center

Parameters

image

UIImageView image

center

UIImageView center

Return Value

Returns the created UIImageView

Declared In

UIImageView+BFKit.h

initWithImage:frame:

+ (instancetype _Nonnull)initWithImage:(UIImage *_Nonnull)image frame:(CGRect)rect
Discussion

Create an UIImageView with the given image and frame

Parameters

image

UIImageView image

rect

UIImageView frame

Return Value

Returns the created UIImageView

Declared In

UIImageView+BFKit.h

initWithImage:size:center:

+ (instancetype _Nonnull)initWithImage:(UIImage *_Nonnull)image size:(CGSize)size center:(CGPoint)center
Discussion

Create an UIImageView with the given image, size and center

Parameters

image

UIImageView image

size

UIImageView size

center

UIImageView center

Return Value

Returns the created UIImageView

Declared In

UIImageView+BFKit.h

initWithImageAsTemplate:tintColor:

+ (instancetype _Nonnull)initWithImageAsTemplate:(UIImage *_Nonnull)image tintColor:(UIColor *_Nonnull)tintColor
Discussion

Create an UIImageView with an image and use it as a template with the given color

Parameters

image

UIImageView image

tintColor

UIImageView tint color

Return Value

Returns the created UIImageView

Declared In

UIImageView+BFKit.h

Instance Methods

setImageShadowColor:radius:offset:opacity:

- (void)setImageShadowColor:(UIColor *_Nonnull)color radius:(CGFloat)radius offset:(CGSize)offset opacity:(CGFloat)opacity
Discussion

Create a drop shadow effect

Parameters

color

Shadow’s color

radius

Shadow’s radius

offset

Shadow’s offset

opacity

Shadow’s opacity

Declared In

UIImageView+BFKit.h

setMaskImage:

- (void)setMaskImage:(UIImage *_Nonnull)image
Discussion

Mask the current UIImageView with an UIImage

Parameters

image

The mask UIImage

Declared In

UIImageView+BFKit.h