Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(IBAction)btnDate_Clicked:(id)sender
- {
- [UIView beginAnimations:nil context:NULL];
- [UIView setAnimationDuration:0.3];
- yourScrollView.frame = CGRectMake(0, -100, 320, yourScrollView.frame.size.height); // set frame which you want
- [UIView commitAnimations];
- }
- -(IBAction)btnDone_Clicked:(id)sender
- {
- [UIView beginAnimations:nil context:NULL];
- [UIView setAnimationDuration:0.3];
- yourScrollView.frame = CGRectMake(0, 0, 320, yourScrollView.frame.size.height); // set frame which you want
- [UIView commitAnimations];
- }
- - (void)scrollUpView
- {
- CGFloat kMoveRatio = 50.0f // Change to view the buttons
- [UIView beginAnimations:@"UP" context:nil];
- CGRect aVFrame = self.view.frame;
- [self.view setFrame:CGRectMake(aVFrame.origin.x, aVFrame.origin.y - kMoveRatio, aVFrame.size.width, aVFrame.size.height)];
- [UIView commitAnimations];
- }
- -(void)scrollDownView
- {
- [UIView beginAnimations:@"DOWN" context:nil];
- CGRect aVFrame = self.view.frame;
- [self.view setFrame:CGRectMake(aVFrame.origin.x, 0, aVFrame.size.width, aVFrame.size.height)];
- [UIView commitAnimations];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement