?????????iOS??ó???????ó??????????????????????????????????????????????????????г???????????????????????

???????????iOS?豸???????????????????????????????????????????????У??????????????????????????????????????????

??????????????д???????!?????????25?????????????????????????????ɡ?

??????

????????????????????3??????????????????м???????

???????

?????????????????Щ????????????????????????????

??????????????

???????Autorelease Pool

?????????? — ?????????

????????????Date?????

???????????????

????????Щ??????????????????????????????????????Щ??????????????????????????????ó?????????Ч????!

????22) ??????????

????????????????????????????????????????????????????????????????????!

?????ó?????????????????????????????????????????????????????????????

???????????????????XIBs?????XIB???????????????н??е????????storyboard?????????????——????????????????storyboard??!

?????????????Xcode???е??????watchdog???????У??????豸?в??????????????????????豸?????Xcode??

????23) ???Autorelease Pool

????NSAutoreleasePool????????????????е?????????????????UIKit???????????????Щ???????????????NSAutoreleasePool??

???????磬?????????д??????????????????????????????????????????Щ????????????????е?UIKit????? autorelease pool????Щ?????????????????????????Щ?????????Щ?????????????????????

???????????????????????????@autoreleasepool??????д?????????????′???

????NSArray *urls = <# An array of file URLs #>;for (NSURL *url in urls) { @autoreleasepool { NSError *error; NSString *fileContents = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:&error]; /* Process the string?? creating and autoreleasing more objects. */ }}

????????ε??????????????????е?autorelease????

????????NSAutoreleasePool???????????????????????????

????24) ?????? — ?????????

????iOS?д????bundle?м???UIImage??????????????????????????imageNamed??????????????????imageWithContentsOfFile

???????????????????????????????

????imageNamed????????????????????????????????????????????????

????This method looks in the system caches for an image object with the specified name and returns that object if it exists. If a matching image object is not already in the cache?? this method loads the image data from the specified file?? caches it?? and then returns the resulting object.

??????????????????????и????????????????????????????????????????????????????÷???????????????м???????????????仺?????????????????????

??????imageWithContentsOfFile???????????????????????????????????

??????????????????÷??????£?

????UIImage *img = [UIImage imageNamed:@"myImage"]; // caching// orUIImage *img = [UIImage imageWithContentsOfFile:@"myImage"]; // no caching

??????????????????

???????????????????????????????Σ???????????????????????????imageWithContentsOfFile??????——??????????????????????

??????????????????о?????????????????????????imageNamed???????????????????????ζ????????????????

????25) ????????Date?????

??????????????????????NSDateFormatter????????С???????????(??????????????)????????????????????t???????NSDateFormatters??

???????????????????????????????????C???????????????????NSDateFormatter??Sam Soffesд???????£??????????Щ????ISO-8601????????????????????????????????????е??????????????????????????

?????????????????——?????????????и????????????

??????????????????????????????????????? Unix timestamps??Unix timestamps?????????????????????????????(epoch)????????????????????????????????ο??????00:00:00 UTC on 1 January 1970??

???????????????????????????NSDate???????????

????- (NSDate*)dateFromUnixTimestamp:(NSTimeInterval)timestamp { return [NSDate dateWithTimeIntervalSince1970:timestamp];}

?????????????????C?????????!

??????????????APIs???????????????????????????????????????????dateFromUnixTimestamp?????????1000??

????????δ??

???????????????????????????????????????г?????WWDC??????????????????????????Apple ID(?????????????????????WWDC2012?????)??

????#406: Adopting Automatic Reference Counting

????#238: iOS App Performance: Graphics and Animations

????#242: iOS App Performance: Memory