Hi,
I am getting this error so many times n i don't understand that what to do....????
Error 1. request for member 'TextAlignment' in something not a structure or union
Error 2. request for member 'Font' in something not a structure or union
Error 3. request for member 'Text' in something not a structure or union
Please Reply
Thanks!!
I am getting this error so many times n i don't understand that what to do....????
Error 1. request for member 'TextAlignment' in something not a structure or union
Error 2. request for member 'Font' in something not a structure or union
Error 3. request for member 'Text' in something not a structure or union
Code:
- (void)loadView {
[super loadView];
CGRect frame = CGRectMake(10, 10, 300, 300);
label = [[UILabel alloc] initWithFrame:frame];
[COLOR="Red"]Error 1.[/COLOR] label.textAlignment = UITextAlignmentCenter;
[COLOR="Red"]Error 2.[/COLOR] label.font = [UIFont fontWithName:@"Arial" size:36];
[COLOR="Red"]Error 3.[/COLOR] label.text = @"10";
[self.view addSubview:label];
frame = CGRectMake(10, 370, 300, 10);
slider = [[UISlider alloc] initWithFrame:frame];
slider.minimumValue = 0.0;
slider.maximumValue = 100.0;
slider.continuous = NO;
slider.value = 10.0;
[slider addTarget:self
action:@selector(updateLabel:)
forControlEvents:UIControlEventValueChanged];
[self.view addSubview: slider];
}
Please Reply
Thanks!!
Last edited by a moderator: