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

The Archive Base Latest Questions

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

Im trying to troubleshoot my first iphone app and Ive run into a propblem

  • 0

Im trying to troubleshoot my first iphone app and Ive run into a propblem i just dont get. I have lots of buttons on a view and when you click them their text colour changes from black to blue. I assume that I could fix this by just setting the textColor property every time the button gets pushed to set it back to black but I feel like there must be something else going on.

Anyone know why my buttons are changing color by themselves?

  • 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-01T06:34:14+00:00Added an answer on June 1, 2026 at 6:34 am

    It is possible to have different title colors depending on button state. Set them using the following method of the UIButton class:

    - (void)setTitleColor:(UIColor *)color forState:(UIControlState)state
    

    F.e.

    [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [button setTitleColor:[UIColor blackColor] forState:UIControlStateHighlighted];
    

    where UIControlStateNormal is the default, not pressed, button state, and forState:UIControlStateHighlighted represents the pressed state. But there are more, and can be combined with binary sum, such as (UIControlStateHighlighted | UIControlStateSelected).

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

Sidebar

Related Questions

I have a software-hardware related issue that I'm trying to troubleshoot. My app was
I'm trying to get CruiseControl.Net working with MSBuild (this is my first exposure to
I've spent about a week trying to troubleshoot this - tried just about every
Hi I am trying to troubleshoot why I cannot get files to upload to
So, I have been having a bear of a time trying to troubleshoot why
I am trying to run a ruby debugger in Eclipse. I have not run
I have been trying to troubleshoot an issue and I really don't have any
I have been trying to troubleshoot for a while now and I officially give
I am trying to troubleshoot this code and am running into a dead-end, so
I am trying to troubleshoot an MS Access XP database and the first thing

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.