Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 09-01-2009, 12:59 AM   #5 (permalink)
bshirley
Registered Member
 
Join Date: Apr 2008
Location: Houston, Texas
Posts: 8
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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,359
Threads: 39,155
Posts: 171,645
Top Poster: smasher (2,577)
Welcome to our newest member, darksun
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:00 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.