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

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

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 01-11-2011, 01:18 AM   #1 (permalink)
Registered Member
 
johnyo's Avatar
 
Join Date: Dec 2010
Location: Los Angeles, CA
Posts: 52
johnyo is on a distinguished road
Question Transition Only Certain Objects in a View

Does anyone know how to apply a CATransition to only certain objects in a view?

I have a button on top of a background image. I want just the button to be pushed off the screen using kCATransitionPush, but the background image to stay put (because it's also the background image of the next view). My transition code is in a function called 'transition' and my current code, which transitions everything on the screen (not just the button) is this:

Code:
[self.view.layer addAnimation:transition forKey:nil];
I tried doing this:

Code:
[button.layer addAnimation:transition forKey:nil];
But that ends up doing no transition at all! How would I go about implementing this?

Thanks,
John
johnyo is offline   Reply With Quote
Old 01-11-2011, 11:25 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 1
Usaman is on a distinguished road
Default

If you figured this out can you post your solution? We would like to implement the same feature but with multiple objects transitioning while leaving the background still.
Usaman is offline   Reply With Quote
Old 01-11-2011, 12:05 PM   #3 (permalink)
Registered Member
 
johnyo's Avatar
 
Join Date: Dec 2010
Location: Los Angeles, CA
Posts: 52
johnyo is on a distinguished road
Default

I was able to hack it together by having my foreground objects start off sceen and then animating them on (for the on transition) and then vice versa for the off transition. But this is tedious and doesn't look very good.

Has anyone figured this out using built in transitions?

Any advice would be greatly appreciated.
johnyo is offline   Reply With Quote
Reply

Bookmarks

Tags
catransition, transition

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: 358
10 members and 348 guests
7twenty7, blueorb, fredidf, iAppDeveloper, iGamesDev, Mah6447, Morrisone, mottdog, sacha1996, Touchmint
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

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