13

I created an NSView subclass that has a float property and I'd like to set it in Interface Builder. In the User Defined Runtime Attributes section the only suitable Type is Number. But if I want to enter a decimal number (either using . or , as delimiter) it just rounds to the nearest integer. Is this a bug or on purpose? How can I define a float instead of an Integer?

Liam George Betsworth
  • 18,373
  • 5
  • 39
  • 42
DrummerB
  • 39,814
  • 12
  • 105
  • 142

1 Answers1

26

Use a string type and enter your value like this

0.7
William Entriken
  • 37,208
  • 23
  • 149
  • 195