ios - PFQuery with live progress -


how can show live progress value when using query? can percent block or anything? how implement such thing?

func querystory(){         self.userfile.removeall()         self.objid.removeall()         self.createdat.removeall()          let query = pfquery(classname: "myclass")         query.wherekey("ispending", equalto: false)         query.orderbydescending("createdat")          query.findobjectsinbackgroundwithblock { (posts: [pfobject]?, error: nserror?) -> void in             if (error == nil){                 // success fetching objects                  print("post count:", posts!.count)                  post in posts! {                      if let imagefile = post["userfile"] as? pffile {                         self.userfile.append(post["userfile"] as! pffile)                         self.objid.append(post.objectid!)                         self.createdat.append(post.createdat!)                     }                 }                  dispatch_async(dispatch_get_main_queue()) {                     self.collectionview.reloadsections(nsindexset(index: 0))                     if (self.refreshcontrolspin == true){                         self.refreshcontrolspin = false                         self.refreshcontrol.endrefreshing()                     }                 }                  print("uploaded files count: ", self.userfile.count)             }             else{                 print(error)             }         }     } 

to show percent value 0 100, , changes live.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -