Regan
Regan

Reputation: 1497

Question with NSTextField

I have this code that changes the text of an NSTextField

[TextField setStringValue: [PrinterCard print]];

(PrinterCard print returns an NSString) What I want to do now is I want to append the PrinterCard print string to the text of TextField. I also want to do this on the next line, so I want basically to append this:

@"\n%@", [PrinterCard Print]

How is this done?

Upvotes: 0

Views: 134

Answers (1)

Gyani
Gyani

Reputation: 2241

use

[NSString stringWithFormat:@"\n%@",[PrinterCard Print]]

Upvotes: 1

Related Questions