title: How to refresh the data in collectionview or tableview only for the update?
body: <p>How can i only refresh or reload newly added data in collectionview or tableview instead of reload all the data? Right now i am using following code but it query the database sever to get all the data then reload everything. For example i upload only one photo on the sever so i just want to get that photo and reload collectionview only for this newly added photo not load everyting. how can i do that? Thank you!</p>
  
  <pre><code>func loadPosts(){
  
      let query = PFQuery(className: "posts")
      query.whereKey("username", equalTo:PFUser.current()!.username!) 
      query.limit = page
      query.findObjectsInBackground { (objects, error) in
  
          if error == nil {
              self.picArray.removeAll(keepingCapacity: false)
  
           if let objects  = objects{ 
              for object in objects{
                  self.picArray.append(object.value(forKey: "pic") as! PFFile)
              }
            }
              self.collectionView?.reloadData()
          } else{
              print(error!.localizedDescription)
          }
      }
   }
  </code></pre>
  
  <p>Collection view function </p>
  
  <pre><code>override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
          return picArray.count
      }
  
      override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
          //define cell
  
          let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath) as! pictureCell
  
          picArray[indexPath.row].getDataInBackground { (data, error) in
  
              if error == nil {
                  cell.picImg.image = UIImage(data: data!)
              } else {
                  print(error!.localizedDescription)
              }
          }
  
          return cell
      }
  </code></pre>