开发者

Implementing round buttons

I am building a simple app that displays a grid, similar to a guitar neck, and I wanted to draw oval buttons at each intersection of the grid, an开发者_JAVA技巧d attach behaviors to it, like tapping once for sound. Pretty straight forward stuff...

My question is about the use of class for the buttons.

I am able to draw some good looking buttons with UIBezierPath/bezierPathWithOvalInRect: and now I want interactivity. I read in this forum from one developer that he used a button underneath an image to capture user interaction. I have tried that but I cannot fade out the button all together, as interaction is removed altogether.

  1. Is it possible to draw rounded buttons with UIButton from interface builder?
  2. What is best practice for something simple like drawing rounded buttons and capturing user interaction?


you can try layer.cornerRadius using the QuartzCore framework.

Or, just use an image as a custom button.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