I'm some trouble adding strings together for a UITextView in my app. The method I've been using is this
(header)
#import <UIKit/UIKit.h>
@interface calculatorViewController : UIViewController {
IBOutlet UITextView *output;
}
-(IBAction)b1;
@property(nonatomic, copy) NSString *output;
@end
(main)
#import "calculatorViewController.h"
@implementation calculatorViewController
-(void)b1 {
[output stringByAppendingString:@"hi"];
}
The problem I've been having with this method is when I use the button the app crashes. The warning it gives me is 'UITextView' may not respond to '-stringByAppendingString:'
When I replace output with at string it works though and that confused me.
Any suggestions? Am I doing something wrong?
Thanks