vilanovi/UIImage-Additions — pull request #4 by devxoul (2014-08-01 08:09:01+00:00)
Title: Adding border support

#### Summary

* Added `borderAttributes` parameter for all methods.
* `borderAttributes` is a `NSDictionary` that contains `NSStrokeColorAttributeName` and `NSStrokeWidthAttributeName`.
* Cache supported.

#### Usage

##### 1. Fixed size bordered-image

```objc
NSDictionary *borderAttributes1 = @{NSStrokeColorAttributeName: [UIColor blueColor],
NSStrokeWidthAttributeName: @(3)};

UIImage *image = [UIImage imageWithColor:[UIColor redColor] borderAttributes:borderAttributes1
size:CGSizeMake(100, 100)
cornerRadius:10];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
imageView.center = CGPointMake(160, 200);
[self.window addSubview:imageView];
```

##### 2. Resizable bordered-image

```objc
NSDictionary *borderAttributes2 = @{NSStrokeColorAttributeName: [UIColor darkGrayColor],
NSStrokeWidthAttributeName: @(20)};

UIImage *resizableImage = [UIImage resizableImageWithColor:[UIColor lightGrayColor]
borderAttributes:borderAttributes2
cornerRadius:10];
UIImageView *resizableImageView = [[UIImageView alloc] initWithImage:resizableImage];
resizableImageView.frame = CGRectMake(10, 300, 300, 100);
[self.window addSubview:resizableImageView];
```