获取iphone容量

//调用系统api返回一个字典

NSDictionary *systemAttributes = [[NSFileManager defaultManager] fileSystemAttributesAtPath:NSHomeDirectory()];

    //获取总容量

    NSString *diskTotalSize = [systemAttributes objectForKey:@"NSFileSystemSize"];

//    获取剩余空间

    NSString *diskFreeSize = [systemAttributes objectForKey:@"NSFileSystemFreeSize"];

新手分享,大神勿喷!谢谢!

原文地址:https://www.cnblogs.com/ls1949/p/5216397.html