Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Draw This
($0.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-08-2009, 07:47 PM   #1 (permalink)
sritchie09
New Member
 
Join Date: Jul 2009
Posts: 4
sritchie09 is on a distinguished road
Default CALayer Question

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
sritchie09 is offline   Reply With Quote
 

» Advertisements
» Online Users: 600
20 members and 580 guests
Alexj17, baja_yu, chenpo, dapis, Domele, GVD, hemcii, jerrywenwu, LooN3y, mediaspree, michaelhansen, nanijoe, Newbie123, Rudy, sanlows, Shiroboi, smith288, soydesu, yuonneru49
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 174,544
Threads: 93,725
Posts: 401,261
Top Poster: BrianSlick (7,954)
Welcome to our newest member, soydesu
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:20 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.