Skip to content

Instantly share code, notes, and snippets.

View frankus's full-sized avatar

Frank Schmitt frankus

  • Bellingham, WA, USA
View GitHub Profile
@frankus
frankus / UIImageView+MapSnapshot.h
Created March 31, 2014 23:28
MKMapSnapshot category on UIImageView
//
// UIImageView+MapSnapshot.h
// Awning
//
// Created by Frank Schmitt on 3/31/14.
//
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@frankus
frankus / gist:7992755
Created December 16, 2013 19:23
Category on UIBarButtonItem for flexible space (add an `autorelease` call for non-ARC code).
@interface UIBarButtonItem (FlexibleSpace)
+ (instancetype)barButtonItemFlexibleSpace;
@end
@implementation UIBarButtonItem (FlexibleSpace)
+ (instancetype)barButtonItemFlexibleSpace {
return [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];