Any point in subclassing UIButton to create a custom looking button?

Posted by glitch on Stack Overflow See other posts from Stack Overflow or by glitch
Published on 2012-09-18T02:19:27Z Indexed on 2012/09/18 3:38 UTC
Read the original article Hit count: 102

Filed under:
|
|

I want to create a set of buttons that would work and feel very much like the Metro-style tiles that are available on Windows Phones. I would like to allow the user to tap them to access their underlying functionality (open a modal or something or that sort).

  1. I'm concerned that subclassing UIButton will not get me there. I need square corners and dynamic content inside the tiles themselves. The posts I've found around SO seem to suggest that subclassing a UIButton would not be a good idea for several reasons and that I should instead use UIView. That reply is from 2010, and I have no idea if in the 2+ years since then there have been considerable changes to how one would achieve that effect. Most users these days will have iOS 5.1+ if not 6.0 soon.

  2. Let's say I do go the UIView route. Should I implement UIResponder's touch events or should I instead go the UITapGestureRecognizer route? What's the better practice in 2012?

Thank you!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ios