title: How to name UIImage drawn from UIBezierPath() programmatically in Xcode-Swift?
body: <p>How do we name an image programmatically. For example, assign a name to the image generated below. A name that we can use to distinguish the image from other images drawn programmatically.</p>
  <pre><code> func drawOval (width: CGFloat, height: CGFloat, name: String) -&gt; UIImage {
          let renderer = UIGraphicsImageRenderer(size: CGSize(width: width, height: height))
          
          let image = renderer.image { ctx in
              
              let path = UIBezierPath(ovalIn: CGRect(x: 0, y: 0, width: width, height: height))
              path.stroke()
          }
  
          // TO DO: Assign this image a name, for example &quot;image01&quot;
  
          return image
      }
  </code></pre>