As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
相关专题:
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What's the best component开发者_如何学C to make an interface like this:
tks
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!
精彩评论