@objc func drawRectangle() { // Get the Graphics Context let context = UIGraphicsGetCurrentContext() // Set the rectangle outerline-width context?.setLineWidth( 5.0) // Set the rectangle outerline-colour UIColor.red.set() // Create Rectangle context?.addRect( CGRect(x: 0, y: 0, width: 100, height: 100)) // Draw context?.strokePath() }Intenté usar esto y exportar el método, pero el rectángulo no se muestra en la aplicación nativa de reacción.