                 self.faceRectCALayer.hidden = true
             });
         }
-        
     }
     
 }

        for metadataObject in metadataObjects as! [AVMetadataObject] {
            if metadataObject.type == AVMetadataObjectTypeFace {
                if let faceObject = metadataObject as? AVMetadataFaceObject {
                    
                    let transformedMetadataObject = previewLayer.transformedMetadataObjectForMetadataObject(metadataObject)
                    let face:(id: Int, frame: CGRect) = (faceObject.faceID, transformedMetadataObject.bounds)
                    faces.append(face)

            }
        }
        print("FACE",faces)
        
        if (faces.count>0){
            dispatch_async(dispatch_get_main_queue(), {() -> Void in
                CATransaction.begin()
