1.一个非常重要的网站,苹果的各种开发文档如果变更都会更新这个网站:
https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex。
2.//sdwebimage缓存图片大小
- (float)checkTmpSize
{
float totalSize = 0;
NSString *cachePath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
cachePath = [cachePath stringByAppendingPathComponent:@"default"];
NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:cachePath];
for (NSString *fileName in fileEnumerator)
{
NSString *filePath = [cachePath stringByAppendingPathComponent:fileName];
NSDictionary *attrs = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil];
unsigned long long length = [attrs fileSize];
totalSize += length / 1024.0 / 1024.0;
}
NSLog(@"tmp size is %.2f",totalSize);
return totalSize;
}
3.修改statusbar
- (UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}
在某个控制器里写这
有导航控制器的 VC中使用 preferredStatusBarStyle方法 不被调用的解决办法
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
网友评论