Quote:
Originally Posted by Sounder
I need to create a Button that when pressed will enter a string of text into a text field - any ideas out there?
|
I think the easiest way is to just use an IB action and tell the label to display the text. This isn't tested. Just to get you started.
Code:
// Define action (method) that will get called in response to a tap on the button
- (IBAction) displayTextButton {
//Define text string to be disaplayed
NSString *item = @"My text to display";
// this is how we write the string to the text field
textLabel.text = [NSString stringWithFormat: @"%@", item];
}