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 03-13-2009, 06:34 PM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 10
Default Animated Button?

So what I want to do is animate a button when I click it. Now, there are two types of animations. One is simple and I have done it, that is core animation type stuff. The other one is I want to replace the button image with another series of animated images.
I tried adding a UIImageView to the button and then soing a [imageView startAnimation] after my other animation (a core animation) was completed, but that actual image never shows up in the button at all.

Is my only option to replace my background image on my own? Is there a way to use the animation feature of a UIImageView within a button, or is there another way I should do it?
Thanks for your help...
iPhoneCodeJunky is offline   Reply With Quote
Old 03-14-2009, 12:18 AM   #2 (permalink)
Registered Member
 
tawpie's Avatar
 
Join Date: Jul 2008
Posts: 347
Default

In EricaS's cookbook (this is not a plug, just a reference!!!) she has an example of exactly what you want to do. Except it requires a trick because you can't animate a button image. What she does is to make a semi-transparent button, then behind the button she makes a UIImageView that she animates in the "normal" fashion. Looks like a butterfly inside the button.
__________________
"Hardware will break. Software comes broken" Unknown
Calc-12E <-- ditch your old calculator.
CPR•Choking <-- Review your training, just in case. (Free)
All of Nature NW <-- scrolls in x and y, with pinch zoom AND scrollable text to boot. It can be done ('taint easy tho)
tawpie is offline   Reply With Quote
Reply

Bookmarks

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
» Stats
Members: 158,476
Threads: 89,091
Posts: 380,123
Top Poster: BrianSlick (7,091)
Welcome to our newest member, JordanCahill
Powered by vBadvanced CMPS v3.1.0

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