For some reason, i’m not able to change or add text in my UITextView from code.
I have made Outlet and connected (All in IB) – nothing happens.
Even tried to add -setNeedsDisplay
Do i need to set some property ? – This i driving me nuts….
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController <UITextViewDelegate> {
UITextView *textInfoView;
}
@property (nonatomic, retain) IBOutlet UITextView *textInfoView;
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
textInfoView.text = @"Test";
}
-(void)viewDidAppear:(BOOL)animated{
textInfoView.text = @"Test";
textInfoView.text = [textInfoView.text stringByAppendingString:@"Line2"];
[textInfoView setNeedsDisplay];
UPS – Got it…
Forgot to @synthesize…
For some reason i did not get warning or “setter error” in Xcode 4.4, maybe it’s a version bug ?