TestShroff
TestShroff

Reputation: 87

post the screenshot of a viewcontroller as url on facebook

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

Answers (1)

PiyushRathi
PiyushRathi

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

Related Questions