Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added HeadsUpper/.DS_Store
Binary file not shown.
23 changes: 23 additions & 0 deletions HeadsUpper/CategoriesTableViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// CategoriesTableViewController.h
// HeadsUpper
//
// Created by Jamaal Sedayao on 2/21/16.
// Copyright © 2016 Michael Kavouras. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CategoriesTableViewController : UITableViewController

@property (nonatomic) NSDictionary * categories;
@property (nonatomic) NSArray * categoryArray;
@property (nonatomic) NSArray * superstarsArray;
@property (nonatomic) NSArray * musicArray;
@property (nonatomic) NSArray * iconsArray;
@property (nonatomic) NSArray * animalsArray;
@property (nonatomic) NSArray * ninetiesArray;
@property (nonatomic) NSArray * c4qStudentsArray;
@property (nonatomic) NSDictionary * superstarsDict;

@end
141 changes: 141 additions & 0 deletions HeadsUpper/CategoriesTableViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
//
// CategoriesTableViewController.m
// HeadsUpper
//
// Created by Jamaal Sedayao on 2/21/16.
// Copyright © 2016 Michael Kavouras. All rights reserved.
//

#import "CategoriesTableViewController.h"
#import "GameplayViewController.h"
#import "CustomTableViewCell.h"

@interface CategoriesTableViewController ()

@end

@implementation CategoriesTableViewController

- (void)viewDidLoad {
[super viewDidLoad];

[self.tableView registerClass:[CustomTableViewCell class] forCellReuseIdentifier:@"customCellIdentifier"];


[self initializeData];

self.navigationController.navigationBar.topItem.title = @"Choose A Category, buddy!";
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.categoryArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
// UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"categoriesIdentifier" forIndexPath:indexPath];

CustomTableViewCell *customCell = [self.tableView dequeueReusableCellWithIdentifier:@"customCellIdentifier"];

customCell = [[[NSBundle mainBundle]loadNibNamed:@"CustomTableViewCell" owner:self options:nil]objectAtIndex:0];

customCell.customLabel.text = self.categoryArray[indexPath.row];


return customCell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

[self performSegueWithIdentifier:@"segueToGameplay" sender:self];

}

#pragma mark - Navigation


- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].

NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
GameplayViewController *destinationViewController = [segue destinationViewController];
destinationViewController.categoryPlayed = self.categoryArray[indexPath.row];


NSString *key = self.categoryArray[indexPath.row];
destinationViewController.categoryArray = [self.categories valueForKey:key];

// destinationViewController.categoryPlayed = self.categoryArray


// Pass the selected object to the new view controller.
}


//Data

