let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: nil) for f in detector.featuresInImage(ciImage) { guard let face = f as? CIFaceFeature else { continue } print(face.bounds) // ... }
options: nil) let options = [CIDetectorSmile: true] for f in detector.featuresInImage(image, options: options) { guard let face = f as? CIFaceFeature else { continue } print(face.bounds) // ... }