in my .h file i have:
#import <UIKit/UIKit.h>
@interface untitled : UIViewController
{
NSMutableString * sResults;
}
@property (nonatomic,retain) NSMutableString * sResults;
@end
In my .m i have:
#import "untitled.h"
@implementation untitled
@synthesize sResults;
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
sResults = [[NSMutableString alloc] initWithString:@"Hello"];
[sResults appendString:@" World"];
}
@end
Whenever i check sResults it says “Out of scope”.. what am i doing wrong?
Try this: