Have a problem where my Label is not appearing. But the slider does. Its one of these bizarre cases that seems there is no logical reason. Anybody able to make sense of this?
else if (indexPath.row == 4)
{
Filters *filters = [Filters sharedInstance];
CGRect frame = CGRectMake(100, 10, 80, 23);
costSlider = [[[UISlider alloc] initWithFrame:frame] autorelease];
costSlider.maximumValue = [[NSNumber numberWithDouble:
filters.maxCarRentalCost] floatValue];
costSlider.minimumValue = [[NSNumber numberWithDouble:
filters.minCarRentalCost] floatValue];
[costSlider addTarget:self action:@selector(costSliderChanged:)
forControlEvents:UIControlEventValueChanged];
[costSlider setValue:[filters.maxCarCostPerDay floatValue] animated:YES ];
costSlider.continuous = NO;
costSlider.enabled = YES;
costSlider.value = [filters.maxCarCostPerDay floatValue];
costSlider.tag = 5;
[cell addSubview:costSlider];
self.costLabel.textColor = [UIColor greenColor];
self.costLabel.text = @"what"; //[NSString stringWithFormat:@"Cost per day:
%d", filters.maxCarCostPerDay ];
[self.costLabel setBackgroundColor:[UIColor blueColor]];
self.costLabel.frame = CGRectMake(10, 10, 75, 20);
[self.costLabel setFont:[UIFont boldSystemFontOfSize:10.0]];
[cell addSubview:self.costLabel];
}
Thanks
-Code
From the code you posted it does not look like you have
alloc‘d the label. Unless you are doing that elsewhere in the code, that is probably your issue