title: Show bounding area in Barcode scanner
body: <p>I'm trying to implement barcode scanning feature in my app (swift) and I've found a project in github that does it great with AVFoundation. Now, I would like to know how could I show bounding area. I've not found any example in swift.</p>
  
  <p><a href="https://github.com/mhassanpur/tutorial-ios-barcode-scanner" rel="nofollow">https://github.com/mhassanpur/tutorial-ios-barcode-scanner</a></p>
  
  <p><strong>EDIT</strong>
  I add the following lines after capturePReviewLayer create in <code>initializeScanner</code> and it worked but the layer is black and not clearcolor with red border. Any idea?</p>
  
  <pre><code>let rectangle: UIBezierPath = UIBezierPath(rect: CGRectMake(0, UIScreen.mainScreen().bounds.size.height/2 - 30, UIScreen.mainScreen().bounds.size.width, 60))
  UIColor.clearColor().setFill()
  rectangle.fill()
  UIColor.redColor().setStroke()
  rectangle.lineWidth = 1
  rectangle.stroke()
  
  let circleLayer: CAShapeLayer = CAShapeLayer.init()
  circleLayer.path = rectangle.CGPath
  capturePreviewLayer.addSublayer(circleLayer)
  </code></pre>