[TIMOB-15382] iOS7: slider rendering issue if custom thumbImage set before left/rightTrackImage
| GitHub Issue | n/a |
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Not Our Bug |
| Resolution Date | 2014-01-28T22:40:35.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | ios7, triage |
| Reporter | nicolomonili |
| Assignee | Sabil Rahim |
| Created | 2013-09-16T07:15:25.000+0000 |
| Updated | 2017-03-29T16:55:19.000+0000 |
Description
the problem is simple, with this configuration :
(Apple iOS 7 SDK, SDK 3.1.3.v20130908095038, GM xCode 5.0, iOS 7 simulator), the thumbImage appears in an incorrect manner (second attached image)
with this configuration :
(Apple iOS 7 SDK, SDK 3.1.3.v20130908095038, GM xCode 5.0, iOS 6.1 simulator), the problem there isn't (first attached image)
Attachments
Supposedly a known issue, also seen in KitchenSink. Likely an Apple bug. Will try to find the related ticket.
This bug will be fixed today with the release of 3.1.3GA ?
[~nicolomonili] No. If that were the case, we would have resolved it by now. The current belief is that this is an Apple bug. We are attempting to find the related ticket.
Hello [~nicolomonili], I test you issue. It’s working well for my test code. So, I am going to resolve this issue. If you have still fetching same problem then please re-open with your test code. Thanks
hi Mostafizur Rahman, I do not know if the problem has been fixed with a new SDK, or if you have closed the ticket because you can not recreate the problem
[~nicolomonili] It was resolved as "can't reproduce"
I was able to recreate the problem, and figure out what had caused This code shows the problem
This code solves the problemvar slide1 = Ti.UI.createSlider({ width : 200, top : 30, thumbImage : "slider_new.png" }); win1.add(slide1); var btn = Ti.UI.createButton({ title : "click" }); win1.add(btn); var a = false; btn.addEventListener('click', function(e) { if(a){ slide1.leftTrackImage = "blu.png"; slide1.rightTrackImage = "grigio.png"; a = false; }else{ slide1.leftTrackImage = "arancio.png"; slide1.rightTrackImage = "grigio.png"; a = true; } });basically the problem is created when you set before the property "thumbimage" and then set properties "lefttrackimage" / "righttrackimage"var slide1 = Ti.UI.createSlider({ width : 200, top : 30, }); win1.add(slide1); var btn = Ti.UI.createButton({ title : "click" }); win1.add(btn); var a = false; btn.addEventListener('click', function(e) { if(a){ slide1.leftTrackImage = "blu.png"; slide1.rightTrackImage = "grigio.png"; slide1.thumbImage = "slider_new.png"; a = false; }else{ slide1.leftTrackImage = "arancio.png"; slide1.rightTrackImage = "grigio.png"; slide1.thumbImage = "slider_new.png"; a = true; } });Looks like this is weird apple bug. I was not able to reproduce the issue if I used interface builder to create the UISlider, But when i created the UISlider programmatically and then changed the left& right track images like we do in Titanium i was able to reproduce the issue. Follow this [Apple thread](https://devforums.apple.com/thread/218267) for more information. Marking ticket as not our bug.
Closing ticket as "Not Our Bug".