Reputation: 87
I want to post the screenshot of a viewcontroller as url on facebook.How this can be done.I know how to post text but how can I take screenshot of a viewcontroller programatically and post it as url on facebook?Please help with some code in objective c.
Upvotes: 0
Views: 24
Reputation: 959
In Objective C you can do to take image.
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size,false, 0.0);
[self.ImageBgView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
hope this help
Upvotes: 1