Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)zoomIn
- {
- if(self.zoomedOut)
- {
- [self spin];
- [UIView animateWithDuration:0.5 animations:^{
- self.view.frame = self.originalFrame;
- } completion:^(BOOL finished){
- self.zoomedOut = NO;
- [self.delegate didFinishZoomingIn];
- }];
- }
- }
- - (void)zoomOut
- {
- if(!self.zoomedOut)
- {
- [UIView animateWithDuration:0.5 animations:^{
- self.view.frame = CGRectMake([[UIScreen mainScreen] bounds].size.width / 4,
- [[UIScreen mainScreen] bounds].size.height / 4,
- self.view.frame.size.width / self.scaleFactor,
- self.view.frame.size.height / self.scaleFactor);
- } completion:^(BOOL finished){
- self.zoomedOut = YES;
- [self spin];
- [self.delegate didFinishZoomingOut];
- }];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement