//
//  TimingCurveAppDelegate.m
//  TimingCurve
//
//  Created by Bill Dudney on 7/4/08.
//  Copyright Gala Factory 2008. All rights reserved.
//
//
//  Licensed with the Apache 2.0 License
//  http://apache.org/licenses/LICENSE-2.0
//

#import "TimingCurveViewController.h"

@implementation TimingCurveViewController

//START:code.TimingCurve.touchesEnded
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
  [UIView beginAnimations:@"movement" context:nil]; 
  [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; //<label id="code.timingcurve.easeIn"/>
  [UIView setAnimationDuration:1.0f];
  [UIView setAnimationRepeatCount:3];
  [UIView setAnimationRepeatAutoreverses:YES];
  CGPoint center = basketBall.center;
  if(center.y > 85.0f) {
    center.y -= 295.0f;
    basketBall.center = center;
  } else {
    center.y += 295.0f;
    basketBall.center = center;
  }
  [UIView commitAnimations];
}
//END:code.TimingCurve.touchesEnded

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
	// Return YES for supported orientations
	return (interfaceOrientation == UIInterfaceOrientationPortrait);
}


- (void)didReceiveMemoryWarning {
	[super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
	// Release anything that's not essential, such as cached data
}


- (void)dealloc {
	[super dealloc];
}

@end
