Guest User

Untitled

a guest
Sep 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. get to an UIView frame a zoom animation
  2. ^
  3. |
  4. <---.--->
  5. |
  6. v
  7.  
  8. view.frame = CGRectMake(0, 0, 20, 20);
  9. CGPoint center = view.center;
  10. [UIView animateWithDuration: 1.0f animation:^{
  11. view.frame = CGRectMake(0, 0, 300, 300);
  12. view.center = center;
  13. }];
  14.  
  15. view.frame = CGRectMake(0, 0, 20, 20);
  16. CGPoint origin = view.frame.origin.
  17. [UIView animateWithDuration: 1.0f animation:^{
  18. origin.x -= (300 - 20) / 2;
  19. origin.y -= (300 - 20) / 2;
  20. view.frame = CGRectMake(origin.x, origin.y, 300, 300);
  21. }];
  22.  
  23. - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
  24. CGPoint center = zoomerView.center;
  25. [UIView animateWithDuration:1 animations:^{
  26. zoomerView.transform = CGAffineTransformScale(zoomerView.transform, 1.2, 1.2);
  27. }];
  28. }
  29.  
  30. [UIView animateWithDuration:secs delay:1.0 options:option
  31. animations:^{
  32. yourview.transform = CGAffineTransformScale(view.transform, 100.0, 100.0);
  33. }
  34. completion:nil];
Add Comment
Please, Sign In to add comment