title: I am taking a screenshot in my application. but now I want to take it by specifying the x and y coordinate. I mean taking a screenshot from y=40
body: <p>Now i am posting screen shot in facebook. but i am trying to define screenshot height.  </p>
  
  <pre><code>    UIGraphicsBeginImageContext(self.view.bounds.size);
     [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *imgPicture = UIGraphicsGetImageFromCurrentImageContext();
     UIGraphicsEndImageContext();
     if ([SLComposeViewController isAvailableForServiceType: SLServiceTypeFacebook]) {
      SLComposeViewController *controller = [SLComposeViewController        composeViewControllerForServiceType:SLServiceTypeFacebook];
      [controller setInitialText :@"post from my iphone"];
      [controller addURL:[NSURL URLWithString:@"https://www.facebook.com/birjesh.sharma.921"]];
      //[controller addImage:[UIImage imageNamed:imgPicture]];
     [controller addImage:imgPicture];
      [self presentViewController: controller animated:YES completion:nil];
  }
  </code></pre>