title: Focus uibutton inside uicollectionviewCell
body: <p>I have a custom <code>UICollectionView Cell</code>. The layout of the cell looks like this</p>
  
  <pre><code> - ContentView
      - UILabel
      - UIView --&gt; buttonView
            - UIButton
  </code></pre>
  
  <p><code>ButtonViews</code> hidden property is standard set to true. 
  When the user taps the cell. <code>ButtonView</code> becomes visible. </p>
  
  <p>What my problem now is, is that I don't get the focus to the <code>uibutton</code> inside the <code>buttonView</code></p>
  
  <p>This are pieces of my code: </p>
  
  <p>In my viewController: </p>
  
  <pre><code> func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
          let cell = collectionView.cellForItemAtIndexPath(indexPath) as! ShoppingCartCell
  
          cell.buttonView.hidden = false
          cell.buttonView.updateFocusIfNeeded()
  
      }
  
      func collectionView(collectionView: UICollectionView, canFocusItemAtIndexPath indexPath: NSIndexPath) -&gt; Bool {
              return true
      }
  </code></pre>
  
  <p>In my custom cell:</p>
  
  <pre><code>   public override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator) {
          if (self.focused)
          {
              self.transform = CGAffineTransformMakeScale(1.1, 1.1)
          }
          else
          {
              self.transform = CGAffineTransformIdentity
             buttonView.hidden = true
          }
  
  
          super.didUpdateFocusInContext(context, withAnimationCoordinator: coordinator)
  
          guard let nextFocusedView = context.nextFocusedView else { return }
  
          switch nextFocusedView {
          case self.buttonView:
              self.focusGuide.preferredFocusedView = self.deleteButton
          default:
              self.focusGuide.preferredFocusedView = nil
          }
  
      }
  </code></pre>