开发者

iPhone Deck Game interface

I wrote the code of a card game .. but now it's time todo the graphic and Interface

What's the best approach to represent a card ??

a) CALayer b) UIView c) UIButton

Which one is best to animate and r开发者_运维百科eceive user touches??? What do you recommend??

Thanks in advance


GeekGameBoard is older Apple-provided example code for card and board games that implements the UI in CALayers. Another user modified it to run on the iPhone so it might be helpful code for you to look at. The modified project is on bitbucket.


as UIButton is subclass of UIView, there's no so much difference in both of them. If you need only 'clicks' handling, you can choose button, if you will need to override touchesBegan/touchesMoved you should override UIView instead UIButton.


A UIView subclass would probably be your best choice. You can easily receive touch events from the user, and UIView allows you to do simple animations easily.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