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
-(void) mirroringX1:(float)x1 y1:(float)y1 x2:(float)x2 y2:(float)y2{ | |
float mirrorNumber = totalLines; | |
float deltaAngle = 360 / mirrorNumber; | |
float deltaAngleRadian = [self degreesToRadian:deltaAngle]; | |
float centerX = self.frame.size.width / 2; | |
float centerY = self.frame.size.height / 2; | |
float distance1 = [self distX1:x1 y1:y1 x2:centerX y2:centerY]; |
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
PFQuery *queryPhoto = [PFQuery queryWithClassName:@"Photo"]; | |
[queryPhoto whereKey:@”user” equalTo:[PFUser currentUser]]; | |
[queryPhoto orderByDescending:@"createdAt"]; | |
[queryPhoto findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { | |
//handle sketches | |
} |
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
UIImage *resizedImage = [anImage resizedImageWithContentMode:UIViewContentModeScaleAspectFit bounds:CGSizeMake(1152.0f, 1536.0f) interpolationQuality:kCGInterpolationHigh]; | |
// JPEG to decrease file size and enable faster uploads & downloads | |
NSData *imageData = UIImageJPEGRepresentation(resizedImage, 0.8f); | |
PFFile* photoFile = [PFFile fileWithData:imageData]; | |
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
- (IBAction)loginButtonTouchHandler:(id)sender{ | |
NSArray *permissionsArray = @[@"user_about_me"]; | |
[PFFacebookUtils logInWithPermissions:permissionsArray block:^(PFUser *user, NSError *error) { | |
if (!user) { | |
if (!error) { | |
NSLog(@"Uh oh. The user cancelled the Facebook login."); | |
} else { | |
NSLog(@"Uh oh. An error occurred: %@", error); | |
} |
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
Parse.Cloud.define("loadChannelsFromDate", function(request, response) { | |
var fromDate = request.params.fromDate; | |
var toDate = request.params.toDate; | |
var count = request.params.count; | |
var query = new Parse.Query("archupObject"); | |
query.limit = count; | |
if(fromDate){ | |
query.greaterThan("updatedAt", fromDate); |
NewerOlder