Posted By

arpit on 10/06/10


bitmap UIImage uiimageview

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Creating a bitmap image of a view

 / Published in: Objective C

  1. UIGraphicsBeginImageContext(srcView.bounds.size);
  2. [srcView.layer renderInContext:UIGraphicsGetCurrentContext()];
  3. UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
  4. UIGraphicsEndImageContext();
  6. UIImageView* proxy = [[UIImageView alloc] initWithImage:viewImage];

Report this snippet  

You need to login to post a comment.