Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- get to an UIView frame a zoom animation
- ^
- |
- <---.--->
- |
- v
- view.frame = CGRectMake(0, 0, 20, 20);
- CGPoint center = view.center;
- [UIView animateWithDuration: 1.0f animation:^{
- view.frame = CGRectMake(0, 0, 300, 300);
- view.center = center;
- }];
- view.frame = CGRectMake(0, 0, 20, 20);
- CGPoint origin = view.frame.origin.
- [UIView animateWithDuration: 1.0f animation:^{
- origin.x -= (300 - 20) / 2;
- origin.y -= (300 - 20) / 2;
- view.frame = CGRectMake(origin.x, origin.y, 300, 300);
- }];
- - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
- CGPoint center = zoomerView.center;
- [UIView animateWithDuration:1 animations:^{
- zoomerView.transform = CGAffineTransformScale(zoomerView.transform, 1.2, 1.2);
- }];
- }
- [UIView animateWithDuration:secs delay:1.0 options:option
- animations:^{
- yourview.transform = CGAffineTransformScale(view.transform, 100.0, 100.0);
- }
- completion:nil];
Add Comment
Please, Sign In to add comment