Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9e9f6f2743
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 22 lines (16 sloc) 0.667 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
//
// UIImage+BBlock.h
// BBlock
//
// Created by David Keegan on 3/21/12.
// Copyright (c) 2012 David Keegan. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage(BBlock)

/** Returns a `UIImage` rendered with the drawing code in the block.
This method does not cache the image object. */
+ (UIImage *)imageForSize:(CGSize)size withDrawingBlock:(void(^)())drawingBlock;

/** Returns a cached `UIImage` rendered with the drawing code in the block.
The `UIImage` is cached in an `NSCache` with the identifier provided. */
+ (UIImage *)imageWithIdentifier:(NSString *)identifier forSize:(CGSize)size andDrawingBlock:(void(^)())drawingBlock;

@end
Something went wrong with that request. Please try again.