- (IBAction)dismissView:(UIButton *)sender {
int width = self.view1.frame.size.width;
int height = self.view1.frame.size.height;
[UIView beginAnimations:@"move" context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDelegate:self];
self.view1.frame =CGRectMake(0, -height, width, height);
[UIView commitAnimations];
int width2 = self.view2.frame.size.width;
int height2 = self.view2.frame.size.height;
[UIView beginAnimations:@"move" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:0.5];
[UIView setAnimationDelegate:self];
self.view2.frame =CGRectMake(0, self.view.frame.size.height, width2, height2);
[UIView commitAnimations];
}
- (IBAction)showView:(UIButton *)sender {
int width = self.view1.frame.size.width;
int height = self.view1.frame.size.height;
[UIView beginAnimations:@"move" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:0.5];
[UIView setAnimationDelegate:self];
self.view1.frame =CGRectMake(0, 0, width, height);
[UIView commitAnimations];
int width2 = self.view2.frame.size.width;
int height2 = self.view2.frame.size.height;
[UIView beginAnimations:@"move" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:0.5];
[UIView setAnimationDelegate:self];
self.view2.frame =CGRectMake(0, self.view.frame.size.height-height2, width2, height2);
[UIView commitAnimations];
}