title: how to programmatically show a colored disk behind a UIImageView, in swift on an iOS device
body: <p>I have an icon that I programmatically display.<br />
  How can I display a solid, colored disk behind the icon, at the same screen position?</p>
  <p>Icon is opaque.</p>
  <p>I will sometimes programmatically change screen position and disk's diameter and color.</p>
  <p>Here's how I programmatically display the icon now.............</p>
  <pre><code>DispatchQueue.main.async
  {
  
         ViewController.wrist_band_UIImageView.frame = CGRect(   x: screen_position_x, 
                                                                 y: screen_position_y,
                                                                 width: App_class.screen_width,
                                                                 height: App_class.screen_height)
  }
  </code></pre>
  <p><strong>UPDATE #1</strong>   for D.Mika below...
  <a href="https://i.stack.imgur.com/gOJLE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gOJLE.png" alt="enter image description here" /></a></p>
  <p><strong>UPDATE #2</strong>   for D.Mika below...</p>
  <pre><code>import UIKit
              import Foundation
  
  
  class ViewController: UIViewController 
  {
      static var circleView: UIView!
  
      static let wrist_band_UIImageView: UIImageView = {
         let theImageView = UIImageView()
         theImageView.image = UIImage( systemName: &quot;applewatch&quot; )
         theImageView.translatesAutoresizingMaskIntoConstraints = false 
         return theImageView
      }()
  
      override func viewDidLoad()     
      {
              super.viewDidLoad()
  
              view.addSubview( ViewController.wrist_band_UIImageView )
          // Init disk image:
          ViewController.circleView = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 100.0, height: 100.0))
          ViewController.circleView.backgroundColor = .red
          ViewController.circleView.layer.cornerRadius = view.bounds.size.height / 2.0
          ViewController.circleView.clipsToBounds = true
              // Add view to view hierarchy below image view
          ViewController.circleView.insertSubview(view, belowSubview: ViewController.wrist_band_UIImageView)
  
  
          App_class.display_single_wearable()
      }
   }
  
   class App_class
   {
      static var is_communication_established = false
      static var total_packets = 0
  
      static func display_single_wearable()
      {
                  ViewController.wrist_band_UIImageView.frame = CGRect(x: 0, y: 0,
                                                                        width: 100, height: 100)
  
                  ViewController.circleView.frame = CGRect(   x: 0,
                                               y: 0,
                                               width: 100,
                                               height: 100)
                  ViewController.circleView.layer.cornerRadius = 100
      }
  
      static func process_location_xy(text_location_xyz: String)
      {}
  } // App_class
  </code></pre>
  <p><a href="https://i.stack.imgur.com/BBUMc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BBUMc.png" alt="enter image description here" /></a></p>