title: Only first UILabel in Cell, UICollectionView Updated - Swift
body: <p>I am trying to update a UILabel that exists on my UICollectionView Cell. Although I am having the problem where <strong>only the first cell gets updated with the new string</strong></p>
  
  <p>I firstly tried to hook up an IBOutlet to the UILabel in the Cell, however got this problem:</p>
  
  <pre><code>Main.storyboard: error: Illegal Configuration: Connection "name" cannot have a prototype object as its destination.
  </code></pre>
  
  <p>Next, i tried to use a tag - however using this method, only one of the UICollectionView Cells get updated.</p>
  
  <pre><code>// MARK: UICollectionViewDataSource
  
  override func numberOfSectionsInCollectionView(collectionView: UICollectionView!) -&gt; Int {
      //#warning Incomplete method implementation -- Return the number of sections
      return 1
  }
  
  override func collectionView(collectionView: UICollectionView!, numberOfItemsInSection section: Int) -&gt; Int {
      //#warning Incomplete method implementation -- Return the number of items in the section
      return 1000
  }
  
  override func collectionView(collectionView: UICollectionView!, cellForItemAtIndexPath indexPath: NSIndexPath!) -&gt; UICollectionViewCell! {
      let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as UICollectionViewCell
  
      var nameLbl : UILabel? = self.collectionView.viewWithTag(100) as? UILabel;
  
      nameLbl?.text = "woof woof"
  
      return cell
  }
  </code></pre>
  
  <p>How can i make it so that all of the cells are updated? I the future this label will change so it needs to be dynamic</p>
  
  <p>I used to achieve this in Objective-C using:</p>
  
  <pre><code>UILabel *label = (UILabel*)[cell.contentView viewWithTag:LABEL_TAG];
  </code></pre>