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 Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-18-2010, 07:07 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 2
Default Multiple buttons trigger animations - pls help

Hello,

A little help please
I have 6 uibuttons that each trigger a different animation.
The problem is that the whole thing crashes if 2 buttons are pressed at the same time!
Ideally all the buttons should be disabled until the animation has finished running... I'm hoping for a simple fix here

Thanks in advance for any suggestions x

The animation code is like:
animationImageView.animationImages = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"actionhammer1.png"],[UIImage imageNamed:@"actionhammer2.png"],[UIImage imageNamed:@"actionhammer3.png"],nil];
animationImageView.animationDuration = 2.00;
animationImageView.animationRepeatCount = 1;
[animationImageView startAnimating];
[self.view addSubview:animationImageView];
zannn is offline   Reply With Quote
Old 06-21-2010, 06:25 AM   #2 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 2
Default

ok so I found my quick fix!

i run the animation on the imageView
set all buttons to disabled
then call -(void)enableActionButtons after 3 seconds with a performSelector:

[self performSelector:@selector(enableActionButtons) withObject:NULL afterDelay:3.0];

gave up trying to use animationDidStop and went with a timer thing instead
zannn 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
» Online Users: 239
12 members and 227 guests
ADY, CKAmike, Dani77, Duncan C, HemiMG, nick.keroulis, Promo Dispenser, Punkjumper, Rudy, sacha1996, sneaky, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,231
Posts: 380,768
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

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