FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
UIImage(UIGraphics) Category Reference

UIImage graphics extension. More...

#import <UIImage.h>

Instance Methods

(UIImage *) - imageByResizingToSize:
 Returns a resized image by given size. More...
 
(UIImage *) - imageByCroppedToRect:
 Returns a cropped image by given rect. More...
 
(UIImage *) - imageByFilledWithColor:
 Color filled image with given color. More...
 

Class Methods

(UIImage *) + imageWithColor:size:
 Colored image by given size. More...
 
(UIImage *) + clearImage
 Clear colored image. More...
 
(UIImage *) + imageWithBezierPath:color:backgroundColor:
 Image drawn with bazier path. More...
 

Detailed Description

UIImage graphics extension.

Method Documentation

+ (UIImage *) clearImage

Clear colored image.

- (UIImage *) imageByCroppedToRect: (CGRect)  rect

Returns a cropped image by given rect.

Parameters
rectThe rect to crop.
Returns
An UIImage object containing a cropped image from the image.

This method depends on CoreGraphics.

- (UIImage *) imageByFilledWithColor: (UIColor *)  color

Color filled image with given color.

Parameters
colorThe color to fill

This method depends on CoreGraphics.

- (UIImage *) imageByResizingToSize: (CGSize)  size

Returns a resized image by given size.

Parameters
sizeThe size to resize.
Returns
An UIImage object containing a resized image from the image.

This method depends on CoreGraphics.

+ (UIImage *) imageWithBezierPath: (UIBezierPath *)  path
color: (UIColor *)  color
backgroundColor: (UIColor *)  backgroundColor 

Image drawn with bazier path.

Parameters
pathThe bezier path to draw.
colorThe stroke color for bezier path.
backgroundColorThe fill color for bezier path.
+ (UIImage *) imageWithColor: (UIColor *)  color
size: (CGSize)  size 

Colored image by given size.

Parameters
colorThe color to fill.
sizeThe image size to create.

The documentation for this category was generated from the following file: