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 10-10-2008, 09:52 PM   #1 (permalink)
Kenrik
Registered Member
 
Join Date: Sep 2008
Posts: 288
Default Weird Animation issue...

Ok so I had an animation that was working great on an infinite loop.

Code:
- (void)cloudAnimation
{
	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationRepeatCount:1e100f];
	[UIView setAnimationDuration:30.0];
	[UIView setAnimationDelegate:self];
	[UIView setAnimationRepeatAutoreverses:YES];
	cloudView.center = CGPointMake (20, 300);
	[UIView commitAnimations];
}
It was called in my "initWithFram" like this

Code:
		[self cloudAnimation];
Well this was working perfect while the view that was my main (and only) view was what loaded first but I switched to have multiple views and this view is no longer the first view loaded by my LevelViewControler.

I Flip into the view with the animation like this:

Code:
UIImage *startButtonImage = [UIImage imageNamed:@"startButtonA.png"];
	CGRect buttonFrame = CGRectMake(startShiftRightA, startShiftDownA, startButtonImage.size.width, startButtonImage.size.height);
	startButton = [self buttonWithTitle:nil target:self.viewControllerB selector:@selector(flipGame:) frame:buttonFrame image:startButtonImage];
Well the animation does not run anymore..

But I tried to attach that animation to another of my UIviews and it instantly moved that UIview to where the end of the animation would be without actually animating (it would load in with the view already at the ending point of the animation)

What's up with this? this animation is on an infinite loop.. it should just run once called.

I'm confused as to why it's broken now when it was working before.

as a note: the rest of my animations are still working..

I know it's because I added more views and this got screwy.. I think my view is not getting initialized correctly.

HELP!

Last edited by Kenrik; 10-11-2008 at 11:18 AM.
Kenrik is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,836
Threads: 89,209
Posts: 380,642
Top Poster: BrianSlick (7,129)
Welcome to our newest member, abbylowin
Powered by vBadvanced CMPS v3.1.0

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