• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question about color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about color


  • Subject: Re: Question about color
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 5 Aug 2010 11:56:38 -0600

On Aug 5, 2010, at 11:45 AM, Eric E. Dolecki wrote:

> How can I check what the color is in order to manipulate the button after
> it's pressed? If it's gray, do one thing, if it's another color, do
> something else. I'm not sure how to run an if on it yet.

On iOS you'd have to use the functions CGColorGetColorSpace(), CGColorGetNumberOfComponents(), and CGColorGetComponents() to access the color space and the components, but I really can't recommend branching on color information, because color components are floating point numbers rather than integers.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Question about color
      • From: "Eric E. Dolecki" <email@hidden>
References: 
 >Question about color (From: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: Re: Question about color
  • Next by Date: Re: Resolution of an NSImage(Rep)?
  • Previous by thread: Re: Question about color
  • Next by thread: Re: Question about color
  • Index(es):
    • Date
    • Thread