title: Showing only a portion of the original image in a UIImageView
body: <p>How can i show only a portion of the original image in a UIImageView</p>
  
  <p>This question may be very familiar and old, But the reason for asking again is,i could not find a workable idea with the help of those answers
  Many said set image.contentMode = UIViewContentModeCenter;   (but not working)</p>
  
  <p>I need almost a rectangle containing the center of the original image,How do I get this ?</p>
  
  <p><strong>I do make this working,when i am displaying a static image to my app and setting Content mode of UIImageVie as Aspect Fill.
  But this is not workable in the case when i am displaying an image from url and using NSData</strong></p>
  
  <p>Adding my code and the images</p>
  
  <pre><code>   NSString *weburl = @"http://topnews.in/files/Sachin-Tendulkar_15.jpg";
     UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 50, 108, 86)];
     NSURL *url = [NSURL URLWithString:weburl];
     NSData *data = [NSData dataWithContentsOfURL:url];
     imageView.image = [UIImage imageWithData:data];
  
     [self.view addSubview:imageView];
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/WUCay.png" alt="Original Image">
  <img src="https://i.stack.imgur.com/YlXRb.png" alt="Current outPut">
  <img src="https://i.stack.imgur.com/ZBxMk.png" alt="need"></p>