-4

I want to put text in a NSTextField, as if it was a Label.

I have tried the following:

[textFieldInstance setStringValue:@"Hello"];
Jess Bowers
  • 2,846
  • 1
  • 22
  • 42

1 Answers1

-1

Adding text to a UITextField?

In Objective-C:

myTextField.text = @"Your text here";

In Swift:

myTextField.text = "Your text here"

It's the text property of UITextField that controls what characters are displayed.

Please consult the documentation as this can be easily looked up!