Created
May 2, 2014 22:24
-
-
Save nataliepo/2881768d61fa9c5ea179 to your computer and use it in GitHub Desktop.
one-time
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)setUpLogicCasesUsedOnce { | |
_logicUsedOnce = [[NSMutableArray alloc] init]; | |
__block HukkOrNotFeedbackMessageViewController *blockSelf = self; | |
//---- | |
// First 1 Positive I | |
[_logicUsedOnce addObject:^{ | |
if (blockSelf.positives == 3) { | |
[blockSelf showGenericViewWithFade:@"positiveI" | |
shouldHideAfterward:NO]; | |
return YES; | |
} | |
return NO; | |
}]; | |
// --- | |
// 10+ Products have been viewed Encouragement | |
[_logicUsedOnce addObject:^{ | |
if (blockSelf.totalCount >= 10) { | |
[blockSelf showGenericViewWithFade:@"encouragement" | |
shouldHideAfterward:NO]; | |
return YES; | |
} | |
return NO; | |
}]; | |
// -- | |
// * First time 3 0's happen in a row Negative I | |
[_logicUsedOnce addObject:^{ | |
if (blockSelf.series == -3) { | |
[blockSelf showGenericViewWithFade:@"negativeI" | |
shouldHideAfterward:NO]; | |
return YES; | |
} | |
return NO; | |
}]; | |
// -- | |
// 20+ Products have been viewed Negative II | |
[_logicUsedOnce addObject:^{ | |
if (blockSelf.totalCount >= 20) { | |
[blockSelf showGenericViewWithFade:@"negativeII" | |
shouldHideAfterward:NO]; | |
return YES; | |
} | |
return NO; | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment