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 7775227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:34:36+00:00 2026-06-01T17:34:36+00:00

So I have a class which calls an API method and once the request

  • 0

So I have a class which calls an API method and once the request is finished, it calls a delegate method on my controller view, where I do:

[self.myButton setEnabled:NO];
self.myButton.titleLabel.textColor = [UIColor grayColor];
NSLog(@"%@", self.myButton.titleLabel.textColor);

To change the text color from blue to gray to let a user know he/she cannot click the button second time.

But, the color doesn’t change. This is what’s in the debug log:

UIDeviceWhiteColorSpace 0.5 1

Why? When I do the same in the:

- (void)viewWillAppear:(BOOL)animated

It works and changes the color of the text on the button to gray.

  • 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-01T17:34:37+00:00Added an answer on June 1, 2026 at 5:34 pm

    you can do this in you viewDidLoad

    [self.myButton setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    [self.myButton setTitleColor:[UIColor grayColor] forState:UIControlStateDisabled];
    

    When you will do the setEnabled:NO, it will automatically switch to the disable state and so the text color will be set to gray.

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

Sidebar

Related Questions

I have a method which calls for a classmethod of another class def get_interface_params_by_mac(self,
I have a class ( EAGLView ) which calls a member function of a
I have class World which manages creation of object... After creation it calls afterCreation
I have a class (RInterfaceHL) that calls another class (JRIEngine) which provides native methods
I have class which have one public method Start , one private method and
I have a class API which has full code coverage and uses DI to
Say I have a class called PermissionManager which should only exist once for my
I have a class which makes requests to a remote API. I'd like to
I have some classes(call it Class A) which I would like to unit test
I have a simple Java class in which I invoke a call to a

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.