Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 17th, 2012  |  syntax: None  |  size: 1.12 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. -(IBAction)btnDate_Clicked:(id)sender
  2. {
  3.  
  4.     [UIView beginAnimations:nil context:NULL];
  5.     [UIView setAnimationDuration:0.3];
  6.     yourScrollView.frame = CGRectMake(0, -100, 320, yourScrollView.frame.size.height);  // set frame which you want  
  7.     [UIView commitAnimations];
  8.  
  9.  
  10. }
  11.        
  12. -(IBAction)btnDone_Clicked:(id)sender
  13. {
  14.  
  15.     [UIView beginAnimations:nil context:NULL];
  16.     [UIView setAnimationDuration:0.3];
  17.     yourScrollView.frame = CGRectMake(0, 0, 320, yourScrollView.frame.size.height);  // set frame which you want  
  18.     [UIView commitAnimations];
  19.  
  20.  
  21. }
  22.        
  23. - (void)scrollUpView
  24. {
  25.     CGFloat kMoveRatio = 50.0f // Change to view the buttons
  26.     [UIView beginAnimations:@"UP" context:nil];
  27.     CGRect aVFrame = self.view.frame;
  28.     [self.view setFrame:CGRectMake(aVFrame.origin.x, aVFrame.origin.y - kMoveRatio, aVFrame.size.width, aVFrame.size.height)];
  29.     [UIView commitAnimations];
  30.  
  31. }
  32.  
  33. -(void)scrollDownView
  34. {
  35.     [UIView beginAnimations:@"DOWN" context:nil];
  36.     CGRect aVFrame = self.view.frame;
  37.     [self.view setFrame:CGRectMake(aVFrame.origin.x, 0, aVFrame.size.width, aVFrame.size.height)];
  38.     [UIView commitAnimations];
  39. }