Organizational Research By

Surprising Reserch Topic

howe to capture uiview top uiview


howe to capture uiview top uiview  using -'iphone,ios,uiview,uiimage'

i have UIView which displays the Graph..now I need to capture it to the UIImage and I googled it and got the below code.but if i use this in my code its not work.even if I use breakpoint compiler does not reach to this.I am using this in my UIView .where I am going wrong?

+ (UIImage *) imageWithView:(UIView *)view
{
UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];

UIImage * img = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

return img;
}

    

asked Sep 22, 2015 by mca.agarwal
0 votes
12 views



Related Hot Questions

3 Answers

0 votes
NULL
answered Sep 22, 2015 by loknath.ganji
0 votes
NULL
answered Sep 22, 2015 by akhilesh
0 votes
NULL
answered Sep 22, 2015 by vimaldas2005

...