Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func fetchAllObjectsFromLocalDatastore() {
- var query: PFQuery = PFQuery(className: "Note")
- query.fromLocalDatastore()
- query.whereKey("username", equalTo: PFUser.currentUser()!.username!)
- query.findObjectsInBackgroundWithBlock { (objects, error) -> Void in
- if (error == nil) {
- var temp: NSArray = objects! as NSArray
- self.noteObjects = temp.mutableCopy() as! NSMutableArray
- } else {
- println(error?.userInfo)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement