//Yo just pass the label obj to the function this will convert into image and you just transform the image
-(UIImage *)grabImageFromView: (UIView *) viewToGrab {
//UITextView *viewToGrab=[[UITextView alloc]initWithFrame:self.view.bounds];
UIGraphicsBeginImageContext(viewToGrab.bounds.size);
[[viewToGrab layer] renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return viewImage;
}
use this link to reflection on image:
http://developer.apple.com/library/ios/#samplecode/Reflection/Listings/MyViewController_m.html#//apple_ref/doc/uid/DTS40008063-MyViewController_m-DontLinkElementID_6
-(UIImage *)grabImageFrom
//UITextView *viewToGrab=[[U
UIGraphicsBegin
[[viewToGrab layer] renderInContext
UIImage *viewImage = UIGraphicsGetIm
UIGraphicsEndIm
return viewImage;
}
use this link to reflection on image:
http://developer.apple.com/library/ios/#samplecode/Reflection/Listings/MyViewController_m.html#//apple_ref/doc/uid/DTS40008063-MyViewController_m-DontLinkElementID_6
Comments
Post a Comment