Skip to content

Instantly share code, notes, and snippets.

View infolock's full-sized avatar
👨‍👩‍👦‍👦
nqdq

infolock infolock

👨‍👩‍👦‍👦
nqdq
View GitHub Profile
- (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);
@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.
*
//
// 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.
//