G gaswerks macrumors 6502a Original poster Dec 17, 2006 684 5,592 Mar 22, 2010 #1 XCode 3.1.3 Cocoa Application (Objective C) New to XCode. I am writing to a .xib TextField box "psat" through the following code; [psat setDoubleValue_sat]; How do I apply a number format (i.e. %.2f or %.4g) to it?
XCode 3.1.3 Cocoa Application (Objective C) New to XCode. I am writing to a .xib TextField box "psat" through the following code; [psat setDoubleValue_sat]; How do I apply a number format (i.e. %.2f or %.4g) to it?
Sydde macrumors 68030 Aug 17, 2009 2,571 7,068 IOKWARDI Mar 22, 2010 #2 gaswerks said: How do I apply a number format (i.e. %.2f or %.4g) to it? Click to expand... Have you tried (in Interface Builder) dragging a formatter onto the text field and setting it up?
gaswerks said: How do I apply a number format (i.e. %.2f or %.4g) to it? Click to expand... Have you tried (in Interface Builder) dragging a formatter onto the text field and setting it up?
HiRez macrumors 603 Jan 6, 2004 6,272 2,653 Western US Mar 23, 2010 #3 Or you can use NSString's stringWithFormat: method to do printf-style formatting.
G gaswerks macrumors 6502a Original poster Dec 17, 2006 684 5,592 Mar 23, 2010 #4 Thanks Thanks for the formatter tip .. mission accomplished.