Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // MixMatchViewController.m
- // cmcd_fcb_critters
- //
- // Created by Li, Yun on 6/2/11.
- // Copyright 2011 __MyCompanyName__. All rights reserved.
- //
- #import "MixMatchViewController.h"
- #import <UIKit/UIKit.h>
- #import <CoreData/CoreData.h>
- #import <CoreGraphics/CGGeometry.h>
- #include <QuartzCore/QuartzCore.h>
- #import "MainViewController.h"
- #import "SettingsViewController.h"
- #import "cmcd_fcb_crittersAppDelegate.h"
- //demetions for iPad;
- static NSUInteger pageWidth_iPad = 768;
- static NSUInteger topHeight_iPad = 696;
- static NSUInteger bottomHeight_iPad = 308;
- //demetions for iPhone
- static NSUInteger pageWidth_iPhone = 320;
- static NSUInteger topHeight_iPhone = 318;
- static NSUInteger bottomHeight_iPhone = 142;
- @implementation MixMatchViewController
- @synthesize myIndex;
- @synthesize topText;
- @synthesize largeText;
- @synthesize smallText;
- @synthesize animalText;
- @synthesize animalTextCH1;
- @synthesize animalTextCH2;
- @synthesize animalNames;
- @synthesize centerBar;
- @synthesize numberNames;
- @synthesize topCards;
- @synthesize bottomCards;
- @synthesize cardTop;
- @synthesize cardBottom;
- @synthesize cardSet;
- @synthesize home;
- @synthesize pages;
- @synthesize tiles;
- @synthesize bottomKeys;
- @synthesize topKeys;
- @synthesize buttonTimer;
- @synthesize narrationTimer;
- @synthesize pageControl;
- @synthesize delegate;
- @synthesize homeButtonPushedTime;
- @synthesize matches;
- @synthesize successPlayers;
- // Utility method for accessing the main controller (which houses our views)
- - (MainViewController*)getMainViewController {
- return [(cmcd_fcb_crittersAppDelegate*)[[UIApplication sharedApplication] delegate] mainViewController];
- }
- - (cmcd_fcb_crittersAppDelegate*)getAppDelegate {
- return (cmcd_fcb_crittersAppDelegate*)[[UIApplication sharedApplication] delegate];
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- // check to see what the state of our mute button should be
- if ([NSUserDefaults standardUserDefaults]) {
- cardSet = [[NSUserDefaults standardUserDefaults] objectForKey:@"cardSet"];
- NSLog(@"set the card set!");
- }
- self.tiles = ([[cardSet objectForKey:@"tiles"] integerValue]);
- self.pages = ([[cardSet objectForKey:@"tiles"] integerValue]*10);
- NSLog(@"the pages are, the tiles are : %d, %d",pages, tiles);
- [self loadNumberNames];
- [self loadAnimalNames];
- [self resetKeys];
- if (cardTop) {
- cardTop = nil;
- [cardTop release];
- }
- if (cardBottom) {
- cardBottom = nil;
- [cardBottom release];
- }
- /* Set up the SP dialog window */
- CGRect topFrame;
- CGRect bottomFrame;
- /* We only use the top frame in Mix & Match mode */
- NSUInteger pageWidth;
- NSUInteger topHeight;
- NSUInteger bottomHeight;
- if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
- pageWidth = pageWidth_iPad;
- topHeight =topHeight_iPad;
- bottomHeight =bottomHeight_iPad;
- }
- else{
- pageWidth = pageWidth_iPhone;
- topHeight =topHeight_iPhone;
- bottomHeight =bottomHeight_iPhone;
- }
- topFrame = CGRectMake(0, 0, pageWidth, topHeight);
- bottomFrame = CGRectMake(0, topHeight, pageWidth, bottomHeight);
- //top
- self.cardTop = [[Scroller alloc] initWithFrame:topFrame];
- cardTop.region = @"t";
- cardTop.pagingEnabled = YES;
- cardTop.contentSize = CGSizeMake(pageWidth*pages, topHeight);
- cardTop.showsHorizontalScrollIndicator = NO;
- cardTop.showsVerticalScrollIndicator = NO;
- cardTop.scrollsToTop = NO;
- cardTop.delegate = self;
- cardTop.scrollEnabled = FALSE;
- [self.view addSubview:cardTop];
- [self.view sendSubviewToBack:cardTop];
- //bottom
- self.cardBottom = [[Scroller alloc] initWithFrame:bottomFrame];
- cardBottom.region = @"b";
- cardBottom.pagingEnabled = YES;
- cardBottom.contentSize = CGSizeMake(pageWidth*pages, bottomHeight);
- cardBottom.showsHorizontalScrollIndicator = NO;
- cardBottom.showsVerticalScrollIndicator = NO;
- cardBottom.scrollsToTop = NO;
- cardBottom.delegate = self;
- [self.view addSubview:cardBottom];
- [self.view sendSubviewToBack:cardBottom];
- [self loadScrollView:0 withRegion:@"t"];
- //[self loadScrollView:1 withRegion:@"t"];
- //[self loadScrollView:2 withRegion:@"t"];
- [self loadScrollView:0 withRegion:@"b"];
- //[self loadScrollView:1 withRegion:@"b"];
- //[self loadScrollView:2 withRegion:@"b"];
- //match
- matches = [[NSMutableArray alloc] init];
- //[self showMatches];
- topText.text = @"Double Tap Image to Confirm a Match";
- UIColor *grey = [UIColor colorWithRed:0.52 green:0.52 blue:0.52 alpha:1.0];
- topText.textColor = grey;
- if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
- animalText.font = [UIFont fontWithName:@"Helvetica-Bold" size:32];
- animalText.textAlignment = UITextAlignmentCenter;
- animalTextCH1.font = [UIFont fontWithName:@"Helvetica-Bold" size:32];
- animalTextCH1.textAlignment = UITextAlignmentRight;
- animalTextCH2.font = [UIFont fontWithName:@"Helvetica-Bold" size:32];
- animalTextCH2.textAlignment = UITextAlignmentLeft;
- centerBar.font = [UIFont fontWithName:@"Helvetica-Bold" size:32];
- centerBar.textAlignment = UITextAlignmentCenter;
- // largeText.font = [UIFont fontWithName:@"Helvetica-Bold" size:280];
- // largeText.textAlignment = UITextAlignmentCenter;
- smallText.font = [UIFont fontWithName:@"Helvetica-Bold" size:44];
- smallText.textAlignment = UITextAlignmentLeft;
- topText.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];
- topText.textAlignment = UITextAlignmentCenter;
- [self becomeFirstResponder];
- }
- else{
- animalText.font = [UIFont fontWithName:@"Helvetica-Bold" size:17];
- animalText.textAlignment = UITextAlignmentCenter;
- animalTextCH1.font = [UIFont fontWithName:@"Helvetica-Bold" size:17];
- animalTextCH1.textAlignment = UITextAlignmentRight;
- animalTextCH2.font = [UIFont fontWithName:@"Helvetica-Bold" size:17];
- animalTextCH2.textAlignment = UITextAlignmentLeft;
- centerBar.font = [UIFont fontWithName:@"Helvetica-Bold" size:17];
- centerBar.textAlignment = UITextAlignmentCenter;
- // largeText.font = [UIFont fontWithName:@"Helvetica-Bold" size:100];
- // largeText.textAlignment = UITextAlignmentCenter;
- smallText.font = [UIFont fontWithName:@"Helvetica-Bold" size:17];
- smallText.textAlignment = UITextAlignmentLeft;
- topText.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];
- topText.textAlignment = UITextAlignmentCenter;
- [self becomeFirstResponder];
- }
- [pool release];
- }
- - (void)loadNumberNames {
- NSLog(@"%@", cardSet);
- NSString *docs = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
- NSString *plist = [NSString stringWithFormat:@"%@_number_%@", [cardSet objectForKey:@"prefix"], [cardSet objectForKey:@"language"]];
- NSString *path = [NSString stringWithFormat:@"%@/%@/%@.plist", docs, [cardSet objectForKey:@"prefix"], plist];
- NSLog(@"plistPath: %@", path);
- NSFileManager *fileManager = [NSFileManager defaultManager];
- if (![fileManager fileExistsAtPath:path]) {
- NSLog(@"reading plist from nib");
- path = [[NSBundle mainBundle] pathForResource:plist ofType:@"plist"];
- }
- self.numberNames = [[NSMutableDictionary alloc] initWithContentsOfFile:path];
- }
- - (void)loadAnimalNames {
- NSLog(@"%@", cardSet);
- NSString *docs = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
- NSString *plist = [NSString stringWithFormat:@"%@_animal_%@", [cardSet objectForKey:@"prefix"], [cardSet objectForKey:@"language"]];
- NSString *path = [NSString stringWithFormat:@"%@/%@/%@.plist", docs, [cardSet objectForKey:@"prefix"], plist];
- NSLog(@"plistPath: %@", path);
- NSFileManager *fileManager = [NSFileManager defaultManager];
- if (![fileManager fileExistsAtPath:path]) {
- NSLog(@"reading plist from nib");
- path = [[NSBundle mainBundle] pathForResource:plist ofType:@"plist"];
- }
- self.animalNames = [[NSMutableDictionary alloc] initWithContentsOfFile:path];
- }
- /*****************
- * BUTTON ACTIONS
- *****************/
- - (BOOL) isTapAndHold {
- if ([NSUserDefaults standardUserDefaults]) {
- return [[NSUserDefaults standardUserDefaults] boolForKey:@"tapAndHold"];
- }
- return FALSE;
- }
- - (IBAction)homeButtonDown:(id)sender {
- homeButtonPushedTime = [NSDate date];
- if ([self isTapAndHold]) {
- buttonTimer = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(pushedHomeButton:) userInfo:homeButtonPushedTime repeats: NO];
- }
- }
- - (IBAction)homeButtonUp:(id)sender {
- homeButtonPushedTime = NULL;
- if (![self isTapAndHold]) {
- [self pushedHomeButton:NULL];
- }
- }
- - (void) pushedHomeButton:(id)timer {
- if ([self isTapAndHold] && (NSDate*)[timer userInfo] != homeButtonPushedTime) return;
- [(cmcd_fcb_crittersAppDelegate*)[[UIApplication sharedApplication] delegate] playButtonSound];
- [self.delegate mixMatchViewControllerDidFinish:self];
- }
- /**************************************************
- * AUDIO TODO: Move this to app delegate like music
- **************************************************/
- - (void) playSound:(NSString *)file {
- [(cmcd_fcb_crittersAppDelegate*)[[UIApplication sharedApplication] delegate] playSound:file];
- }
- - (void) playNarration:(NSString *)prefix forCard:(NSString *)index forType:(NSString *)type inLanguage:(NSString *) lang{
- [(cmcd_fcb_crittersAppDelegate*)[[UIApplication sharedApplication] delegate] playNarration:prefix forCard:index forType:type inLanguage:lang];
- }
- - (void) playFancyNarration:(NSString *)number forCount:(NSString *)count forType:(NSString *)type {
- NSLog(@"fancy!");
- BOOL twoParts = YES;
- NSArray *fcbExceptions = [NSArray arrayWithObjects:@"2", @"15", @"16", @"17", nil];
- if ([[cardSet objectForKey:@"language"] isEqualToString:@"ch"]) {
- twoParts = NO;
- }
- if (([[cardSet objectForKey:@"language"] isEqualToString:@"ch"]) && ([[cardSet objectForKey:@"prefix"] isEqualToString:@"fcb"]) && ([fcbExceptions containsObject:number])) {
- twoParts = NO;
- }
- if (twoParts) {
- self.myIndex = number;
- NSString *file = [NSString stringWithFormat:@"%@_%@_no", [cardSet objectForKey:@"prefix"], count];
- [(cmcd_fcb_crittersAppDelegate*)[[UIApplication sharedApplication] delegate] playVoiceover:file inLanguage:[cardSet objectForKey:@"language"]];
- narrationTimer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(playAnimal:) userInfo:type repeats: NO];
- } else {
- NSString *file = [NSString stringWithFormat:@"%@_%@_%@", [cardSet objectForKey:@"prefix"], number, count];
- [(cmcd_fcb_crittersAppDelegate*)[[UIApplication sharedApplication] delegate] playVoiceover:file inLanguage:[cardSet objectForKey:@"language"]];
- }
- }
- - (void) playAnimal:(NSTimer *) timer{
- NSString *type = timer.userInfo;
- NSLog(@"type: %@", type);
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:myIndex forType:type inLanguage:[cardSet objectForKey:@"language"]];
- }
- - (void) playSingleAnimal:(NSTimer *) timer{
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:myIndex forType:@"sa" inLanguage:[cardSet objectForKey:@"language"]];
- }
- - (void) playMultipleAnimal:(NSTimer *) timer{
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:myIndex forType:@"ma" inLanguage:[cardSet objectForKey:@"language"]];
- }
- /*****************
- * GAME PLAY
- *****************/
- - (void)tapDetectingImageView:(TapCard *)view gotSingleTapAtPoint:(CGPoint)tapPoint {
- NSLog(@"got single tap in the %@ region at %f", view.whichRegion, tapPoint.x);
- NSString *bottomIndex = [[bottomCards objectAtIndex:[self whichPage:cardBottom.contentOffset]] cardIndex];
- NSString *topIndex = [[topCards objectAtIndex:[self whichPage:cardTop.contentOffset]] cardIndex];
- //the top image, animal index
- int intIndex =[topIndex intValue]%tiles;
- if( intIndex==0){ intIndex=tiles;}
- NSString *animalIndex = [NSString stringWithFormat:@"%d", intIndex];
- self.myIndex = animalIndex;
- //the top image, animal number
- int intNumber =[topIndex intValue]%10;
- if( intNumber==0){ intNumber=10;}
- NSString *animalNumber = [NSString stringWithFormat:@"%d", intNumber];
- // topIndex = [NSString stringWithFormat:@"%d", intIndex];
- int intIndex2 =[bottomIndex intValue]%10;
- if( intIndex2==0){ intIndex2=10;}
- bottomIndex = [NSString stringWithFormat:@"%d", intIndex2];
- NSLog(@"intIndex = %d", intIndex);
- if (([view.whichRegion isEqualToString:@"t"])) {
- // chinese requires special positioning
- if([[cardSet objectForKey:@"language"] isEqualToString:@"ch"]) {
- centerBar.text = @"|";
- animalTextCH1.text = [[animalNames objectForKey:animalIndex] objectForKey:@"l"];
- animalTextCH2.text = [[animalNames objectForKey:animalIndex] objectForKey:@"r"];
- } else {
- if (intNumber==1) {
- animalText.text = [animalNames objectForKey:animalIndex];
- } else {
- animalText.text = [animalNames objectForKey:animalIndex];
- }
- }
- NSLog(@"animal index: %@, animal number:%@ ",animalIndex, animalNumber);
- //single/multiple animal(s)
- if (intNumber == 1) {
- [self playFancyNarration:animalIndex forCount:animalNumber forType:@"sa"];
- } else {
- [self playFancyNarration:animalIndex forCount:animalNumber forType:@"ma"];
- }
- } else if (([view.whichRegion isEqualToString:@"b"])) {
- largeText.text = [[numberNames objectForKey:bottomIndex] objectForKey:@"r"];
- smallText.text = [[numberNames objectForKey:bottomIndex] objectForKey:@"l"];
- if(([[cardSet objectForKey:@"language"] isEqualToString:@"es"]) || ([[cardSet objectForKey:@"language"] isEqualToString:@"fr"]))
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:bottomIndex forType:@"noun" inLanguage:[cardSet objectForKey:@"language"]];
- }
- else
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:bottomIndex forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- }
- }
- }
- - (void)tapDetectingImageView:(TapCard *)view gotDoubleTapAtPoint:(CGPoint)tapPoint {
- NSLog(@"got double tap in the %@ region", view.whichRegion);
- int tpage = [self whichPage:cardTop.contentOffset];
- int bpage = [self whichPage:cardBottom.contentOffset];
- CardViewController *tc = [topCards objectAtIndex:tpage];
- CardViewController *bc = [bottomCards objectAtIndex:bpage];
- // make sure the indexes match & that we haven't already matched this pair
- [self matchCards:tc.cardNumber otherIndex:bc.cardNumber cardIndex:tc.cardIndex];
- }
- -(int)whichPage:(CGPoint)point {
- /* We only use the top frame in Mix & Match mode */
- NSUInteger pageWidth;
- if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
- pageWidth = pageWidth_iPad;
- }
- else{
- pageWidth = pageWidth_iPhone;
- }
- int page = point.x / pageWidth;
- return page;
- }
- -(void)matchCards:(NSString *)topIndex otherIndex:(NSString *)bottomIndex cardIndex:(NSString *)index{
- UIColor *green = [UIColor colorWithRed:0.38 green:0.54 blue:0.38 alpha:1.0];
- UIColor *red = [UIColor colorWithRed:0.75 green:0.23 blue:0.23 alpha:1.0];
- if([matches containsObject:index]){
- cardTop.scrollEnabled = TRUE;
- }
- if (([topIndex isEqualToString:bottomIndex]&& (![matches containsObject:index]))) {
- [matches addObject:index];
- //[self showMatches];
- NSArray *successSounds = [NSArray arrayWithObjects:@"fca_uni_1", @"fca_uni_2", nil];
- int i = arc4random() % ([successSounds count]);
- NSLog(@"success: %d, index: %@", i, index);
- [self playSound:@"fca_uni_3"];
- [self playSound:[successSounds objectAtIndex:i]];
- cardTop.scrollEnabled = TRUE;
- topText.textColor = green;
- // UIColor *grey = [UIColor colorWithRed:0.52 green:0.52 blue:0.52 alpha:1.0];
- // instructionText.text = @"Swipe Image to Continue";
- // instructionText.textColor = grey;
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(displayInstruction:) userInfo:nil repeats: NO];
- }
- else{
- [self playSound:@"fca_uni_8"];
- topText.textColor = red;
- }
- }
- - (void) displayInstruction:(NSTimer *) timer{
- UIColor *grey = [UIColor colorWithRed:0.52 green:0.52 blue:0.52 alpha:1.0];
- topText.text = @"Swipe Image to Continue";
- topText.textColor = grey;
- }
- - (void)loadScrollView:(int)page withRegion:(NSString *)region{
- /* We only use the top frame in Mix & Match mode */
- NSUInteger pageWidth;
- NSUInteger topHeight;
- NSUInteger bottomHeight;
- if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
- pageWidth = pageWidth_iPad;
- topHeight =topHeight_iPad;
- bottomHeight =bottomHeight_iPad;
- }
- else{
- pageWidth = pageWidth_iPhone;
- topHeight =topHeight_iPhone;
- bottomHeight =bottomHeight_iPhone;
- }
- if (page < 0) return;
- if (page >= pages) return;
- int bn =[[bottomKeys objectAtIndex:page]intValue]%10;
- if( bn==0){ bn=10;}
- NSString *bottomNumber = [NSString stringWithFormat:@"%d", bn];
- int tn =[[topKeys objectAtIndex:page]intValue]%10;
- if( tn==0){ tn=10;}
- NSString *topNumber = [NSString stringWithFormat:@"%d", tn];
- // NSLog(@"loading page %d for region %@", page, region);
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- // NSLog(@"the key is: %d and number is %d",page,n);
- // NSString *number = [NSString stringWithFormat:@"%d", n];
- if ([region isEqualToString:@"t"])
- {
- CardViewController *tcvc = [topCards objectAtIndex:page];
- if ((NSNull *)tcvc == [NSNull null]) {
- tcvc = [[CardViewController alloc] initWithPageNumber3:page withRegion:@"t" withNumber:topNumber withCard:[topKeys objectAtIndex:page]];
- CGRect frame = cardTop.frame;
- frame.origin.x = frame.size.width * page;
- frame.origin.y = 0;
- TapCard *tapCard = [self createTapCard:[topKeys objectAtIndex:page] forRegion:region forNumber:topNumber withFrame:frame];
- [cardTop addSubview:tapCard];
- [tcvc.tapCards addObject:tapCard];
- [topCards replaceObjectAtIndex:page withObject:tcvc];
- [tcvc release];
- NSLog(@"the top key is: %@ and top number is %@",[topKeys objectAtIndex:page],topNumber);
- }
- }
- else if ([region isEqualToString:@"b"]){
- CardViewController *bcvc = [bottomCards objectAtIndex:page];
- if ((NSNull *)bcvc == [NSNull null]) {
- bcvc = [[CardViewController alloc] initWithPageNumber3:page withRegion:@"b" withNumber:bottomNumber withCard:[bottomKeys objectAtIndex:page]];
- CGFloat x = pageWidth * page;
- CGFloat y = 0;
- CGRect frame = CGRectMake(x, y, pageWidth, bottomHeight);
- TapCard *tapCard = [self createBandCard:[bottomKeys objectAtIndex:page] forRegion:region forNumber:bottomNumber withFrame:frame];
- if(page ==0)
- {
- largeText.text = [[numberNames objectForKey:bottomNumber] objectForKey:@"r"];
- smallText.text = [[numberNames objectForKey:bottomNumber] objectForKey:@"l"];
- }
- [cardBottom addSubview:tapCard];
- [bcvc.tapCards addObject:tapCard];
- [bottomCards replaceObjectAtIndex:page withObject:bcvc];
- [bcvc release];
- NSLog(@"the bottom key is: %@ and bottom number is %@",[bottomKeys objectAtIndex:page],bottomNumber);
- }
- }
- //NSLog(@"the top key is: %@ and top number is %@",[topKeys objectAtIndex:page],topNumber);
- //NSLog(@"the bottom key is: %@ and bottom number is %@",[bottomKeys objectAtIndex:page],bottomNumber);
- [pool release];
- }
- - (TapCard *) createTapCard:(NSString *)index forRegion:(NSString *)region forNumber:(NSString *)number withFrame:(CGRect)frame {
- NSString *docs = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
- int intIndex = [index intValue]%tiles;
- int intNumber = [index intValue]%10;
- if(intIndex == 0)
- {intIndex =tiles;}
- if(intNumber == 0)
- {intNumber =10;}
- NSString *animalIndex = [NSString stringWithFormat:@"%d",intIndex];
- NSString *numberIndex = [NSString stringWithFormat:@"%d",intNumber];
- UIImage *image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/%@_%@_art_%@.jpg", docs, [cardSet objectForKey:@"prefix"], [cardSet objectForKey:@"prefix"], animalIndex, number]];
- NSLog(@"%@/%@/%@_%@_art_%@.jpg", docs, [cardSet objectForKey:@"prefix"], [cardSet objectForKey:@"prefix"], animalIndex, number);
- TapCard *tapCard = [[TapCard alloc] initWithImage: image];
- tapCard.cardIndex = animalIndex;
- tapCard.cardNumber =number;
- tapCard.whichRegion =region;
- tapCard.frame = frame;
- tapCard.delegate = self;
- [tapCard autorelease];
- return tapCard;
- }
- - (TapCard *) createBandCard:(NSString *)index forRegion:(NSString *)region forNumber:(NSString *)number withFrame:(CGRect)frame {
- /*
- NSString *docs = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
- int pages;
- if([cardSet objectForKey:@"prefix"]==@"fca")
- {
- pages = pages20;
- }
- else if([cardSet objectForKey:@"prefix"]==@"fcb")
- {
- pages = pages30;
- }
- int intIndex = [index intValue]%pages;
- if(intIndex == 0)
- {intIndex =pages;}
- index = [NSString stringWithFormat:@"%d",intIndex];
- if([cardSet objectForKey:@"language"]==@"ch")
- {
- centerBar.text = @"|";
- animalTextCH1.text = [NSString stringWithFormat:@"", [[animalNames objectForKey:index] objectForKey:@"l"]];
- animalTextCH2.text = [NSString stringWithFormat:@"", [[animalNames objectForKey:index] objectForKey:@"r"]];
- }
- else{
- animalText.text = [NSString stringWithFormat:@"", [animalNames objectForKey:index]];
- }
- UIImage *image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/%@_%@_art_%@.jpg", docs, [cardSet objectForKey:@"prefix"], [cardSet objectForKey:@"prefix"], index, number]];
- //NSLog(@"%@/%@/%@_%@_art_%@.jpg", docs, [cardSet objectForKey:@"prefix"], [cardSet objectForKey:@"prefix"], index, number);
- TapCard *tapCard = [[TapCard alloc] initWithImage: image];
- tapCard.cardIndex = index;
- tapCard.cardNumber =number;
- tapCard.whichRegion =region;
- tapCard.frame = frame;
- tapCard.delegate = self;
- [tapCard autorelease];
- return tapCard;
- */
- int intIndex = [index intValue]%tiles;
- if(intIndex == 0)
- {intIndex =tiles;}
- index = [NSString stringWithFormat:@"%d",intIndex];
- //NSString *docs = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
- // UIImage *image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/%@_%@_art_%@.jpg", docs, [cardSet objectForKey:@"prefix"], [cardSet objectForKey:@"prefix"], index, number]];
- UIImage *image = [UIImage imageWithContentsOfFile:@""];
- largeText.text = [NSString stringWithFormat:@"", [[numberNames objectForKey:index] objectForKey:@"r"]];
- smallText.text = [NSString stringWithFormat:@"", [[numberNames objectForKey:index] objectForKey:@"l"]];
- NSLog(@"%@_%@_art_%@.jpg", [cardSet objectForKey:@"prefix"], index, number);
- TapCard *tapCard = [[TapCard alloc] initWithImage: image];
- tapCard.cardIndex = index;
- tapCard.cardNumber =number;
- tapCard.whichRegion =region;
- tapCard.frame = frame;
- tapCard.delegate = self;
- [tapCard autorelease];
- return tapCard;
- }
- - (void)unloadScrollView:(int)page withRegion:(NSString *)region{
- /* We only use the top frame in Mix & Match mode */
- NSUInteger pageWidth;
- NSUInteger topHeight;
- NSUInteger bottomHeight;;
- if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
- pageWidth = pageWidth_iPad;
- topHeight =topHeight_iPad;
- bottomHeight =bottomHeight_iPad;
- }
- else{
- pageWidth = pageWidth_iPhone;
- topHeight =topHeight_iPhone;
- bottomHeight =bottomHeight_iPhone;
- }
- if (page < 0) return;
- if (page >= pages) return;
- // NSLog(@"unloading page %d for region %@", page, region);
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- if ([region isEqualToString:@"t"]) {
- CardViewController *tcvc = [topCards objectAtIndex:page];
- if ((NSNull *)tcvc != [NSNull null]) {
- for (int i = 0; i < [tcvc.tapCards count]; i++) {
- [[tcvc.tapCards objectAtIndex:i] removeFromSuperview];
- }
- [topCards replaceObjectAtIndex:page withObject:[NSNull null]];
- }
- }
- else{
- CardViewController *bcvc = [bottomCards objectAtIndex:page];
- if ((NSNull *)bcvc != [NSNull null]) {
- for (int i = 0; i < [bcvc.tapCards count]; i++) {
- [[bcvc.tapCards objectAtIndex:i] removeFromSuperview];
- }
- [bottomCards replaceObjectAtIndex:page withObject:[NSNull null]];
- }
- }
- [pool release];
- }
- - (void) resetKeys {
- /* We only use the top frame in Mix & Match mode */
- topCards = [[NSMutableArray alloc] initWithCapacity:pages];
- bottomCards = [[NSMutableArray alloc] initWithCapacity:pages];
- for (int i = 0; i < pages; i++) {
- [topCards addObject:[NSNull null]];
- [bottomCards addObject:[NSNull null]];
- }
- topKeys = [[NSMutableArray alloc] initWithCapacity:pages];
- bottomKeys = [[NSMutableArray alloc] initWithCapacity:pages];
- for (int i = 0; i < pages-2; i++) {
- [topKeys addObject:[NSString stringWithFormat:@"%d", i+1]];
- [bottomKeys addObject:[NSString stringWithFormat:@"%d", i+1]];
- }
- //int b;
- int t;
- for(int i = 0; i < pages-2; i++ ) {
- //b=i;
- /*b = arc4random() % (numbers);
- if(b==0)
- {
- b=10;
- }
- */
- t = arc4random() % (pages-2);
- [topKeys exchangeObjectAtIndex:i withObjectAtIndex:t];
- //[bottomKeys exchangeObjectAtIndex:i withObjectAtIndex: b];
- }
- int b;
- //int t;
- for(int i = 0; i < pages-2; i++ ) {
- b=i;
- /*b = arc4random() % (numbers);
- if(b==0)
- {
- b=10;
- }
- */
- // t = arc4random() % (pages*numbers-2);
- //[topKeys exchangeObjectAtIndex:i withObjectAtIndex:t];
- [bottomKeys exchangeObjectAtIndex:i withObjectAtIndex: b];
- }
- [topKeys insertObject:[topKeys objectAtIndex:pages-3] atIndex:0];
- [topKeys addObject:[topKeys objectAtIndex:1]];
- [bottomKeys insertObject:[bottomKeys objectAtIndex:pages-3] atIndex:0];
- [bottomKeys addObject:[bottomKeys objectAtIndex:1]];
- // NSLog(@" top cards: %d, top keys: %@, bottom cards: %d, bottom keys: %@", [topCards count],[topKeys objectAtIndex:0],[bottomCards count],[bottomKeys objectAtIndex:0]);
- }
- - (void) resetPage {
- /* We only use the top frame in Mix & Match mode */
- NSUInteger topHeight;
- if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
- topHeight =topHeight_iPad;
- }
- else{
- topHeight =topHeight_iPhone;
- }
- CGRect tFrame = cardTop.frame;
- tFrame.origin.x = 0;
- tFrame.origin.y = 0;
- [cardTop scrollRectToVisible:tFrame animated:NO];
- CGRect bFrame = cardBottom.frame;
- bFrame.origin.x = 0;
- bFrame.origin.y = topHeight;
- [cardBottom scrollRectToVisible:bFrame animated:NO];
- }
- - (void)scrollViewDidScroll:(Scroller *)sender {
- // We don't want a "feedback loop" between the UIPageControl and the scroll delegate in
- // which a scroll event generated from the user hitting the page control triggers updates from
- // the delegate method. We use a boolean to disable the delegate logic when the page control is used.
- if (pageControlUsed) {
- // do nothing - the scroll was initiated from the page control, not the user dragging
- return;
- }
- // Switch the indicator when more than 50% of the previous/next page is visible
- CGFloat pageWidth = sender.frame.size.width;
- int page = floor((sender.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
- // load the visible page and the page on either side of it (to avoid flashes when the user starts scrolling)
- [self loadScrollView:page-1 withRegion:sender.region];
- [self loadScrollView:page withRegion:sender.region];
- [self loadScrollView:page+1 withRegion:sender.region];
- [self unloadScrollView:page+5 withRegion:sender.region];
- [self unloadScrollView:page-5 withRegion:sender.region];
- pageControl.currentPage = page;
- pageControl.region = sender.region;
- // A possible optimization would be to unload the views+controllers which are no longer visible
- }
- // At the begin of scroll dragging, reset the boolean used when scrolls originate from the UIPageControl
- - (void)scrollViewWillBeginDragging:(Scroller *)scrollView {
- NSLog(@"scrollViewWillBeginDragging");
- pageControlUsed = NO;
- pageControl.region = scrollView.region;
- // play the swoosh as the scroll starts
- [self playSound:@"fca_uni_3"];
- // clear out any animal names
- if ([scrollView.region isEqualToString:@"t"]) {
- animalText.text = nil;
- centerBar.text = nil;
- animalTextCH1.text = nil;
- animalTextCH1.text = nil;
- } else if ([scrollView.region isEqualToString:@"b"]){
- largeText.text = nil;
- smallText.text = nil;
- }
- }
- // At the end of scroll animation, reset the boolean used when scrolls originate from the UIPageControl
- - (void)scrollViewDidEndDecelerating:(Scroller *)scrollView {
- pageControl.region = scrollView.region;
- pageControlUsed = NO;
- /* We only use the top frame in Mix & Match mode */
- NSUInteger pageWidth;
- if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
- pageWidth = pageWidth_iPad;
- }
- else{
- pageWidth = pageWidth_iPhone;
- }
- CGRect frame = scrollView.frame;
- // if we meet one of the end points for the scroll loop, switch back to the matching picture
- if (scrollView.contentOffset.x == 0) {
- [scrollView scrollRectToVisible:CGRectMake((pages-2)*pageWidth,0,pageWidth,frame.size.height) animated:NO];
- } else if (scrollView.contentOffset.x == (pages-1)*pageWidth) {
- [scrollView scrollRectToVisible:CGRectMake(pageWidth,0,pageWidth,frame.size.height) animated:NO];
- }
- NSString *bottomIndex = [[bottomCards objectAtIndex:[self whichPage:cardBottom.contentOffset]] cardIndex];
- NSString *topIndex = [[topCards objectAtIndex:[self whichPage:cardTop.contentOffset]] cardIndex];
- topText.text = @"Double Tap Image to Confirm a Match";
- UIColor *grey = [UIColor colorWithRed:0.52 green:0.52 blue:0.52 alpha:1.0];
- topText.textColor = grey;
- if([matches containsObject:topIndex]){
- cardTop.scrollEnabled = TRUE;
- }
- else{
- cardTop.scrollEnabled = FALSE;
- }
- //the top image, animal index
- int intIndex =[topIndex intValue]%tiles;
- if( intIndex==0){ intIndex=tiles;}
- NSString *animalIndex = [NSString stringWithFormat:@"%d", intIndex];
- self.myIndex = animalIndex;
- //the top image, animal number
- int intNumber =[topIndex intValue]%10;
- if( intNumber==0){ intNumber=10;}
- NSString *animalNumber = [NSString stringWithFormat:@"%d", intNumber];
- // topIndex = [NSString stringWithFormat:@"%d", intIndex];
- int intIndex2 =[bottomIndex intValue]%10;
- if( intIndex2==0){ intIndex2=10;}
- bottomIndex = [NSString stringWithFormat:@"%d", intIndex2];
- NSLog(@"intIndex = %d", intIndex);
- /////////////////////////// need to consider chinese
- if ([scrollView.region isEqualToString:@"t"])
- {
- //single/multiple animal(s)
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"autoNarrate"]) {
- NSLog(@"animal index: %@, animal number:%@ ",animalIndex, animalNumber);
- if([[cardSet objectForKey:@"language"] isEqualToString:@"ch"])
- {
- centerBar.text = @"|";
- animalTextCH1.text = [[animalNames objectForKey:animalIndex] objectForKey:@"l"];
- animalTextCH2.text = [[animalNames objectForKey:animalIndex] objectForKey:@"r"];
- }
- else
- {
- animalText.text=nil;
- if(intNumber==1)
- {
- animalText.text = [animalNames objectForKey:animalIndex];
- }
- else
- {
- animalText.text = [animalNames objectForKey:animalIndex];
- }
- }
- if(intNumber==1)
- {
- // NSString *file = [NSString stringWithFormat:@"%@_1_no",[cardSet objectForKey:@"prefix"]];
- //[self playVoiceover:file inLanguage:[cardSet objectForKey:@"language"]];
- if([[cardSet objectForKey:@"language"] isEqualToString:@"en"])
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:@"1" forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(playSingleAnimal:) userInfo:nil repeats: NO];
- }
- else if([[cardSet objectForKey:@"language"] isEqualToString:@"es"])
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:@"1" forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(playSingleAnimal:) userInfo:nil repeats: NO];
- }
- else if([[cardSet objectForKey:@"language"] isEqualToString:@"fr"])
- {
- if(([[cardSet objectForKey:@"prefix"] isEqualToString:@"fcb"]) && (([animalIndex isEqualToString:@"2"])||([animalIndex isEqualToString:@"15"])||([animalIndex isEqualToString:@"16"])||([animalIndex isEqualToString:@"17"])))
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:animalIndex forType:@"1" inLanguage:[cardSet objectForKey:@"language"]];
- }
- else
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:@"1" forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(playSingleAnimal:) userInfo:nil repeats: NO];
- }
- }
- else if([[cardSet objectForKey:@"language"] isEqualToString:@"ch"])
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:animalIndex forType:@"1" inLanguage:[cardSet objectForKey:@"language"]];
- }
- }
- else
- {
- NSLog(@"animal index: %@, animal number:%@ ",animalIndex, animalNumber);
- if([[cardSet objectForKey:@"language"] isEqualToString:@"en"])
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:animalNumber forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(playMultipleAnimal:) userInfo:nil repeats: NO];
- }
- else if([[cardSet objectForKey:@"language"] isEqualToString:@"es"])
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:animalNumber forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(playMultipleAnimal:) userInfo:nil repeats: NO];
- }
- else if([[cardSet objectForKey:@"language"] isEqualToString:@"fr"])
- {
- if(([[cardSet objectForKey:@"prefix"] isEqualToString:@"fcb"]) && (([animalIndex isEqualToString:@"2"])||([animalIndex isEqualToString:@"15"])||([animalIndex isEqualToString:@"16"])||([animalIndex isEqualToString:@"17"])))
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:animalIndex forType:animalNumber inLanguage:[cardSet objectForKey:@"language"]];
- }
- else
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:animalNumber forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(playMultipleAnimal:) userInfo:nil repeats: NO];
- }
- }
- else if([[cardSet objectForKey:@"language"] isEqualToString:@"ch"])
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:animalIndex forType:animalNumber inLanguage:[cardSet objectForKey:@"language"]];
- }
- }
- }
- }
- else if ([scrollView.region isEqualToString:@"b"])
- {
- largeText.text = [[numberNames objectForKey:bottomIndex] objectForKey:@"r"];
- smallText.text = [[numberNames objectForKey:bottomIndex] objectForKey:@"l"];
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"autoNarrate"]) {
- NSLog(@"the text for bottomIndex: %@, %@, %@",largeText.text,smallText.text, bottomIndex);
- if(([[cardSet objectForKey:@"language"] isEqualToString:@"es"]) || ([[cardSet objectForKey:@"language"] isEqualToString:@"fr"]))
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:bottomIndex forType:@"noun" inLanguage:[cardSet objectForKey:@"language"]];
- }
- else
- {
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:bottomIndex forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- }
- }
- }
- /*
- // shared data for autonarrate and automatch
- NSString *lang = [cardSet objectForKey:@"language"];
- NSString *bottomIndex = [[bottomCards objectAtIndex:[self whichPage:cardBottom.contentOffset]] cardNumber];
- NSString *topIndex = [[topCards objectAtIndex:[self whichPage:cardTop.contentOffset]] cardNumber];
- NSString *index = [[topCards objectAtIndex:[self whichPage:cardTop.contentOffset]] cardIndex];
- NSLog(@"index:%@", index);
- if([matches containsObject:index]){
- cardTop.scrollEnabled = TRUE;
- }
- else{
- cardTop.scrollEnabled = FALSE;
- }
- // if autonarrate is on, speak the selected animal's name
- // TODO: Refactor this into a method
- // NSDictionary *names = [self.cardNames objectForKey:lang];
- if ([scrollView.region isEqualToString:@"t"]){
- if([cardSet objectForKey:@"language"]==@"ch"){
- centerBar.text = @"|";
- animalTextCH1.text = [[animalNames objectForKey:topIndex] objectForKey:@"l"];
- animalTextCH2.text = [[animalNames objectForKey:topIndex] objectForKey:@"r"];
- }
- else{
- int intIndex2= [index intValue];
- intIndex2 = intIndex2%pages;
- index= [NSString stringWithFormat:@"%d",intIndex2];
- //animalText.text = [animalNames objectForKey:topIndex];
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"autoNarrate"]) {
- int intIndex = [topIndex intValue];
- if(intIndex%10==1){
- NSLog(@"index: %@",topIndex);
- if(([cardSet objectForKey:@"language"]==@"es") || ([cardSet objectForKey:@"language"]==@"fr")){
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:@"1" forType:@"noun" inLanguage:[cardSet objectForKey:@"language"]];
- }
- else{
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:@"1" forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- }
- self.myIndex = index;
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(playSingleAnimal:) userInfo:nil repeats: NO];
- //[self playSecondNarration:[cardSet objectForKey:@"prefix"] forCard:index forType:@"sa" inLanguage:[cardSet objectForKey:@"language"] withTimer:timer];
- }
- else{
- intIndex = intIndex%10;
- if(intIndex==0)
- {intIndex=10;}
- NSString *stringIdex = [NSString stringWithFormat:@"%d", intIndex];
- NSLog(@"index: %@",index);
- if(([cardSet objectForKey:@"language"]==@"es") || ([cardSet objectForKey:@"language"]==@"fr")){
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:stringIdex forType:@"noun" inLanguage:[cardSet objectForKey:@"language"]];
- }
- else{
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:stringIdex forType:@"no" inLanguage:[cardSet objectForKey:@"language"]];
- }
- self.myIndex = index;
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(playMultipleAnimal:) userInfo:nil repeats: NO];
- // [self playSecondNarration:[cardSet objectForKey:@"prefix"] forCard:index forType:@"ma" inLanguage:[cardSet objectForKey:@"language"] withTimer:timer];
- }
- }
- }
- }
- else if ([scrollView.region isEqualToString:@"b"]){
- NSLog(@"autoNarrate is on");
- largeText.text = [[numberNames objectForKey:bottomIndex] objectForKey:@"r"];
- smallText.text = [[numberNames objectForKey:bottomIndex] objectForKey:@"l"];
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"autoNarrate"]) {
- if(([cardSet objectForKey:@"language"]==@"es") || ([cardSet objectForKey:@"language"]==@"fr")){
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:bottomIndex forType:@"noun" inLanguage:lang];
- }else{
- [self playNarration:[cardSet objectForKey:@"prefix"] forCard:bottomIndex forType:@"no" inLanguage:lang];
- }
- }
- }
- */
- // if automatch is on, show if we're now matched
- //if ([[NSUserDefaults standardUserDefaults] boolForKey:@"autoMatch"]) {
- // [self matchCards:topIndex otherIndex:bottomIndex];
- // }
- }
- - (IBAction)changePage:(id)sender {
- NSLog(@"changePage");
- int page = pageControl.currentPage;
- // load the visible page and the page on either side of it (to avoid flashes when the user starts scrolling)
- // [self loadScrollView:page-1 withRegion:pageControl.region];
- // [self loadScrollView:page withRegion:pageControl.region];
- // [self loadScrollView:page+1 withRegion:pageControl.region];
- Scroller *card;
- if ([pageControl.region isEqualToString:@"t"]) {
- card = cardTop;
- } else {
- card = cardBottom;
- }
- // update the scroll view to the appropriate page
- CGRect frame = card.frame;
- frame.origin.x = frame.size.width * page;
- frame.origin.y = 0;
- [card scrollRectToVisible:frame animated:YES];
- // Set the boolean used when scrolls originate from the UIPageControl. See scrollViewDidScroll: above.
- pageControlUsed = YES;
- [card release];
- }
- /*********************
- * BORING DELEGATE STUFF
- *********************/
- - (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag {
- }
- - (void)audioPlayerDecodeErrorDidOccur:(AVAudioPlayer *)player error:(NSError *)error {
- }
- -(BOOL)canBecomeFirstResponder {
- return YES;
- }
- -(void)viewDidAppear:(BOOL)animated {
- [self becomeFirstResponder];
- // largeText.delegate=self;
- // smallText.delegate=self;
- //[self showAlert];
- }
- - (void)settingsViewControllerDidFinish:(SettingsViewController *)controller{
- [self dismissModalViewControllerAnimated:YES];
- }
- - (void)didReceiveMemoryWarning {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
- // Release any cached data, images, etc. that aren't in use.
- }
- - (void)viewDidUnload {
- [super viewDidUnload];
- //largeText.delegate=self;
- // smallText.delegate=self;
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
- }
- - (void)dealloc {
- [super dealloc];
- [animalNames release];
- [animalText release];
- [animalTextCH1 release];
- [animalTextCH2 release];
- [bottomCards release];
- [bottomKeys release];
- [cardBottom release];
- [cardSet release];
- [cardTop release];
- [centerBar release];
- [home release];
- [largeText release];
- [narrationTimer release];
- [numberNames release];
- [smallText release];
- [topCards release];
- [topKeys release];
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement