title: How to change focus programmatically in tvOS
body: <p>I am developing a tvOS app in swift. I am using <code>UITabBarController</code> in the app.
  My requirement is to hide the tabbar automatic after 10 seconds and focus can move to <code>AVPlayerViewController</code> inside the tabbar item.
  I tried to override <code>preferredFocusedView</code>, but focus cannot move to <code>AVPlayerViewController</code>.</p>
  
  <pre><code>func updateFocus() {
  
      self.playerController.view.hidden = false
      self.playerController.view.alpha = 1.0
      self.playerController.view.userInteractionEnabled = true
      self.playerController.view.layer.zPosition = 1.0
      self.preferredFocusedView
      setNeedsFocusUpdate()
      updateFocusIfNeeded()
  }
  
  override var preferredFocusedView: UIView? {
  
      return self.playerController.view
  
  }
  </code></pre>
  
  <p>Please suggest me how to move focus programmatically.</p>