Foundation iPhone App Development: Build An iPhone App in 5 Days with iOS 6 SDK by Nick Kuh

Foundation iPhone App Development: Build An iPhone App in 5 Days with iOS 6 SDK by Nick Kuh

Author:Nick Kuh
Language: eng
Format: epub, pdf
Publisher: Apress®
Published: 2011-10-30T16:00:00+00:00


birthday = [NSEntityDescription insertNewObjectForEntityForName:@"BRDBirthday"

inManagedObjectContext:context];

name = dictionary[@"name"];

pic = dictionary[@"pic"];

birthdate = dictionary[@"birthdate"];

pathForPic = [[NSBundle mainBundle] pathForResource:pic ofType:nil];

imageData = [NSData dataWithContentsOfFile:pathForPic];

birthday.name = name;

birthday.imageData = imageData;

NSDateComponents *components = [calendar

components:NSYearCalendarUnit|NSMonthCalendarUnit|NSDayCalendarUnit fromDate:birthdate];

//New literals syntax, same as

//birthday.birthDay = [NSNumber numberWithInt:components.day];

birthday.birthDay = @(components.day);

birthday.birthMonth = @(components.month);

birthday.birthYear = @(components.year);

[birthday updateNextBirthdayAndAge];

}

[[BRDModel sharedInstance] saveChanges];

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.