views:

47

answers:

1

Hi,

I am developing a board game. I am wondering how one can use Core Animation or any other technology to design a chess board like (someone else's app):

In the picture, the chess boards has a thick border which I am not sure how to model. Should we model the chess board as an image and place chess pieces onto the image? But then it would be difficult to detect what particular square the user touches. If the chess board itself is an image, I wonder how the pieces can be placed on the image. I mean, you would have to calculate coordinatives and positions very carefully.

This is what I came up with using Core Animation, there is no boarder, visually it's horrible:

+3  A: 

There is no reason why you cannot make your current chess view a subview of another view, with its frame inset. It doesn't complicate calculations, as it will be your chess view which is handling the touches. The task of the encompassing view is merely to draw the border frame, or if your chess view is transparent, the whole board.

Johan Kool