?????????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