iOS???????????25??????????
???????????? ???????[ 2013/4/27 10:45:11 ] ????????
??????????????????????`dispatch_async`???????????κ?UIKit?????????????????????С?
?????????? NSOperation ????GCD ??????????????????Ray Wenderlich?? Multithreading and Grand Central Dispatch on iOS for Beginners?? ???? Soheil Azarpour ?? How To Use NSOperations and NSOperationQueues ????
????6. ??Image Views?е???????С
??????????`UIImageView`????????????bundle?????????????????С??UIImageView???С???????????????????????????????????`UIImageView`?????`UIScrollView`?е???????
?????????????????????????????????С????????????????????????С??????????????????????????background thread????????Σ??????UIImageView???????????????
????7. ????????Collection
???????????????????????????????д????Ч??????????????????collections???仰?????????
????Apple????? Collections Programming Topics ?????????????????classes?????????????Щ????????????????????κ????collections??????????????????????
????????????????????????…?????Щ????collection?????
????Arrays: ??????????????index??lookup??????value lookup?????? ????/?????????
????Dictionaries: ?洢?????? ?ü??????????
????Sets: ??????????????????????????/??????
????8. ??gzip???
????????app???????????????????API?????????????????????????XML?? JSON?? HTML?????????????app??
????????????????????????豸????????????????????ж?á??????????????edge???磬???????????л?????3G??????????????????????????????????????
??????С???????????????????????app?д?gzip??????????????????и???????????????????и???????Ч?á?
????????????iOS?????NSURLConnection??????????gzip????????AFNetworking??Щ?????????????????Google App Engine??Щ??????????????????????????
???????????????????Apache????IIS(??????)????gzip?????????????????
?????м?????????
?????????????????????????Щ???????????????????????????????????Щ???????????????Щ??????????????????????????????μ??????д???app?????????Щ???????????Щ???????
????9. ???ú???????(lazy load) Views
?????????view??ζ??????????????????CPU?????????????????????????view??UIScrollView????app????????
?????????????????????????`UITableView`??`UICollectionView`?????: ?????δ??????е?subview????????????????????????????????????????????????????????С?
??????????????????????????????????views????????????????????
????????views????Ч?????????????app?????????檔?????????????????????????????????????view?????????????????????
????1. ?????????????view?????screen???????????????????;
????2. ?????????????????
??????????????????????
???????????????????????????????????view???????????????????????????????檔????????????app???????????????????????????????????????????view???????
????????????????-?????????棬??????????????????????????????
????10. Cache?? Cache?? ????Cache!
???????????????????????????????????Щ????????????????????????????
?????????????Щ??????Щ?????????????????????????????????????????UITableView???и??
????NSURLConnection?????????????????洢?и????????????HTTP Headers??????????????????????NSURLRequest??????????????????
?????????????????????Σ??????????????????????????????????????NSURLRequest??????????
+ (NSMutableURLRequest *)imageRequestWithURL:(NSURL *)url {
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
request.cachePolicy = NSURLRequestReturnCacheDataElseLoad; // this will make sure the request always returns the cached image
request.HTTPShouldHandleCookies = NO;
request.HTTPShouldUsePipelining = YES;
[request addValue:@"image/*" forHTTPHeaderField:@"Accept"];
return request;
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11