Я пытаюсь динамически настроить цвет трека на UISlider.
Эта строка кода отлично работает для установки нижней стороны слайдера.
[self.sliderBar setMinimumTrackTintColor:[UIColor redColor]];
При попытке сделать то же самое для высокой стороны дорожки слайдера эта строка кода сообщает о 3 фатальных ошибках в журнале отладки.
[self.sliderBar setMaximumTrackTintColor:[UIColor redColor]];
<Error>: CGContextAddPath: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
<Error>: clip: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
<Error>: CGContextDrawLinearGradient: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
Я также попытался установить цвета оттенков дорожки с использованием точечной нотации, но сообщалось о тех же 3 ошибках.
self.sliderBar.maximumTrackTintColor = [UIColor redColor];
Я очень смущен, почему минимальный цвет оттенка цвета правильно установлен, в то время как максимальный цвет оттенка цвета ломается. Будем очень благодарны любой помощи.
Эта проблема, похоже, связана с этим вопросом, но я не уверен на 100%, так как я не работаю с графикой (только установив цвет оттенка).