This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for string in self.stringsOfFirstImages { | |
print("thisString: \(string)") | |
let query = PFQuery(className: "imageBundle") | |
query.whereKey("objectId", equalTo: string) | |
query.getFirstObjectInBackgroundWithBlock({ | |
(object, error) -> Void in | |
guard object != nil else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.checkUploadFrequency({ (objects, success) -> () in | |
guard success == true else { | |
return | |
} | |
guard let objCount = objects?.count | |
where objCount > 3 else { | |
return | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func getProfilesByPoints(completionHandler: (users:NSMutableArray) -> ()) { | |
var users = NSMutableArray() | |
var query = PFQuery(className:"points") | |
query.addDescendingOrder("points") | |
query.findObjectsInBackgroundWithBlock { | |
(objects: [AnyObject]!, error: NSError!) -> Void in | |
if error == nil { |