UISwitch setThumbTintColor crashes

Originator:evolution219
Number:rdar://12562867 Date Originated:10/24/2012
Status:Open Resolved:
Product:Xcode 4.5, iOS 6.0 Product Version:4.5
Classification:Serious Reproducible:Always
 
Summary: When you use the setThumbTintColor for a UISwitch, it makes the app crash always when the view that contains the switch is rendered for the second time. Works well the first time it is rendered, after that always crashes.

Steps to Reproduce:

1. Create a sample application.

2. Add a navigation stack to the app.

3. The root view controller can be anything.

4. The next view controller must contain a UISwitch that has the setThumbTintColor property set to some RGB.

5. Navigate from root to the view controller containing the switch.

6. Go back.

7. Try navigating again to the view with the switch.

8. Crash.

9. Comment out the setThumbTintColor part. Repeat. Works flawlessly.

Expected Results:

No crashes. Flawless working.

Actual Results:

Crashes each time.

Regression:
 -
Notes:

Happens when the view controller that contains the switch has NOT been @property @synthesized in the app delegate. Works without crash if it has been done so. Maybe it's getting released early? But happens only with the thumbcolor tint customization with a UISwitch. Works fine for all other elements like UISlider etc.

Comments

duped it

I had the same problem and duped the radar (http://openradar.appspot.com/radar?id=2332401)


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!