Instance Property

allowedUnits

Specify the units that can be used in the output.

Declaration

@property NSByteCountFormatterUnits allowedUnits;

Discussion

If the value is NSByteCountFormatterUseDefault, the formatter uses platform-appropriate settings; otherwise will only the specified units are used.

NSByteCountFormatterUnits values can be combined using the C OR operator to specify complex formatting strings. The NSByteCountFormatterUseDefault or NSByteCountFormatterUseAll constants can be used with the C AND or the C NOT operators to create custom formats as well.

This is the default value if NSByteCountFormatterUseDefault.

See Also

Setting Formatting Styles

formattingContext

Specify the formatting context for the formatted string.

countStyle

Specify 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.

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.