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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-08-2009, 08:47 PM   #1 (permalink)
New Member
 
Join Date: Jul 2009
Posts: 4
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
Old 07-26-2009, 01:02 PM   #2 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 7
Question Regarding the layut manager

It doesnt provide only the custom layouts. U can make use of the constraints layout manager i guess.....
pravdgrt is offline   Reply With Quote
Old 07-26-2009, 01:20 PM   #3 (permalink)
New Member
 
Join Date: Jul 2009
Posts: 4
Default

Quote:
Originally Posted by pravdgrt View Post
It doesnt provide only the custom layouts. U can make use of the constraints layout manager i guess.....
The iPhone SDK actually doesn't support the constraints layout manager, unfortunately.
sritchie09 is offline   Reply With Quote
Old 07-26-2009, 01:45 PM   #4 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 7
Default

OOPS......
pravdgrt is offline   Reply With Quote
Reply

Bookmarks

Tags
3.0, calayer, core animation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 260
23 members and 237 guests
@sandris, ADY, Dani77, diyora, FAED, fredidf, F_Bryant, GHuebner, HDshot, iDifferent, JasonR, mer10, Oral B, prchn4christ, Rudy, Speed, spiderguy84, stekki, tgjorgoski, Thompson22, Touchmint, twerner, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,753
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:06 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0