How to form decimal floating point numbers when using Value With Pattern binding?

I have an NSTextField that is bound to a float value through Interface Builder through the "Value with Pattern" field. Default display template: % {value1} @

Is there a way to change this line so that my result is formatted to two decimal places? Or is this only possible through code?

+5
source share
1 answer

I was just trying to do it. You can drag the Number Formatter from the object library on top of the object you want to format. One of the property pages for formatting allows you to choose from a list of predefined formats or select individual ones and create your own.

+6
source

All Articles