Skip to content

Instantly share code, notes, and snippets.

Dave Verwer daveverwer

Block or report user

Report or block daveverwer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@daveverwer
daveverwer / keybase.md
Created Jun 25, 2014
Keybase Verification
View keybase.md

Keybase proof

I hereby claim:

  • I am daveverwer on github.
  • I am daveverwer (https://keybase.io/daveverwer) on keybase.
  • I have a public key whose fingerprint is 3B13 E451 D093 9EF4 AAE8 4268 2CD5 B6EE 2BB8 CEFC

To claim this, I am signing this object:

View Screenshot.m
- (void)saveScreenshotToDocumentsDirectory
{
CGSize imageSize = [[UIScreen mainScreen] bounds].size;
if (NULL != UIGraphicsBeginImageContextWithOptions)
UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0);
else UIGraphicsBeginImageContext(imageSize);
CGContextRef context = UIGraphicsGetCurrentContext();
for (UIWindow *window in [[UIApplication sharedApplication] windows]) {
if (![window respondsToSelector:@selector(screen)] || [window screen] == [UIScreen mainScreen]) {
View torn.txt
I'm torn…
Whether to add features to a shipping app as a result of customer
feature requests is always an interesting one. I am certainly not a
fan of blindly adding every requested feature to an application but
I am definitely not one to completely ignore feedback from our wise
(and attractive) users.
You might have guessed that this is not a theoretical problem I am
talking about so let's talk specifics.
@daveverwer
daveverwer / method.m
Created Oct 24, 2011 — forked from richardjkeys/method.m
Block Method Call Example
View method.m
- (void) buyFeature:(NSString*) featureId onComplete:(void (^)(NSString*)) completionBlock onCancelled:(void (^)(void)) cancelBlock;
//method call
[[MKStoreKit sharedManager] buyFeature:[product objectForKey:@"identifier"]
onComplete:^ (NSString *something) {
NSLog(@"Transaction Complete");
} onCancelled:^ {
NSLog(@"Purchase Cancelled");
}];
@daveverwer
daveverwer / build.rb
Created Sep 7, 2011
Ruby script to replace an iOS settings bundle depending on the DEBUG/RELEASE build configuration flag.
View build.rb
configuration = ENV["CONFIGURATION"]
project_dir = ENV["PROJECT_DIR"]
settings_bundle = "#{project_dir}/Resources/Settings.bundle"
plist_location = "#{project_dir}/Resources/SettingPlists"
release_or_debug = ENV["CONFIGURATION"] == "Debug" ? "Debug" : "Release"
settings_plist = "#{plist_location}/SettingsRoot#{release_or_debug}.plist"
system("cp #{settings_plist} #{settings_bundle}/Root.plist");
system("touch #{settings_bundle}/Root.plist");
You can’t perform that action at this time.