title: Parse LiveQuery How do I uses Loadmore , limits
body: <p>Hi I'm uses ParseLiveQuery and PFSubclassing in Swift 3</p>
  
  <p>My question is limits is not working for me.</p>
  
  <p>Here is my PFSubclassing</p>
  
  <pre><code>import Foundation
  import Parse
  
  class Post: PFObject, PFSubclassing {
  
      @NSManaged var postBy: PFUser?
      @NSManaged var postText: String?
      @NSManaged var postImg: PFFile?
      @NSManaged var sell: NSNumber?
      @NSManaged var commentPointer: PFObject?
      @NSManaged var commentBy: PFUser?
      @NSManaged var comment: String?
      @NSManaged var likeCount: NSNumber?
      @NSManaged var mention: NSArray?
      @NSManaged var hashtag: NSArray?
  
      static func parseClassName() -&gt; String {
          return "Post"
      }
  
  
      override class func query() -&gt; PFQuery&lt;PFObject&gt;? {
  
          let query = PFQuery(className: Post.parseClassName())
  
          query.whereKeyExists("objectId")
          query.includeKeys(["postBy", "commentPointer", "commentPointer.commentBy", "commentBy"])
          query.order(byDescending: "createdAt")
          query.cachePolicy = .networkElseCache
          return query
      }
  
  }
  </code></pre>
  
  <p>And It is my tableVieController</p>
  
  <pre><code>class FeedVC: UITableViewController, ShopDetailDelegate {
  
      private var subscription: Subscription&lt;Post&gt;!
  
      //Add friends and me
  
      var postLiveQuery: PFQuery&lt;Post&gt; {
          return Post.query() as! PFQuery&lt;Post&gt;
      }
  
  
      var client: Client {
  
          return ParseLiveQuery.Client.shared
      }
  
      var results = [Post]()
  </code></pre>
  
  <p>I had declare subscription in ViewDidLoad()</p>
  
  <pre><code>   subscription = client.subscribe(postLiveQuery).handleSubscribe { [weak self]  (_) in
              // Fetch the objects on subscription to not miss any
              self?.fetchObjects()
              }.handleEvent { [weak self] (_, event) in
                  self?.handleEvent(event: event)
          }
  </code></pre>
  
  <p>And Here is what I'm trying to this.</p>
  
  <pre><code>func fetchObjects() {
          postLiveQuery.limit = self.page
          postLiveQuery.findObjectsInBackground().continue(with: BFExecutor.mainThread(), with: { (task) -&gt; Any? in
              guard let objects = task.result as? [Post] else {
                  return nil
              }
              self.results = objects
              self.tableView.reloadData()
  
              print("Got it!!!")
  
              print(objects)
              return nil
          })
      }
  
      //load more
      func morefetchObjects() {
          if page &lt;= results.count {
  
              //Start animating indicator
              indicator.startAnimating()
  
              //increase page size to load + 10 posts
              page = page + 1
  
              postLiveQuery.limit = self.page
              postLiveQuery.findObjectsInBackground().continue(with: BFExecutor.mainThread(), with: { (task) -&gt; Any? in
                  guard let objects = task.result as? [Post] else {
                      return nil
                  }
                  self.results = objects
                  self.tableView.reloadData()
  
                  print("morefetchObjects")
  
                  print(objects)
                  return nil
              })
  
  
          }
  
      }
  
  
  
      //scrolled down
      override func scrollViewDidScroll(_ scrollView: UIScrollView) {
  
          if scrollView.contentOffset.y &gt;= scrollView.contentSize.height - self.view.frame.size.height * 2 {
  
                  morefetchObjects()
          }
      }
  </code></pre>
  
  <p>It works fine but When I called fetchObject() then It retrieve all of datas from parse-server. I want fetch only limits and then When I scroll down I wish to get retrieve more data.</p>
  
  <p>How can I implement this?</p>