title: How to shift the UItable View down and anchor it to an image programatically
body: <p>Hello what I have is a UITableViewController which displays various sliding out menu options. The idea I have is instead of the menu options to be displayed right below the navigation bar but rather include an image and have these items displayed below the image. I tried to anchor the UITable view to the bottom anchor of the image but it does not work.
  Below are some images:
  <a href="https://i.stack.imgur.com/LjePv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LjePv.png" alt="Image from the view Hierarchy" /></a></p>
  <pre><code>class MenuViewController: UITableViewController {
      
      public var delegate: MenuControllerDelagate?
      private let menuItems: [MenuOptions]
      let darkColour = UIColor(displayP3Red: 33/255.0, green: 33/255.0, blue: 33/255.0, alpha: 1)
      
      private let profileImageView: UIImageView = {
          let iv = UIImageView()
          iv.contentMode = .scaleAspectFill
          iv.clipsToBounds = true
          iv.isUserInteractionEnabled = true
          iv.image = #imageLiteral(resourceName: &quot;venom-7&quot;)
          return iv
      }()
      
      init(with menuItems: [MenuOptions]) {
          self.menuItems = menuItems
          super.init(nibName: nil, bundle: nil)
          tableView.register(UITableViewCell.self, forCellReuseIdentifier: &quot;cell&quot;)
      }
      
      required init?(coder: NSCoder) {
          fatalError(&quot;init(coder:) has not been implemented&quot;)
      }
      
      override func viewDidLoad() {
          super.viewDidLoad()
          view.addSubview(profileImageView)
          profileImageView.anchor(top: view.topAnchor)
          profileImageView.setDimensions(height: 130, width: 130)
          profileImageView.layer.cornerRadius = 130/2
          profileImageView.centerX(inView: view)
          tableView.backgroundColor = darkColour
          tableView.register(UITableViewCell.self, forCellReuseIdentifier: &quot;cell&quot;)
      }
      
      override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return menuItems.count
      }
      
      override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: &quot;cell&quot;, for: indexPath)
          cell.textLabel?.textColor = .white
          cell.textLabel?.text = menuItems[indexPath.row].rawValue
          cell.backgroundColor = darkColour
          cell.imageView?.image = UIImage(systemName: MenuOptions.allCases[indexPath.row].imageName)
          cell.imageView?.tintColor = .white
          return cell
      }
      
      override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
          tableView.deselectRow(at: indexPath, animated: true )
          let selectedItem = menuItems[indexPath.row]
          delegate?.didSelectMenuItem(named: selectedItem)
      }
  }
  </code></pre>
  <p>Any advice how I could properly anchor the list items to be below the image would be greatly appreciated!</p>