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 09-20-2009, 04:40 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Age: 15
Posts: 93
Default color animation help

I am following this tutorial on youtube: YouTube - iPhone SDK Tutorial - How to Make an Animation (with different images)
And my question is, how do you make four different buttons change the duration of the animation? So you click on button one and it sets the duration to a certain time depending on what button you pressed (i.e. 1.75 seconds).
Or say you press button three then it sets the animation duration to 0.5 seconds then stars the animation.
If someone could post some code or some help that would be great, thanks!
tackey123 is offline   Reply With Quote
Old 09-20-2009, 05:14 PM   #2 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 190
Default

Code:
float duration;
color.animationDuration = duration;
Now, when you press one of the buttons, make sure it changes the value of "duration" to however long you want it to be.
__________________
Blockle:http://www.youtube.com/watch?v=vxEKDkpAfRU
jeonghyunhan is offline   Reply With Quote
Old 09-20-2009, 05:20 PM   #3 (permalink)
Registered Member
 
Join Date: Sep 2009
Age: 15
Posts: 93
Default

How do you set the value of each button? thanks
tackey123 is offline   Reply With Quote
Old 09-20-2009, 05:21 PM   #4 (permalink)
Registered Member
 
Join Date: Sep 2009
Age: 15
Posts: 93
Default

And where do you put the code?
tackey123 is offline   Reply With Quote
Old 09-20-2009, 05:41 PM   #5 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 190
Default

Not sure what you're asking since I did not watch the whole tutorial, just maybe 20 seconds of it total.

You want to create 4 buttons with each button changing the value of "duration" to whatever length of animation you what.
I'd assume you'd put the code in touchesBegan method if you're using custom buttons or if you're using UIButtons, in the method the UIButton calls once tapped.
__________________
Blockle:http://www.youtube.com/watch?v=vxEKDkpAfRU
jeonghyunhan is offline   Reply With Quote
Reply

Bookmarks

Tags
animation, buttons, colors, fun, help!

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: 253
19 members and 234 guests
ADY, Alsahir, beleg_1998, Dani77, e2applets, iDifferent, iph_s, JamesCahall, JasonR, mer10, Monstertaco, prchn4christ, Promo Dispenser, Robiwan, Rudy, smithdale87, spiderguy84, timle8n1
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,756
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:18 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0