Skip to content

Instantly share code, notes, and snippets.

BOOL success;
NSError *error;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"Data.txt"];
success = [fileManager fileExistsAtPath:filePath];
if (!success) {
@emiclark
emiclark / gist:620f5d79747a5dadf934
Last active March 17, 2016 18:04
UIAlertView - deprecated
UIAlertView *alert = [[UIAlertView alloc]initWithTitle: @"PeekaBoo" message:@"I see you" delegate:self cancelButtonTitle :@"Close" otherButtonTitles: nil];
[alert show];
@emiclark
emiclark / gist:6169ed868809f1d47dbc
Created March 17, 2016 18:00
UIAlertView - deprecated
UIAlertView *alert = [[UIAlertView alloc]initWithTitle: @"PeekaBoo" message:@"I see you" delegate:self cancelButtonTitle :@"Close" otherButtonTitles: nil];
[alert show];