Question about color

2010-08-05 Thread Eric E. Dolecki
This is a noob question, and as I pour through the docs, I thought I would ask here too. I have buttons that have different text colors. All I would like to do is to check the color after it's been clicked. -(void) aButtonWasClicked:(id)sender { UIButton* resultButton = (UIButton*)sender;

Re: Question about color

2010-08-05 Thread Dave DeLong
You shouldn't be relying on the color of a button to determine what to do next. The color of the button should reflect some state that's maintained internally by the controller, and you should rely on that state to determine what to do next. Dave smime.p7s Description: S/MIME cryptographic

Re: Question about color

2010-08-05 Thread Nick Zitzmann
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

Re: Question about color

2010-08-05 Thread Eric E. Dolecki
Not that I am going forward with this, but this seems to determine if the color is b/w/gray or color: -(void) buttonClicked:(id)sender { UIButton *resultButton = (UIButton *)sender; UIColor *color = [resultButton titleColorForState:UIControlStateNormal]; CGColorRef color2 = [color

Re: Question about color

2010-08-05 Thread Nick Zitzmann
On Aug 5, 2010, at 12:13 PM, Eric E. Dolecki wrote: Not that I am going forward with this, but this seems to determine if the color is b/w/gray or color: -(void) buttonClicked:(id)sender { UIButton *resultButton = (UIButton *)sender; UIColor *color = [resultButton