Skip to content

Commit

Permalink
Added example XCode project, use iOS 7.0 as the minimum requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
jetpaccomputer committed Apr 4, 2014
1 parent bf6677c commit fdd5616
Show file tree
Hide file tree
Showing 13 changed files with 510 additions and 7 deletions.
Binary file modified examples/LearningExample/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -302,7 +302,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
Expand Down
Binary file not shown.
2 changes: 2 additions & 0 deletions examples/LearningExample/SquareCamViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
void* trainer;
void* predictor;
int predictionState;

NSString* lastInfo;
}
@property (retain, nonatomic) CATextLayer *predictionTextLayer;
@property (retain, nonatomic) CATextLayer *progressBackground;
Expand Down
11 changes: 8 additions & 3 deletions examples/LearningExample/SquareCamViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,8 @@ - (void) setupLearning {
predictor = NULL;
predictionState = eWaiting;

lastInfo = NULL;

[self setupInfoDisplay];
}

Expand Down Expand Up @@ -1074,7 +1076,7 @@ - (void) setupInfoDisplay {
[self.infoForeground setFontSize: fontSize];
self.infoForeground.contentsScale = [[UIScreen mainScreen] scale];

[self.infoForeground setString: @"Some string"];
[self.infoForeground setString: @""];

[[self.view layer] addSublayer: self.infoForeground];
}
Expand Down Expand Up @@ -1116,8 +1118,11 @@ - (void) updateInfoDisplay {
}

- (void) setInfo: (NSString*) info {
[self.infoForeground setString: info];
[self speak: info];
if (![info isEqualToString: lastInfo]) {
[self.infoForeground setString: info];
[self speak: info];
lastInfo = info;
}
}

- (void) setProgress: (float) amount {
Expand Down
4 changes: 2 additions & 2 deletions examples/RomoExample/RomoExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -326,7 +326,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
Expand Down
Binary file not shown.
Loading

0 comments on commit fdd5616

Please sign in to comment.