Posted By

arpit on 10/06/10


Tagged

bitmap UIImage uiimageview


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

bobbym245


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();
  5.  
  6. UIImageView* proxy = [[UIImageView alloc] initWithImage:viewImage];

Report this snippet  

You need to login to post a comment.