Get UIButton Reference Outlet and compare UIColor

Discussion in 'iOS Programming' started by mattmanp, Nov 19, 2008.

  1. mattmanp macrumors newbie

    Nov 19, 2008
    I have two questions bugging me as a still newb iPhone programmer.

    One: I have a grid of buttons set up for an app and I want to be able to get the title of a buttons outlet reference when the button is clicked on. The reason is I have an array of numeric data and an array of my IBOutlets. During view load, I am able to run through the array of data and outlets side by side and plug the relevant data in for each title and it works great. But when I run my touch down method that I linked, I'm having trouble figuring out which grid item was touched so that I know which spot in my array to modify with new data. Is there a way in code to get the outlet title or is there a better way to do this?

    Two: Is it possible to compare two UIColors? For instance comparing [selected currentTitleColor] to [UIColor blackColor] to see if they're equal where the variable selected is a UIButton?

    Thanks in advanced!

  2. jnic macrumors 6502a

    Oct 24, 2008

Share This Page