I have a view (PictureViewerViewController.h) that has a button. When button is pressed it goes to a second view (PictureSlide) which animates between 3 images. What I'm having a problem with is when the image animation is over I want it to automatically return to first view (PictureViewerViewController.h).
Your help is greatly appreciated.
#import "PictureSlide.h"
#import "PictureViewerViewController.h"
@implementation PictureSlide
@synthesize imageView;
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
imageView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"alicia1.png"],
[UIImage imageNamed:@"alicia2.png"],
[UIImage imageNamed:@"alicia3.png"], nil];
imageView.animationDuration = 10;
imageView.animationRepeatCount = 1;
[imageView startAnimating];
[self.view addSubview:imageView];
[super viewDidLoad];
}
- (BOOL)shouldAutorotateToInterfaceOrientation

UIIn terfaceOrientation)interfaceOrientation {
// Overriden to allow any orientation.
return YES;
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
[super viewDidUnload];
}
- (void)dealloc {
[super dealloc];
}
@end