Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8717615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:20:29+00:00 2026-06-13T06:20:29+00:00

UPDATE: Got a mail from Apple saying that the bug/issue has been fixed now

  • 0

UPDATE: Got a mail from Apple saying that the bug/issue has been fixed now and the next SDK release won’t have this issue. Peace!

I have this in the code for my AppDelegate:

- (void) customizeAppearance {
    [[UISwitch appearance] setOnTintColor:[UIColor colorWithRed:0 green:175.0/255.0 blue:176.0/255.0 alpha:1.0]];
    [[UISwitch appearance] setTintColor:[UIColor colorWithRed:255.0f/255.0f green:255.0f/255.0f blue:255.0f/255.0f alpha:1.000f]];
    [[UISwitch appearance] setThumbTintColor:[UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1.0]];
 }

Which I then call from - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

I also use ARC. In iOS 6 my app keeps crashing. I enabled NSZombie and it keeps saying: *** -[UIDeviceRGBColor release]: message sent to deallocated instance 0x9658eb0

And now I’ve realized one perfectly reproducible flow for the above. When I comment out the setThumbTintColor line alone inside customizeAppearance, then everything works fine as it should. When I use the setThumbTintColor line instead, the app crashes the exact same way every time.

Is this a known issue to anyone with UISwitch/setThumbTintColor/UIColor? What else could be the cause if not the switch color?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:20:30+00:00Added an answer on June 13, 2026 at 6:20 am

    I was also doing this tutorial and had the same problem. (Not sure why you don’t experience this, as both my hand typed in code and the solution code have the same problem for me?)

    The first segue would happen ok, but after going back the next segue would fail.

    After setting a global exception breakpoint I could see thumbColorTint in the call stack when the exception was generated. I made a guess that the object was being released too early. To fix I created a property in my app delegate..(you don’t need to do it in the app delegate just the object that you are setting the UISwitch appearance, which in my case was the appdelegate)

    @interface SurfsUpAppDelegate()
    @property (strong, nonatomic) UIColor *thumbTintColor;
    @end
    

    Then I set it up as so

    [self setThumbTintColor:[UIColor colorWithRed:0.211 green:0.550 blue:1.000 alpha:1.000]];
    [[UISwitch appearance] setThumbTintColor:[self thumbTintColor]];
    

    And now everything works as expected as the object is not released early. This is probably a defect and the object is released even though it is still needed. UISwitch seems to have a defect for the API 🙁

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got about 25 tables that I'd like to update with random data that's
I've got an Ant task that when launched will update the version number in
I got this far: :~ curl -u username:password -d status=new_status http://twitter.com/statuses/update.xml Now, how can
I've got the following T-SQL code below that's working from inside of SQL Server
Bounty update : Already got a very good answer from Mark. Adapted := into
Update: Got this working by disabling CodeIgniter Profiler which was interfering with the Ajax
I've started working with ASP.net AJAX (finally ☺). and I've got an update panel
I've got rejected my recent update on iPhone app and it says: When file
I've got a case statement: UPDATE Answer SET AnswerID = @AnswerID, AnsweredBy = CASE
Update 3 : Never mind. I kinda got what I was looking for. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.