1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Get UIButton Reference Outlet and compare UIColor

Discussion in 'iPhone/iPad Programming' started by mattmanp, Nov 19, 2008.

  1. macrumors newbie

    #1
    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!

    Matt
     
  2. macrumors 6502a

    #2

Share This Page