Skip to content

Instantly share code, notes, and snippets.

@nataliepo
Created May 2, 2014 22:24
Show Gist options
  • Save nataliepo/2881768d61fa9c5ea179 to your computer and use it in GitHub Desktop.
Save nataliepo/2881768d61fa9c5ea179 to your computer and use it in GitHub Desktop.
one-time
-(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