I've looked though al the previous questions and answers on this error but I can't figure out what I'm doing wrong. Can anyone help?
@synthesize myScrollView;
@synthesize mathsPracticeTextArray;
-(void)loadText
{
NSBundle *bundle = [NSBundle mainBundle];
NSString *textFilePath = [bundle pathForResource:@"mathspractice" ofType:@"txt"];
NSString *fileContents = [NSString stringWithContentsOfFile:textFilePath];
mathsPracticeTextArray = fileContents;
}
- (void)viewDidLoad {
[super viewDidLoad];
myScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
myScrollView.contentSize = CGSizeMake(320, 960);
myScrollView.pagingEnabled = FALSE;
myScrollView.scrollEnabled = TRUE;
myScrollView.backgroundColor = [UIColor whiteColor];
*[self.view addSubview:myScrollView];
UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,100,960,40)];
myLabel.text = [mathsPracticeTextArray componentsJoinedByString:@" "];
[myScrollView addSubview:myLabel];
[myLabel release];*
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
- (void)viewDidUnload {
}
- (void)dealloc {
[myScrollView release];
[mathsPracticeTextArray release];
[super dealloc];
}
@end