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
[[NSNotificationCenter defaultCenter] addObserverForName:nil object:nil queue:nil usingBlock:^(NSNotification *note) { | |
NSLog(@"Catch-All: %@", note); | |
}]; | |
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
void *UIKit = dlopen([[[NSBundle bundleForClass:[UIApplication class]] executablePath] fileSystemRepresentation], RTLD_LAZY); | |
CGFloat (*UIAnimationDragCoefficient)(void) = (CGFloat (*) (void)) dlsym(UIKit, "UIAnimationDragCoefficient"); | |
DLog(@"coefficient is %f", UIAnimationDragCoefficient ? UIAnimationDragCoefficient() : 1.f); |
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
/* clang -fobjc-arc -framework Foundation -framework CoreServices dict.m -o dict */ | |
#import <Foundation/Foundation.h> | |
#import <CoreServices/CoreServices.h> | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
if(argc < 2) | |
{ |
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
#import <Foundation/Foundation.h> | |
// clang -g -Wall -framework Foundation -o atomic atomic.m | |
// gcc -g -Wall -framework Foundation -o atomic atomic.m | |
@interface Blah : NSObject | |
@property (assign, NS_NONATOMIC_IOSONLY) NSInteger frobnozzle; | |
@property (assign, ) NSInteger commaAtEnd; | |
// @property (, assign) NSInteger commaAtBeginning; // Syntax error | |
@property (atomic, assign) NSInteger blah; // complains in gcc |
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
- (UIImage *) loadMapImage { | |
const int MINZOOM = 13; | |
const int MAXZOOM = 17; | |
// TODO: calculate these from list of cycle hire locations | |
const float MINLAT = 51.483145; //minimum and max lattitude in degrees | |
const float MAXLAT = 51.542138; | |
const float MINLONG = -0.2242237; //min and max longitutde in degrees | |
const float MAXLONG = -0.002275; | |
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
desc 'Remove unused images' | |
task :clean_assets do | |
require 'set' | |
all = Set.new | |
used = Set.new | |
unused = Set.new | |
# White list | |
used.merge %w{Icon Icon-29 Icon-50 Icon-58 Icon-72 Icon-114} |
NewerOlder