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

View Single Post
Old 09-01-2009, 01:59 AM   #5 (permalink)
bshirley
Registered Member
 
Join Date: Apr 2008
Location: Houston, Texas
Posts: 10
Default

The trick is you need to setAnimationDuration: (and all the other animation values) before you setAlpha:.
The behind-the-scenes animation setup gets created when you set the value being animated.

Also, what smasher was saying about the setAnimationDidStopSelector: is that UIView assumes a method signature identical to

Code:
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
which is to say you could call it:
Code:
- (void)x:(NSString *)id y:(NSNumber *)boolNumber z:(void *)nothing;
and still be in good programming style,

you obviously aren't using any of the parameters, so your callback will work,
the additional parameters are pushed onto the stack and ignored,

not guaranteed safe in all architectures of Objective-C, but okay on Intel and iPhone processors,

I would suggest something like:
Code:
[UIView setAnimationDidStopSelector:@selector(fadeInDidStop:finished:context:)];

- (void)fadeInDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;
bshirley is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,736
Threads: 89,192
Posts: 380,536
Top Poster: BrianSlick (7,129)
Welcome to our newest member, wrapsol
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:46 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.