title: Why is my uipagecontrol not updating correctly the 1st time, but is on the 2nd time through Xcode
body: <p>I have a situation with a UIPageControl embedded in my UICollectionView.  Each page has it's own designated page, which I've split into Collection view cells.  When I swipe over for the second page, the page control indicator stays on 1, and when I swipe to the 3rd page it updates correctly to the 3rd indicator.  When I swipe, back to page 2, the page control is now showing the correct indicator.  It happens every time, only for the 2nd page.  </p>
  
  <p>Here is some of my code:</p>
  
  <p>On the main controller with the collection view, </p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
      let cell = collectionView.dequeueReusableCellWithReuseIdentifier("cellId", forIndexPath: indexPath) as! ItemImageCell
  
      if let imageURL = self.featuredItem.itemImageNames {
          cell.itemImageURL = imageURL[indexPath.item]
          cell.pageControl.currentPage = indexPath.item
          cell.pageControl.numberOfPages = imageURL.count
      }
      return cell
  }
  </code></pre>
  
  <p>And in the cellView class,</p>
  
  <pre><code>let pageControl: UIPageControl = {
      let pageControl = UIPageControl()
      pageControl.pageIndicatorTintColor = UIColor.grayColor()
      pageControl.currentPageIndicatorTintColor = UIColor.blackColor()
      return pageControl
  }()
  
  override func setupViews() {
      backgroundColor = UIColor.whiteColor()
      addSubview(pageControl)
  
      addConstraint(NSLayoutConstraint(item: pageControl, attribute: .CenterX, relatedBy: .Equal, toItem: self, attribute: .CenterX, multiplier: 1, constant: 0))
  
  }
  </code></pre>
  
  <p>Am I not setting it up correctly?</p>
  
  <p>Edit: </p>
  
  <p>The featuredItem model class:</p>
  
  <pre><code>class FeaturedItem: NSObject {
  
      var itemImageNames: [String]?
      var itemTitle: String?
      var itemHighlight: String?
      var itemDescription: String?
      var itemURL: String?
  
  
  }
  </code></pre>