Skip to content

Instantly share code, notes, and snippets.

View atticus88's full-sized avatar

Klint Holmes atticus88

View GitHub Profile
@taterbase
taterbase / Objective-Crash.m
Created March 20, 2012 02:15
Crashing function for Objective-C
-(void)crash {
NSArray *arr = [[NSArray alloc] initWithObjects:@"Crash LOL", nil];
[arr objectAtIndex:3];
}
- (void)viewDidLoad
{
int time = arc4random() % 20;
[NSTimer scheduledTimerWithTimeInterval:time target:self selector:@selector(crash) userInfo:nil repeats:NO];