Quisiera mostrar por cierto tiempo (2 segundos) un sublayer circular que se encuentra en mi función pointCamera
. Pero no encuentro la forma de hacerlo, este es mi código:
func pointCamera(centerPoint: CGPoint) {
let circlePath = UIBezierPath(arcCenter: centerPoint, radius: CGFloat(30), startAngle: CGFloat(0), endAngle: CGFloat(M_PI * 2), clockwise: true)
let shapeLayer = CAShapeLayer()
shapeLayer.path = circlePath.cgPath
shapeLayer.fillColor = UIColor(red: 240/255, green: 240/255, blue: 240/255, alpha: 0.3).cgColor
shapeLayer.strokeColor = UIColor(red: 0, green: 191/255, blue: 1, alpha: 0.9).cgColor
shapeLayer.lineWidth = 2.0
cameraView.layer.addSublayer(shapeLayer)
}