I would prefer first download the project from below link and then continue with question (only 36kb)
Download Link
At start what I have is
Yipeee!!! Below is how I did.
Added new variable.
@property (retain, nonatomic) NSString *hideStatus;
-(void) viewDidAppear:(BOOL)animated {
NSLog(@"viewDidAppear");
CGAffineTransform translation = CGAffineTransformIdentity;
translation = CGAffineTransformMakeTranslation(0, -100);
self.view.transform = translation;
self.view.clipsToBounds = YES;
[UIView commitAnimations];
self.view.frame = CGRectMake(0,-80,320,560);
hideStatus = @"hidden";
}
- (IBAction)showHiddenButton:(id)sender {
NSLog(@"hideStatus===%@", hideStatus);
CGAffineTransform translation = CGAffineTransformIdentity;
if ([hideStatus isEqualToString:@"hidden"]) {
translation = CGAffineTransformMakeTranslation(0, 0);
hideStatus = @"shown";
} else {
translation = CGAffineTransformMakeTranslation(0, -100);
hideStatus = @"hidden";
}
[UIView beginAnimations:nil context:nil];
self.view.transform = translation;
self.view.clipsToBounds = YES;
[UIView commitAnimations];
}
Attached is the sample project. You can download from here.