title: How to reload CollectionViewCells from another class in Swift
body: <p>I try to reload a CollectionView when receiving some BLE data. Here is my BluetoothManager Class:</p>
  
  <pre><code>import UIKit
  import CoreBluetooth
  
  class BluetoothManager: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate {
  static var bluetoothManager = BluetoothManager()
  ...
  var Value: [String] = [""]
  ...
  func peripheral(peripheral: CBPeripheral, didUpdateValueForCharacteristic characteristic: CBCharacteristic, error: NSError?){
  //For this example, there is only a string value to update
  Value[0] = "It works!"
  }}
  </code></pre>
  
  <p>Everything works fine, when I receive some data the <code>didUpdateValueForCharacteristic</code> function is called and the first item of the Value array is the string "It works". Now I would like to refresh / reload my CollectionView controller, to display the new value. This is my Collection view class:</p>
  
  <pre><code>import UIKit
  
  class ValueCollectionView: UICollectionViewController{
      @IBOutlet var ValueCollectionView: UICollectionView!
  
      var valueCollectionViewCell: ValueCollectionViewCell = ValueCollectionViewCell()
  
      override func viewDidLoad()
      {
          super.viewDidLoad()
      }
  
      override func didReceiveMemoryWarning()
      {
          super.didReceiveMemoryWarning()
      }
  
      override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int
      {
          return BluetoothManager.bluetoothManager.Value.count
      }
  
      override func collectionView(tableView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell
      {
          let cell: ValueCollectionViewCell = collectionView?.dequeueReusableCellWithReuseIdentifier("valueCell", forIndexPath: indexPath) as! ValueCollectionViewCell
          cell.ValueCollectionViewLabel.text = BluetoothManager.bluetoothManager.Value[indexPath.row]
          return cell
      }
  }
  </code></pre>
  
  <p>What do I have to add in my BluetoothManager class to reload the CollectionView? I thought about something like: <code>ValueCollectionView.reloadData()</code> but I don't know, how to implement it. Thanks! </p>