|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
request for member 'font' in something not a structure or unioun
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 Code:
- (void)loadView {
[super loadView];
CGRect frame = CGRectMake(10, 10, 300, 300);
label = [[UILabel alloc] initWithFrame:frame];
Error 1. label.textAlignment = UITextAlignmentCenter;
Error 2. label.font = [UIFont fontWithName:@"Arial" size:36];
Error 3. 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 dejo; Dec 21, 2010 at 09:51 AM. Reason: Please use [code] tags. |
|
|
|
0
|
|
|
#2 |
|
Either you have not copy+pasted the code or copy+pasted the errors: TextAlignment is not the same as textAlignment. Same with the other errors.
__________________
Sponsor me to cycle 100Km round London in the dark |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| request for member 'text' in something not a structure or unioun | guydor | iPhone/iPad Programming | 18 | Mar 2, 2010 03:11 PM |
| error: request for member 'myLabel' in something not a structure or union | PreethaAjayan | iPhone/iPad Programming | 0 | Jun 23, 2009 12:03 AM |
| Request for anyone interested in liveblogging on release day | mavrev | iPhone | 3 | Jun 27, 2008 05:33 PM |
All times are GMT -5. The time now is 03:13 PM.






Linear Mode

