1/ 网页缓存
//清除cookies
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [storage cookies])
{
[storage deleteCookie:cookie];
}
UIWebView清除缓存:
//清除UIWebView的缓存
[[NSURLCachesharedURLCache] removeAllCachedResponses];
NSURLCache * cache = [NSURLCache sharedURLCache];
[cache removeAllCachedResponses];
[cache setDiskCapacity:0];
[cache setMemoryCapacity:0];
2/ UILabel 字体大小自适应
lbl.adjustsFontSizeToFitWidth = YES;
清除缓存与UILabel自适应
本文介绍如何在iOS开发中清除UIWebView的缓存及NSHTTPCookieStorage中的cookies,并展示了UILabel如何设置字体大小以适应宽度。
2748

被折叠的 条评论
为什么被折叠?



