//Yo just pass the label obj to the function this will convert into image and you just transform the image
-(UIImage *)grabImageFrom View: (UIView *) viewToGrab {
//UITextView *viewToGrab=[[U ITextView alloc]initWithF rame:self.view. bounds];
UIGraphicsBegin ImageContext(vi ewToGrab.bounds .size);
[[viewToGrab layer] renderInContext :UIGraphicsGetC urrentContext() ];
UIImage *viewImage = UIGraphicsGetIm ageFromCurrentI mageContext();
UIGraphicsEndIm ageContext();
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