Согласно developer.apple, я должен иметь возможность установить свойство UISLider - thumbTintColor /imumTrackTintColor / maximumTrackTintColor - ссылка http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UISlider_Class/Reference/Reference.html
Но установка любого из этих свойств вызывает исключение "нераспознанный селектор, отправленный экземпляру".
Я знаю, что есть обходной путь для этого, устанавливая свойства изображения. Но я не хочу идти по этому пути. Я что-то пропустил?
Пожалуйста, любая помощь приветствуется. Заранее спасибо.
Вот код из проекта UICatalog примеров developer.apple:
- (UISlider *)sliderCtl
{
if (sliderCtl == nil)
{
CGRect frame = CGRectMake(174.0, 12.0, 120.0, kSliderHeight);
sliderCtl = [[UISlider alloc] initWithFrame:frame];
[sliderCtl addTarget:self action:@selector(sliderAction:) forControlEvents:UIControlEventValueChanged];
// in case the parent view draws with a custom color or gradient, use a transparent color
sliderCtl.backgroundColor = [UIColor clearColor];
// I just added this following line to test
sliderCtl.thumbTintColor = [UIColor yellowColor];
sliderCtl.minimumValue = 0.0;
sliderCtl.maximumValue = 100.0;
sliderCtl.continuous = YES;
sliderCtl.value = 50.0;
// Add an accessibility label that describes the slider.
[sliderCtl setAccessibilityLabel:NSLocalizedString(@"StandardSlider", @"")];
sliderCtl.tag = kViewTag; // tag this view for later so we can remove it from recycled table cells
}
return sliderCtl;
}