-1

How to create float placeholder NSTextfield Cocoa-app Mac OS X (Objective C)?

I searched about it but only have float placeholder UITextfield IOS.

1 Answers1

0

If you mean you want an NSTextField whose placeholder is a float number, then just create a string with the float and set that as the textfield's placeholderString:

float f = 0.33;
textField.placeholderString = [NSString stringWithFormat:@"%.2f", f];
Jon
  • 1,469
  • 1
  • 14
  • 23