Skip to content

Instantly share code, notes, and snippets.

View jessbowers's full-sized avatar

Jess Bowers jessbowers

  • North Carolina
View GitHub Profile
@jessbowers
jessbowers / AppDelegateV1.m
Last active August 29, 2015 13:56
App Delegate with PushIO
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Push IO Setup
[[PushIOManager sharedInstance] setDelegate:self];
[[PushIOManager sharedInstance] didFinishLaunchingWithOptions:launchOptions];
// register the types we'll be sending with Apple
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound)];
}
@jessbowers
jessbowers / gist:5691095
Created June 1, 2013 17:24
gitignore for iOS project with Cocopods - excludes the Pods directory
# Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
@jessbowers
jessbowers / gist:4605803
Last active December 11, 2015 13:09
UIButton with visible highlight changes
- (void)drawRect:(CGRect)rect
{
CGRect bounds = [self bounds];
UIColor *color = [self isHighlighted] ? [UIColor blueColor] : [UIColor whiteColor];
[color setFill];
[[UIBezierPath bezierPathWithRect:bounds] fill];
}
- (void)setHighlighted:(BOOL)highlighted;
{
@jessbowers
jessbowers / gist:1335536
Created November 3, 2011 01:41
Javascript loop example
// Instead of something like this:
level0_obstacle1[100] = "obstacles10.png";
level0_obstacle1[3700] = "obstacles10.png";
level0_obstacle1_add4[3900] = "obstacles10.png";
level0_obstacle1[6600] = "obstacles10.png";
level0_obstacle1[10100] = "obstacles10.png";
level0_obstacle1_add4[10500] = "obstacles10.png";
level0_obstacle1[16000] = "obstacles10.png";
level0_obstacle1[16700] = "obstacles10.png";