tags:

views:

38

answers:

1

Hello,

What's the best component to make an interface like this:

Something like this

tks

A: 

Use Interface Builder to position 12 buttons exactly as you like. Style them with custom images.

Number their "tag" property from 0 to 11. Create a UIViewController subclass and put a function

-(IBAction)buttonPressed:(id)sender
{
    NSLog(@"button %d x %d pressed",sender.tag%4,sender.tag/4);
}

in there. Then in IB, link the touchDown action of all buttons to this IBAction. That's all you need!

mvds
I think that @Alexandre has meant table in general, with rows and columns...
Michael Kessler
It looked like a keypad to me ;-)
mvds
I meant table in general, actually I have an dynamic content to bind this table...I can have 12, 5, 10 blocks...
Alexandre
Then you may have to do the math yourself, afaik cocoa doesn't offer such things out of the box. You could abuse the horizontal bars offered by a uitableview, but that will give more pain than it relieves, in the end.
mvds
That's frustrating...
Alexandre