Hey all,
I'm currently working on an iPhone game requiring a game grid with a number of constrained pieces sitting on it. I've decided to use Core Animation--the gamegrid is defined within a CALayer, with the gamepieces placed properly on the board using sub-CALayers.
Problem is, I can't figure out how to constrain the sub-CALayers within the grid CALayer. I know how I would do it on Cocoa--
https://developer.apple.com/document...es/Layout.html
But the iPhone SDK doesn't provide layout managers.
I found this note on the site:
"iPhone OS Note: The CALayer class in iPhone OS only supports the “struts and springs” positioning model, it does not provide custom layout managers."
But I don't know how to go about doing this. Basically, I want to move the sub-CALayers around, and have them NOT leave the CALayer. I'm also wondering how to tell CALayers not to intersect each other, if anyone happens to have any tips about that.
Thanks so much, all,
~Sam