This file contains hidden or 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
#!/usr/bin/xcrun -sdk macosx swift | |
import Foundation | |
public protocol SharedInstanceType | |
{ | |
init() | |
} | |
private struct TokenKey |
This file contains hidden or 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
let bitmapBuffer = UnsafePointer<UInt8>.alloc(Int(height * width * 4)) | |
let pixelNumber = (x * 4) + (y * width * 4) | |
bitmapBuffer[pixelNumber + 3] = 255 // Alpha | |
bitmapBuffer[pixelNumber + 2] = redValue | |
bitmapBuffer[pixelNumber + 1] = greenValue | |
bitmapBuffer[pixelNumber + 0] = blueValue |
This file contains hidden or 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
uint8_t* bitmapBuffer = calloc(width * height * 4, sizeof(uint8_t)); | |
int pixelNumber = (x * 4) + (y * width * 4); | |
bitmapBuffer[pixelNumber + 3] = 255; // alpha | |
bitmapBuffer[pixelNumber + 2] = redValue; | |
bitmapBuffer[pixelNumber + 1] = greenValue; | |
bitmapBuffer[pixelNumber + 0] = blueValue; |
This file contains hidden or 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
Method grannyMethod = class_getClassMethod([[self superclass] superclass], _cmd); | |
IMP grannyImp = method_getImplementation(grannyMethod); | |
return grannyImp([self class], _cmd); |
This file contains hidden or 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
// | |
// AFHTTPRequestOperation+MTSynchronousRequest.h | |
// MTSyncAFNetworking | |
// | |
// Created by Robert Thompson on 10/10/13. | |
// Copyright (c) 2013 WillowTree Apps. All rights reserved. | |
// | |
#import "AFHTTPRequestOperation.h" |
This file contains hidden or 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
// | |
// AFHTTPRequestOperation+MTSynchronousRequest.m | |
// MTSyncAFNetworking | |
// | |
// Created by Robert Thompson on 10/10/13. | |
// Copyright (c) 2013 WillowTree Apps. All rights reserved. | |
// | |
#import "AFHTTPRequestOperation+MTSynchronousRequest.h" | |
@implementation AFHTTPRequestOperation (MTSynchronousRequest) |