Class

NSByteCountFormatter

The NSByteCountFormatter class converts a byte count value into a localized description that is formatted with the appropriate byte modifier (KB, MB, GB and so on).

Symbols

Creating Strings from Byte Count

+ stringFromByteCount:countStyle:

Converts a byte count into the specified string format without creating an NSNumber object.

- stringFromByteCount:

Converts a byte count into a string without creating an NSNumber object.

Setting Formatting Styles

formattingContext

Specify the formatting context for the formatted string.

countStyle

Specify the the number of bytes to be used for kilobytes.

allowsNonnumericFormatting

Determines whether to allow more natural display of some values.

includesActualByteCount

Determines whether to include the number of bytes after the formatted string.

adaptive

Determines the display style of the size representation.

allowedUnits

Specify the units that can be used in the output.

includesCount

Determines whether to include the count in the resulting formatted string.

includesUnit

Determines whether to include the units in the resulting formatted string.

zeroPadsFractionDigits

Determines whether to zero pad fraction digits so a consistent number of characters is displayed in a representation.

Constants

NSByteCountFormatterUnits

Specifies the units appropriate for the formatter to display. Specifying any units explicitly causes just those units to be used in showing the number.

NSByteCountFormatterCountStyle

Specifies display of file or storage byte counts. The display style is platform specific.

Relationships

Inherits From