Setting maximumTrackTintColor of UISlider causes invalid context error
| Originator: | amonshiz | ||
| Number: | rdar://19915414 | Date Originated: | 2/21/2015 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 8.x |
| Classification: | Reproducible: | Always |
Summary: Whenever attempting to set the maximumTrackTintColor on a UISlider, the console will print the following message: <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. Additionally, the view will be drawn incorrectly with the track moving to the top of the frame for the slider. This is clearly because of the invalid context when drawing. Interestingly, the minimumTrackTintColor does not suffer from this issue. Steps to Reproduce: 1. Create new iOS app project. 2. Add a UISlider to the storyboard's view controller. 3. Create an action for the UISlider added in Step 2 in the view controller. 4. In the action set the value of the UISlider's maximumTrackTintColor. 5. Run the app and notice the error messages in the console along with the track being drawn in the incorrect position. Expected Results: It is expected that the track will not be drawn at the wrong location and that the maximum color will be set correctly. Actual Results: What actually happens is the UISlider's track is moved to the top of the UISlider's frame and the error message is printed to the console. Version: Xcode Version 6.1.1 (6A2008a) Notes: Configuration: All
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!