This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (CGImageRef)createMaskFromAlphaChannel:(UIImage *)image | |
{ | |
size_t width = image.size.width; | |
size_t height = image.size.height; | |
NSMutableData *data = [NSMutableData dataWithLength:width*height]; | |
CGContextRef context = CGBitmapContextCreate( | |
[data mutableBytes], width, height, 8, width, NULL, kCGImageAlphaOnly); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface NSObject (MHOverride) | |
/* | |
* Dynamically overrides the specified method on this particular instance. | |
* | |
* The block's parameters and return type must match those of the method you | |
* are overriding. However, the first parameter is always "id _self", which | |
* points to the object itself. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ARSearchBar.h | |
// Artsy Folio | |
// | |
// Created by orta therox on 18/04/2012. | |
// Released under The MIT License | |
// http://www.opensource.org/licenses/mit-license.php | |
// | |
// Copyright (c) 2012 http://art.sy. All rights reserved. | |
// |