- (void)initializeData {

self.superstarsArray = @[@"Janet Jackson", @"Leighton Meester", @"Willow Smith", @"Matt Lauer", @"Josh Duhamel", @"Sharon Osbourne", @"Spencer Pratt", @"Demi Moore", @"Whitney Houston", @"Nicole Kidman", @"Miley Cyrus", @"Victoria Beckham", @"LeAnn Rimes", @"Dakota Fanning", @"Dr. Seuss", @"Ryan Phillippe", @"Steve Carell", @"Chris Rock", @"Drake", @"Rachel McAdams", @"Maya Rudolph"];
self.ninetiesArray = @[@"El Niño", @"Viagra", @"Animaniacs", @"League of their Own", @"Happy Gilmore", @"Nick Carter", @"My Heart Will Go On", @"I Know What You Did Last Summer", @"Can You Feel The Love Tonight", @"The Macarana", @"Light-up Sneakers", @"Boy Meets World", @"Baby Got Back", @"Smells Like Teen Spirit", @"Super Soakers", @"7th Heaven", @"Garth Brooks", @"Floppy Discs", @"Kramer", @"Blink 182", @"Surge"];
self.musicArray = @[@"\"Girl On Fire\" Alicia Keys", @"\"U Can't Touch This\" MC Hammer", @"\"Hello\" Lionel Richie", @"\"Dark Horse\" Katy Perry", @"\"Somebody To Love\" Queen", @"\"No Scrubs\" TLC", @"\"Happy\" Pharrell Williams", @"\"Piano Man\" Billy Joel", @"\"Blurred Lines\" Robin Thicke", @"\"Fantasy\" Mariah Carey", @"\"I Will Survive\" Gloria Gaynor", @"\"Come and Get it\" Selena Gomez", @"\"Halo\" Beyonce", @"\"I Believe I Can Fly\" R.Kelly", @"\"The Sign\" Ace of Base", @"\"Diamonds\" Rihanna", @"\"A Thousand Miles\" Vanessa Carlton", @"\"What a Wonderful World\" Louis Armstrong", @"\"We Belong Together\" Mariah Carey", @"\"(I Can't Get No) Satisfaction\""];
self.iconsArray = @[@"Mozart", @"Billy Joel", @"Judy Garland", @"Napoleon Bonaparte", @"Queen Elizabeth II", @"Fred Armisen", @"Henry Ford", @"Jon Lovitz", @"Julia Child", @"Catherine the Great", @"Magic Johnson", @"Uma Thurman", @"Orson Welles", @"Kathy Bates", @"George Orwell", @"Billy Crystal", @"Farrah Fawcett", @"Gary Busey", @"Chris Farley", @"Tom Selleck", @"Alexander the Great"];
self.animalsArray = @[@"Chipmunk", @"Dragon", @"Wasp", @"Snake", @"Jellyfish", @"Emu", @"Boar", @"Crocodile", @"Shrimp", @"Lemur", @"Caterpillar", @"Sea Urchain", @"Dolphin ", @"Camel", @"Viper", @"Fox", @"Tuna", @"Baboon", @"Chinchilla", @"Human", @"Crawfish", @"Cricket", @"Frog", @"Tiger", @"Guinea Pig", @"Gnat", @"Killer Whale", @"Coral", @"T-Rex", @"Oyster"];
self.c4qStudentsArray = @[@"Artur Lan",
@"Ayuna Vogel",
@"Bereket Ghebremedhin",
@"Brian Blanco",
@"Charles H Kang",
@"Chris David",
@"Christella Dolmo",
@"Christian Maldonado",
@"Daaaaaammmmmmnnnnn Daniel",
@"Derek Netto",
@"Diana Elezaj",
@"Elber Carneiro",
@"Eric Sanchez",
@"Eric Sze",
@"Felicia Weathers",
@"Henna Ahmed",
@"Jackie Meggesto",
@"Jamaal Sedayao",
@"Jason Wang",
@"Jovanny Espinal",
@"Justine Gartner",
@"Kaira Villanueva",
@"Kaisha Jones",
@"Krishna Picart",
@"Lauren Caponong",
@"Mesfin Bekele Mekonnen",
@"Natalia Estrella",
@"Shena Yoshida",
@"Umar Mahmud",
@"Varindra Hart",
@"Xiulan Shi",
@"Zoufishan Mehdi"];

//self.superstarsDict = @{@"Superstars":self.superstarsArray};

self.categories = @{@"Superstars":self.superstarsArray,
@"That's So 90's!":self.ninetiesArray,
@"Hey Mr. DJ!":self.musicArray,
@"Icons":self.iconsArray,
@"Crazy Animals!":self.animalsArray,
@"C4Q Students":self.c4qStudentsArray};


self.categoryArray = [self.categories allKeys];

}

