Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. UIGraphicsBeginImageContextWithOptions(fromViewController.view.bounds.size, YES, 0);
  2. [fromViewController.view drawViewHierarchyInRect:fromViewController.view.bounds afterScreenUpdates:NO];
  3. UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
  4. image = [image applyLightEffect];
  5. UIGraphicsEndImageContext();
  6.  
  7. UIView *container = [UIView new];
  8. container.frame = endFrame;
  9. container.clipsToBounds = YES;
  10. UIImageView *imgView = [UIImageView new];
  11. imgView.image = image;
  12. //fromViewController.view's frame is printing out as: frame = (0 0; 320 568);
  13. imgView.frame = [container convertRect:fromViewController.view.frame fromView:transitionContext.containerView];
  14. //imgView.frame is printing out as: frame = (-40 -60; 640 1136)
  15. [container addSubview:imgView];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement