title: objective-c metadataOutputRectOfInterestForRect return {{0, 0}, {0, 0}}
body: <p>Updated!!!</p>
  
  <p>I'm using <code>metadataOutputRectOfInterestForRect</code> to convert rectangle in order to use <code>AVCaptureMetadataOutput</code> rectOfInterest. But when translate to <code>CGRect</code>, it always return 0.</p>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>NSError *error;
  
  AVCaptureDevice *captureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
  AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:captureDevice error:&amp;error];
  
  if (!input) {
      NSLog(@"%@", [error localizedDescription]);
      return NO;
  }
  
  _captureSession = [[AVCaptureSession alloc] init];
  [_captureSession addInput:input];
  
  _videoPreviewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:_captureSession];
  [_videoPreviewLayer setVideoGravity:AVLayerVideoGravityResizeAspectFill];
  [_videoPreviewLayer setFrame:_viewPreview.bounds];
  [_viewPreview.layer addSublayer:_videoPreviewLayer];
  [_viewPreview bringSubviewToFront:_lblGuide];
  [_viewPreview bringSubviewToFront:_vFocus];
  
  CGRect visibleMetadataOutputRect = [_videoPreviewLayer metadataOutputRectOfInterestForRect:CGRectMake(0, 0, 100, 100)];
  NSLog(@"--- log convert: %@", NSStringFromCGRect(visibleMetadataOutputRect));
  NSLog(@"--- log _videoPreviewLayer: %@", NSStringFromCGRect(_videoPreviewLayer.bounds));
  NSLog(@"--- log _viewPreview: %@", NSStringFromCGRect(_viewPreview.bounds));
  
  _captureMetadataOutput = [[AVCaptureMetadataOutput alloc] init];
  [_captureSession addOutput:_captureMetadataOutput];
  
  _dispatchQueue = dispatch_queue_create("myQueue", NULL);
  [_captureMetadataOutput setMetadataObjectsDelegate:self queue:_dispatchQueue];
  [_captureMetadataOutput setMetadataObjectTypes:[NSArray arrayWithObject:AVMetadataObjectTypeQRCode]];
  [_captureMetadataOutput setRectOfInterest:visibleMetadataOutputRect];
  
  [_captureSession startRunning];
  
  return YES;
  </code></pre>
  
  <p>And the NSlog resut:</p>
  
  <pre><code>[5082:1768978] --- log convert: {{0, 0}, {0, 0}}
  [5082:1768978] --- log _videoPreviewLayer: {{0, 0}, {320, 468}}
  [5082:1768978] --- log _viewPreview: {{0, 0}, {320, 468}}
  </code></pre>
  
  <p>Please help me to resolve it.</p>