@end
53 changes: 47 additions & 6 deletions HeadsUpper/HeadsUpper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,51 @@
/* Begin PBXBuildFile section */
8D89695C1C755D0200D32E8A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D89695B1C755D0200D32E8A /* main.m */; };
8D89695F1C755D0200D32E8A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D89695E1C755D0200D32E8A /* AppDelegate.m */; };
8D8969621C755D0200D32E8A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D8969611C755D0200D32E8A /* ViewController.m */; };
8D8969651C755D0200D32E8A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D8969631C755D0200D32E8A /* Main.storyboard */; };
8D8969671C755D0200D32E8A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8D8969661C755D0200D32E8A /* Assets.xcassets */; };
8D89696A1C755D0200D32E8A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D8969681C755D0200D32E8A /* LaunchScreen.storyboard */; };
9A8586781C7A0F4500DA7BC0 /* CategoriesTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8586771C7A0F4500DA7BC0 /* CategoriesTableViewController.m */; };
9A85867B1C7A15B000DA7BC0 /* GameplayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A85867A1C7A15B000DA7BC0 /* GameplayViewController.m */; };
9A85867E1C7A2E0200DA7BC0 /* GameSummaryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A85867D1C7A2E0200DA7BC0 /* GameSummaryViewController.m */; };
9A8586821C7A54A600DA7BC0 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A8586811C7A54A600DA7BC0 /* AVFoundation.framework */; };
9A8586861C7A59EA00DA7BC0 /* RightAnswer.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 9A8586851C7A59EA00DA7BC0 /* RightAnswer.m4a */; };
9A8586881C7A5A0600DA7BC0 /* DamnDaniel.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 9A8586871C7A5A0600DA7BC0 /* DamnDaniel.m4a */; };
9A85868A1C7A62BA00DA7BC0 /* Boop.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 9A8586891C7A62BA00DA7BC0 /* Boop.m4a */; };
9A85868E1C7A64CA00DA7BC0 /* CustomTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A85868C1C7A64CA00DA7BC0 /* CustomTableViewCell.m */; };
9A85868F1C7A64CA00DA7BC0 /* CustomTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A85868D1C7A64CA00DA7BC0 /* CustomTableViewCell.xib */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
8D8969571C755D0200D32E8A /* HeadsUpper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HeadsUpper.app; sourceTree = BUILT_PRODUCTS_DIR; };
8D89695B1C755D0200D32E8A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8D89695D1C755D0200D32E8A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
8D89695E1C755D0200D32E8A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
8D8969601C755D0200D32E8A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
8D8969611C755D0200D32E8A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
8D8969641C755D0200D32E8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
8D8969661C755D0200D32E8A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8D8969691C755D0200D32E8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
8D89696B1C755D0200D32E8A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9A8586761C7A0F4500DA7BC0 /* CategoriesTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CategoriesTableViewController.h; path = ../CategoriesTableViewController.h; sourceTree = "<group>"; };
9A8586771C7A0F4500DA7BC0 /* CategoriesTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CategoriesTableViewController.m; path = ../CategoriesTableViewController.m; sourceTree = "<group>"; };
9A8586791C7A15B000DA7BC0 /* GameplayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameplayViewController.h; sourceTree = "<group>"; };
9A85867A1C7A15B000DA7BC0 /* GameplayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameplayViewController.m; sourceTree = "<group>"; };
9A85867C1C7A2E0200DA7BC0 /* GameSummaryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameSummaryViewController.h; sourceTree = "<group>"; };
9A85867D1C7A2E0200DA7BC0 /* GameSummaryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameSummaryViewController.m; sourceTree = "<group>"; };
9A85867F1C7A542800DA7BC0 /* AVKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
9A8586811C7A54A600DA7BC0 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
9A8586851C7A59EA00DA7BC0 /* RightAnswer.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = RightAnswer.m4a; sourceTree = "<group>"; };
9A8586871C7A5A0600DA7BC0 /* DamnDaniel.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = DamnDaniel.m4a; sourceTree = "<group>"; };
9A8586891C7A62BA00DA7BC0 /* Boop.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = Boop.m4a; sourceTree = "<group>"; };
9A85868B1C7A64CA00DA7BC0 /* CustomTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomTableViewCell.h; sourceTree = "<group>"; };
9A85868C1C7A64CA00DA7BC0 /* CustomTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomTableViewCell.m; sourceTree = "<group>"; };
9A85868D1C7A64CA00DA7BC0 /* CustomTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CustomTableViewCell.xib; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
8D8969541C755D0200D32E8A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9A8586821C7A54A600DA7BC0 /* AVFoundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -42,6 +63,8 @@
8D89694E1C755D0200D32E8A = {
isa = PBXGroup;
children = (
9A8586811C7A54A600DA7BC0 /* AVFoundation.framework */,
9A85867F1C7A542800DA7BC0 /* AVKit.framework */,
8D8969591C755D0200D32E8A /* HeadsUpper */,
8D8969581C755D0200D32E8A /* Products */,
);
Expand All @@ -60,9 +83,19 @@
children = (
8D89695D1C755D0200D32E8A /* AppDelegate.h */,
8D89695E1C755D0200D32E8A /* AppDelegate.m */,
8D8969601C755D0200D32E8A /* ViewController.h */,
8D8969611C755D0200D32E8A /* ViewController.m */,
9A8586761C7A0F4500DA7BC0 /* CategoriesTableViewController.h */,
9A8586771C7A0F4500DA7BC0 /* CategoriesTableViewController.m */,
9A8586791C7A15B000DA7BC0 /* GameplayViewController.h */,
9A85867A1C7A15B000DA7BC0 /* GameplayViewController.m */,
9A85868B1C7A64CA00DA7BC0 /* CustomTableViewCell.h */,
9A85868C1C7A64CA00DA7BC0 /* CustomTableViewCell.m */,
9A85868D1C7A64CA00DA7BC0 /* CustomTableViewCell.xib */,
9A85867C1C7A2E0200DA7BC0 /* GameSummaryViewController.h */,
9A85867D1C7A2E0200DA7BC0 /* GameSummaryViewController.m */,
8D8969631C755D0200D32E8A /* Main.storyboard */,
9A8586851C7A59EA00DA7BC0 /* RightAnswer.m4a */,
9A8586871C7A5A0600DA7BC0 /* DamnDaniel.m4a */,
9A8586891C7A62BA00DA7BC0 /* Boop.m4a */,
8D8969661C755D0200D32E8A /* Assets.xcassets */,
8D8969681C755D0200D32E8A /* LaunchScreen.storyboard */,
8D89696B1C755D0200D32E8A /* Info.plist */,
Expand Down Expand Up @@ -137,7 +170,11 @@
buildActionMask = 2147483647;
files = (
8D89696A1C755D0200D32E8A /* LaunchScreen.storyboard in Resources */,
9A85868F1C7A64CA00DA7BC0 /* CustomTableViewCell.xib in Resources */,
8D8969671C755D0200D32E8A /* Assets.xcassets in Resources */,
9A85868A1C7A62BA00DA7BC0 /* Boop.m4a in Resources */,
9A8586861C7A59EA00DA7BC0 /* RightAnswer.m4a in Resources */,
9A8586881C7A5A0600DA7BC0 /* DamnDaniel.m4a in Resources */,
8D8969651C755D0200D32E8A /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -149,9 +186,12 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D8969621C755D0200D32E8A /* ViewController.m in Sources */,
8D89695F1C755D0200D32E8A /* AppDelegate.m in Sources */,
9A85867E1C7A2E0200DA7BC0 /* GameSummaryViewController.m in Sources */,
9A85868E1C7A64CA00DA7BC0 /* CustomTableViewCell.m in Sources */,
8D89695C1C755D0200D32E8A /* main.m in Sources */,
9A85867B1C7A15B000DA7BC0 /* GameplayViewController.m in Sources */,
9A8586781C7A0F4500DA7BC0 /* CategoriesTableViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -300,6 +340,7 @@
8D8969701C755D0200D32E8A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
Binary file added HeadsUpper/HeadsUpper/.DS_Store
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions HeadsUpper/HeadsUpper/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading