I am trying to add the character "1" to the existing value of the "output" of a text field in Xcode objective-C.
I am trying to use the function "stringByAppendingString" and have examined some examples and cannot make this work.
Is my syntax wrong?
- (IBAction)pressOne:(id)sender { NSString *str1 = output.text; output.text = [str1 stringByAppendingString:[@"1"]; }
source share