Created
July 8, 2018 13:50
-
-
Save chriswill0w/d2a160ee57e93c07bae94b636dd36508 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Data { | |
var sizeMB: String{ | |
let formatter = ByteCountFormatter() | |
formatter.allowedUnits = [.useMB] | |
formatter.countStyle = .file | |
return formatter.string(fromByteCount: Int64(self.count)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment