This file contains hidden or 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
<BMHTTPClient: 0x1eda1ab0, baseURL: http://blastcloudproduction.elasticbeanstalk.com/BlastServer_deploy/API/, defaultHeaders: { | |
Accept = "application/json"; | |
"Accept-Encoding" = gzip; | |
"Accept-Language" = "en, fr, de, ja, nl, it, es, pt, pt-PT, da, fi, nb, sv, ko, zh-Hans, zh-Hant, ru, pl, tr, uk, ar, hr, cs, el, he, ro, sk, th, id, ms, en-GB, ca, hu, vi, en-us;q=0.8"; | |
AuthorizationToken = "b94ae5aa-59d1-46aa-b53a-b5b8bee8eedf"; | |
"Content-Type" = "application/json"; | |
RequestToken = "4c02b9d3-d1e3-4ae7-a2a2-0f38a6b1a5dc"; | |
"User-Agent" = "com.blastmotion.BMP3/0.4.36 (unknown, iPhone OS 6.1, iPad, Scale/2.000000)"; | |
}, registeredOperationClasses: ( | |
AFJSONRequestOperation |
This file contains hidden or 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
/***************************************************************** | |
2xl server param keys | |
*****************************************************************/ | |
//User | |
#define kBMServerFirstName @"FirstName"; | |
#define kBMServerLastName @"LastName"; | |
#define kBMServerEmail @"EmailAddress"; | |
#define kBMServerPassword @"Password"; | |
#define KBMServerUserSecret @"UserSecret"; | |
#define kBMServerZipCode @"HomeZipCode"; |
This file contains hidden or 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
NSDictionary *notificationDictionary = [notification object]; | |
//Extract the values | |
float faceDirectionAngleValue = [[notificationDictionary valueForKey:@"faceDirectionValue"]floatValue]; | |
float backStrokeRotationAngleValue = [[notificationDictionary valueForKey:@"backStrokeRotationAngleValue"]floatValue]; | |
float forwardStrokeRotationAngleValue = [[notificationDictionary valueForKey:@"forwardStrokeRotationAngleValue"]floatValue]; | |
//Use the absolute value for the display | |
float absoluteFaceDirectionAngleValue = fabsf(faceDirectionAngleValue); | |
float absoluteBackStrokeRotationAngleValue = fabsf(backStrokeRotationAngleValue); |
This file contains hidden or 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
if ([connectionState intValue] == Connected) { | |
actionSheet.destructiveButtonIndex = [actionSheet addButtonWithTitle:@"Disconnect"]; | |
} | |
else if ([connectionState intValue] == Disconnected || [connectionState intValue] == Disconnecting) { | |
[actionSheet addButtonWithTitle:@"Connect"]; |
This file contains hidden or 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)swingReceivedNotificationReceived:(NSNotification*)notification | |
{ | |
if ([[notification name] isEqualToString:@"SwingReceivedNotification"]) | |
{ | |
NSDictionary *notificationDictionary = [notification object]; | |
//set values on all screens | |
for (int i = 0; i < [self childViewControllers].count; i++) { | |
MetricsDisplayViewController *viewController = (MetricsDisplayViewController*)[self.childViewControllers objectAtIndex:i]; | |
NSString *viewControllerTitle = [NSString stringWithFormat:@"%@", viewController.title]; | |
viewController.metricLabelValue = [notificationDictionary valueForKey:viewControllerTitle]; |
This file contains hidden or 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
// Enumerate just the photos and videos group by using ALAssetsGroupSavedPhotos. | |
[library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) { | |
// Within the group enumeration block, filter to enumerate just videos. | |
[group setAssetsFilter:[ALAssetsFilter allVideos]]; | |
// For this example, we're only interested in the first item. | |
[group enumerateAssetsAtIndexes:[NSIndexSet indexSetWithIndex:([group numberOfAssets]-1)] | |
options:0 | |
usingBlock:^(ALAsset *alAsset, NSUInteger index, BOOL *innerStop) { |
This file contains hidden or 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
NSString *text = @"What\nIs\nUp?"; | |
CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN * 2), 20000.0f); | |
CGSize size = [text sizeWithFont:[UIFont systemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; | |
CGFloat height = MAX(size.height, 44.0f); | |
CGFloat labelHeight = height + (CELL_CONTENT_MARGIN * 2); |
This file contains hidden or 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
float backStrokeRotationAngleValue = [[notificationDictionary valueForKey:@"backStrokeRotationAngleValue"]floatValue]; | |
float forwardStrokeRotationAngleValue = [[notificationDictionary valueForKey:@"forwardStrokeRotationAngleValue"]floatValue]; | |
if (backStrokeRotationValue < 0) { | |
backStrokeRotationAngleValue = backStrokeRotationAngleValue * -1; | |
backStrokeRotationOpeningString = @"closing"; | |
} | |
else if (backStrokeRotationAngleValue == 0) { | |
backStrokeRotationOpeningString = @""; | |
} |
This file contains hidden or 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
if (CFStringCompare ((__bridge CFStringRef) fileType, kUTTypeMovie, 0) | |
== kCFCompareEqualTo) { | |
NSString *moviePath = [[info objectForKey:UIImagePickerControllerMediaURL] path]; | |
dataObj = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:moviePath]]; | |
} |
This file contains hidden or 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
mediaType = @"video"; | |
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { | |
[picker setVideoQuality:UIImagePickerControllerQualityTypeLow]; | |
//Maximum video length | |
[picker setVideoMaximumDuration:10]; | |
picker.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil]; | |
picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo; | |
[self presentViewController:picker animated:YES completion:nil]; | |
} |
NewerOlder