I'm trying to get a UILabel.text to adopt an NSString self defined function but are stumped with the error. I am still a newbie with iOS but my gut feeling says its something to do with syntax.
- (void)viewDidLoad
{
...
//Creating scrollable view
CGRect scrollViewFrame = CGRectMake(0, 0, 320, 460);
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:scrollViewFrame];
[self.view addSubview:scrollView];
CGSize scrollViewContentSize = CGSizeMake(320, 800);
[scrollView setContentSize:scrollViewContentSize];
//Inserting Title
UILabel *title = [[UILabel alloc]init];
[title setFrame:CGRectMake(0, 0, 300, 40)];
title.backgroundColor = [UIColor clearColor];
title.text = self.setQuestion;<-error
[scrollView addSubview:title];
[title release];
}
- (void) setQuestion{
NSString *qn = [NSString stringWithFormat:@"What do you get with%@", 5];
}
Thanx in advance...