Skip to content

Commit

Permalink
Merge pull request #13 from Cee/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Cee committed Jun 28, 2015
2 parents 90d54d0 + 03809f4 commit 822c332
Show file tree
Hide file tree
Showing 15 changed files with 129 additions and 48 deletions.
4 changes: 2 additions & 2 deletions ColorMix.xcodeproj/project.pbxproj
Expand Up @@ -537,7 +537,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "2d2bcc7f-b970-42cb-b3d7-b95df6c82a25";
Expand Down Expand Up @@ -577,7 +577,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
PROVISIONING_PROFILE = "32bc0792-84ed-479e-8b90-c6a78bd8e9b8";
SDKROOT = iphoneos;
Expand Down
6 changes: 3 additions & 3 deletions ColorMix/CMConstants.h
Expand Up @@ -10,11 +10,11 @@
#define ColorMix_CMConstants_h

// Channel ID
//#define kChannelId @"AppStore"
#define kChannelId @"Test"
#define kChannelId @"AppStore"
//#define kChannelId @"Test"

#define kUmengAppKey @"558bb56c67e58ef671001f86"
#define kAppStoreUrl @"http://itunes.apple.com/app/id1011677035"
#define kAppStoreUrl @"https://itunes.apple.com/us/app/co!ormix/id1011677035?ls=1&mt=8"
#define kAppId @"1011677035"

// Keys
Expand Down
2 changes: 1 addition & 1 deletion ColorMix/Info.plist
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9</string>
<string>13</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
2 changes: 1 addition & 1 deletion ColorMix/Model/CMQuestion.m
Expand Up @@ -45,7 +45,7 @@ - (NSString *)getQuestion {
return @"Color";
break;
case textContent:
return @"Text";
return @"Meaning";
default:
break;
}
Expand Down
7 changes: 6 additions & 1 deletion ColorMix/View/CMQuestionView.m
Expand Up @@ -15,6 +15,7 @@ @interface CMQuestionView()
@property (nonatomic, weak) IBOutlet UILabel *questionLabel;
@property (nonatomic, weak) IBOutlet UIView *optionView;
@property (nonatomic, strong) CMQuestion *question;
@property (nonatomic) BOOL isAnswered;
@property (nonatomic) GameMode gameMode;
@end

Expand All @@ -24,6 +25,7 @@ - (void)setFrame:(CGRect)frame question:(CMQuestion *)question gameMode:(GameMod
[self setFrame:frame];
self.gameMode = gameMode;
self.question = question;
self.isAnswered = NO;
if (self.gameMode == classicMode) {
CMCard *card = question.cardList[0];
//card
Expand Down Expand Up @@ -79,7 +81,10 @@ - (void)startTimer {

#pragma mark - ButtonAction
- (IBAction)onOptionButtonClicked:(UIControl *)sender {
[self.delegate answerQuestionWithResult:[_question checkAnswer:sender.tag - 1]];
if (!self.isAnswered) {
self.isAnswered = YES;
[self.delegate answerQuestionWithResult:[_question checkAnswer:sender.tag - 1]];
}
}

@end
2 changes: 1 addition & 1 deletion ColorMix/View/CMScoreView.m
Expand Up @@ -31,7 +31,7 @@ - (void)setScore:(NSInteger)score {
[self.logoImageView setHidden:NO];
return;
}
NSMutableAttributedString *scoreAttributedString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%ld", (long)score] attributes:@{NSStrokeWidthAttributeName : @(10.f) , NSFontAttributeName : self.scoreLabel.font}];
NSMutableAttributedString *scoreAttributedString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%ld", (long)score] attributes:@{NSStrokeWidthAttributeName : @(8) , NSFontAttributeName : self.scoreLabel.font}];
for (int i = 0 ; i < scoreAttributedString.length; i ++) {
CMColor *randomColor = [[CMColorFactory sharedInstance] createColorExcept:@"WHITE"];
[scoreAttributedString addAttribute:NSStrokeColorAttributeName value:randomColor.color range:NSMakeRange(i, 1)];
Expand Down
7 changes: 6 additions & 1 deletion ColorMix/View/CMScoreView.xib
Expand Up @@ -3,6 +3,11 @@
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<customFonts key="customFonts">
<mutableArray key="AvenirNext.ttc">
<string>AvenirNext-DemiBold</string>
</mutableArray>
</customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
Expand All @@ -21,7 +26,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="47" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="asM-cQ-eU2">
<rect key="frame" x="0.0" y="71" width="300" height="82"/>
<animations/>
<fontDescription key="fontDescription" name="AvenirNext-UltraLight" family="Avenir Next" pointSize="60"/>
<fontDescription key="fontDescription" name="AvenirNext-DemiBold" family="Avenir Next" pointSize="60"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
Expand Down

0 comments on commit 822c332

Please sign in to comment.