Advertisement
Guest User

Untitled

a guest
Jun 10th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
BNF 1.21 KB | None | 0 0
  1. - (void)zoomIn
  2. {
  3.         if(self.zoomedOut)
  4.         {
  5.                 [self spin];
  6.                
  7.                 [UIView animateWithDuration:0.5 animations:^{
  8.                         self.view.frame = self.originalFrame;
  9.                 } completion:^(BOOL finished){
  10.                         self.zoomedOut = NO;
  11.                         [self.delegate didFinishZoomingIn];
  12.                 }];
  13.         }
  14. }
  15.  
  16. - (void)zoomOut
  17. {
  18.         if(!self.zoomedOut)
  19.         {
  20.                 [UIView animateWithDuration:0.5 animations:^{
  21.                 self.view.frame = CGRectMake([[UIScreen mainScreen] bounds].size.width / 4,
  22.                                                                          [[UIScreen mainScreen] bounds].size.height / 4,
  23.                                                                          self.view.frame.size.width / self.scaleFactor,
  24.                                                                          self.view.frame.size.height / self.scaleFactor);
  25.                 } completion:^(BOOL finished){
  26.                         self.zoomedOut = YES;
  27.                         [self spin];
  28.                         [self.delegate didFinishZoomingOut];
  29.                 }];
  30.         }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement