Instance Property

includesCount

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

Declaration

var includesCount: Bool { get set }

Discussion

If set to true and includesUnit is set to false, no unit is displayed. For example, a value of 723 KB is formatted as 723.

You can get the set this property to true and the includesUnit to true individually to get both parts, separately. Note that putting them together yourself via string concatenation may be incorrect for some locales.

The default value is true.

See Also

Setting Formatting Styles

var formattingContext: Formatter.Context

Specify the formatting context for the formatted string.

var countStyle: ByteCountFormatter.CountStyle

Specify the number of bytes to be used for kilobytes.

var allowsNonnumericFormatting: Bool

Determines whether to allow more natural display of some values.

var includesActualByteCount: Bool

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

var isAdaptive: Bool

Determines the display style of the size representation.

var allowedUnits: ByteCountFormatter.Units

Specify the units that can be used in the output.

var includesUnit: Bool

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

var zeroPadsFractionDigits: Bool

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software