title: ReloadData in UICollectionView
body: <p>I use CoreData and want to reload the UICollectionView when I save a new entry in CoreData but the only <code>self.collectionview.reloaddata()</code>don´t run it reload nothing. </p>
  
  <p>Thanks for your Help.</p>
  
  <p>My CoreData and UICollectionView I have try it to reload the UICollectionView when clockblogalarm become a new entry: </p>
  
  <pre><code>var clockblogalarm = [ClockBlogAlarm] () {
      didSet {              //self.ClockCollectionView.reloadData()
      }
  }
  
  
  var mgdContext = (UIApplication.shared.delegate as! AppDelegate).managedObjectContext
  
  
  func loadClockAlarms () {
      let LoadRequestBlogAlarm: NSFetchRequest&lt;ClockBlogAlarm&gt; = ClockBlogAlarm.fetchRequest()
      clockblogalarm = try! mgdContext.fetch(LoadRequestBlogAlarm as! NSFetchRequest&lt;NSFetchRequestResult&gt;) as! [ClockBlogAlarm]
  }
  
  
  
  @IBOutlet var ClockCollectionView: UICollectionView!
  
  
  override func viewWillAppear(_ animated: Bool) {
      super.viewWillAppear(animated)    
      self.loadClockAlarms()  
  }
  </code></pre>
  
  <p>Here I save the Entry in CoreData. When I click the Button Done <code>view.bottomButtonHandler{}</code> then I want to reload the data and show it in the UICollectionView with loadClockAlarms() .</p>
  
  <pre><code>else if index == 1 {
  
          let view = AddClockView.instantiateFromNib()
          let window = UIApplication.shared.delegate?.window!
          view.closeButtonHandler = {[weak modal] in
              modal?.closeWithLeansRandom()
              return
          }
          view.bottomButtonHandler = {[weak modal] in
              modal?.closeWithLeansRandom()
  
              self.loadClockAlarms()
  
  
              return
          }
  
          modal.show(modalView: view, inView: window!)
  
      }
  
  
  
  
  
  
  // MARK: UICollectionViewDataSource
  
  
  
  override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      return clockblogalarm.count
  }
  
  
  
  override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
      let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "AlarmBlogCell", for: indexPath) as! AlarmBlogCell
  
      cell.layer.cornerRadius = 8
  
  
  
      let clockblogalarms = clockblogalarm[indexPath.row]
  
  
      if clockblogalarms.lock == "ClockblogAlarm" {
  
          cell.Title.text = clockblogalarms.title
          cell.Time.text = "SSSSS"
  
      }
  
  
  
  
      return cell
  }
  </code></pre>