Skip to content

Instantly share code, notes, and snippets.

View vibrazy's full-sized avatar

Daniel Hollis Tavares vibrazy

View GitHub Profile
@vibrazy
vibrazy / NSPredicateWithBlock
Created February 8, 2012 09:29
NSPredicate With Block
BOOL proVersion = YES;
if (proVersion) {
return;
}
//create predicate and filter the results
NSPredicate *freePredicate = [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *binding) {
InAppGame *game = (InAppGame *)evaluatedObject;
return game.isFree;
}];
@vibrazy
vibrazy / gist:008903e5c493637edb84
Created August 6, 2015 16:22
Vuforia Fix for Crash - QCAR::CameraDevice::getInstance().init(camera) - [AVCaptureVideoDataOutput setVideoSettings:] - b32a (1647522401) is not a supported pixel format type
- (void)vuforiaBugFix
{
[AVCaptureVideoDataOutput aspect_hookSelector:@selector(setVideoSettings:) withOptions:AspectPositionInstead usingBlock:^(id<AspectInfo> aspectInfo, NSMutableDictionary *settings) {
// lets check if the settings have a PixelFormatType as the key
NSString *key = (id)kCVPixelBufferPixelFormatTypeKey;
if([settings objectForKey:key])
{