diff --git a/TitleSelection.xcodeproj/project.pbxproj b/TitleSelection.xcodeproj/project.pbxproj index 80773a2..09bda8a 100644 --- a/TitleSelection.xcodeproj/project.pbxproj +++ b/TitleSelection.xcodeproj/project.pbxproj @@ -12,7 +12,6 @@ 7150972519A924FA00E6AE2A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7150972419A924FA00E6AE2A /* Images.xcassets */; }; 7150973119A924FA00E6AE2A /* TitleSelectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7150973019A924FA00E6AE2A /* TitleSelectionTests.m */; }; 7150973C19A9250F00E6AE2A /* TitleSelectorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7150973B19A9250F00E6AE2A /* TitleSelectorViewController.m */; }; - 7150973F19A925DA00E6AE2A /* TitleTableViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 7150973E19A925DA00E6AE2A /* TitleTableViewDataSource.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -37,8 +36,6 @@ 7150973019A924FA00E6AE2A /* TitleSelectionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TitleSelectionTests.m; sourceTree = ""; }; 7150973A19A9250F00E6AE2A /* TitleSelectorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TitleSelectorViewController.h; sourceTree = ""; }; 7150973B19A9250F00E6AE2A /* TitleSelectorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TitleSelectorViewController.m; sourceTree = ""; }; - 7150973D19A925DA00E6AE2A /* TitleTableViewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TitleTableViewDataSource.h; sourceTree = ""; }; - 7150973E19A925DA00E6AE2A /* TitleTableViewDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TitleTableViewDataSource.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -84,8 +81,6 @@ 7150972219A924FA00E6AE2A /* AppDelegate.m */, 7150973A19A9250F00E6AE2A /* TitleSelectorViewController.h */, 7150973B19A9250F00E6AE2A /* TitleSelectorViewController.m */, - 7150973D19A925DA00E6AE2A /* TitleTableViewDataSource.h */, - 7150973E19A925DA00E6AE2A /* TitleTableViewDataSource.m */, 7150972419A924FA00E6AE2A /* Images.xcassets */, 7150971D19A924FA00E6AE2A /* Supporting Files */, ); @@ -216,7 +211,6 @@ buildActionMask = 2147483647; files = ( 7150973C19A9250F00E6AE2A /* TitleSelectorViewController.m in Sources */, - 7150973F19A925DA00E6AE2A /* TitleTableViewDataSource.m in Sources */, 7150972319A924FA00E6AE2A /* AppDelegate.m in Sources */, 7150972019A924FA00E6AE2A /* main.m in Sources */, ); @@ -392,6 +386,7 @@ 7150973619A924FA00E6AE2A /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 7150973719A924FA00E6AE2A /* Build configuration list for PBXNativeTarget "TitleSelectionTests" */ = { isa = XCConfigurationList; @@ -400,6 +395,7 @@ 7150973919A924FA00E6AE2A /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/TitleSelection.xcodeproj/project.xcworkspace/xcshareddata/TitleSelection.xccheckout b/TitleSelection.xcodeproj/project.xcworkspace/xcshareddata/TitleSelection.xccheckout new file mode 100644 index 0000000..cd4ea18 --- /dev/null +++ b/TitleSelection.xcodeproj/project.xcworkspace/xcshareddata/TitleSelection.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 8AEB2546-885A-4AFD-B437-3D48923BC887 + IDESourceControlProjectName + TitleSelection + IDESourceControlProjectOriginsDictionary + + 38108751D4C920E9E37882B50C02936471110EC6 + https://github.com/DevMountain/TitleSelection-Objc + + IDESourceControlProjectPath + TitleSelection.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + 38108751D4C920E9E37882B50C02936471110EC6 + ../.. + + IDESourceControlProjectURL + https://github.com/DevMountain/TitleSelection-Objc + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + 38108751D4C920E9E37882B50C02936471110EC6 + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 38108751D4C920E9E37882B50C02936471110EC6 + IDESourceControlWCCName + TitleSelection-Objc + + + + diff --git a/TitleSelection.xcodeproj/project.xcworkspace/xcuserdata/chasewasden.xcuserdatad/UserInterfaceState.xcuserstate b/TitleSelection.xcodeproj/project.xcworkspace/xcuserdata/chasewasden.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..6afcafb Binary files /dev/null and b/TitleSelection.xcodeproj/project.xcworkspace/xcuserdata/chasewasden.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TitleSelection.xcodeproj/xcuserdata/chasewasden.xcuserdatad/xcschemes/TitleSelection.xcscheme b/TitleSelection.xcodeproj/xcuserdata/chasewasden.xcuserdatad/xcschemes/TitleSelection.xcscheme new file mode 100644 index 0000000..dd4af5b --- /dev/null +++ b/TitleSelection.xcodeproj/xcuserdata/chasewasden.xcuserdatad/xcschemes/TitleSelection.xcscheme @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TitleSelection.xcodeproj/xcuserdata/chasewasden.xcuserdatad/xcschemes/xcschememanagement.plist b/TitleSelection.xcodeproj/xcuserdata/chasewasden.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..230478c --- /dev/null +++ b/TitleSelection.xcodeproj/xcuserdata/chasewasden.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,27 @@ + + + + + SchemeUserState + + TitleSelection.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 7150971919A924FA00E6AE2A + + primary + + + 7150972919A924FA00E6AE2A + + primary + + + + + diff --git a/TitleSelection/TitleSelectorViewController.m b/TitleSelection/TitleSelectorViewController.m index d754590..5cabab6 100644 --- a/TitleSelection/TitleSelectorViewController.m +++ b/TitleSelection/TitleSelectorViewController.m @@ -7,12 +7,10 @@ // #import "TitleSelectorViewController.h" -#import "TitleTableViewDataSource.h" -@interface TitleSelectorViewController () +@interface TitleSelectorViewController () @property (nonatomic, strong) UITableView *tableView; -@property (nonatomic, strong) TitleTableViewDataSource *dataSource; @end @@ -21,12 +19,27 @@ @implementation TitleSelectorViewController - (void)viewDidLoad { [super viewDidLoad]; - self.dataSource = [TitleTableViewDataSource new]; - self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; - self.tableView.dataSource = self.dataSource; + self.tableView.dataSource = self; [self.view addSubview:self.tableView]; - } +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [self titles].count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; + if (!cell) { + cell = [UITableViewCell new]; + } + cell.textLabel.text = [self titles][indexPath.row]; + return cell; +} + +- (NSArray *)titles { + return @[@"The Constant Gardener", @"How the West Was Fun", @"Every Which Way But Loose", @"Riding In Cars With Boys", @"It Happened One Night", @"Firday After Next", @"Herbie: Fully Loaded", @"The Owls of GaHoole", @"Surfer Dude", @"The Day After Tomorrow", @"John Carter", @"Octopussy", @"Face Off", @"I Still Know What You Did Last Summer", @"Gigli"]; +} + + @end diff --git a/TitleSelection/TitleTableViewDataSource.h b/TitleSelection/TitleTableViewDataSource.h deleted file mode 100644 index 32d79ed..0000000 --- a/TitleSelection/TitleTableViewDataSource.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// TitleTableViewDataSource.h -// TitleSelection -// -// Created by Joshua Howland on 8/23/14. -// Copyright (c) 2014 DevMountain. All rights reserved. -// - -#import -#import - -@interface TitleTableViewDataSource : NSObject - -- (NSString *)titleAtIndexPath:(NSIndexPath *)path; - -@end diff --git a/TitleSelection/TitleTableViewDataSource.m b/TitleSelection/TitleTableViewDataSource.m deleted file mode 100644 index 85850b3..0000000 --- a/TitleSelection/TitleTableViewDataSource.m +++ /dev/null @@ -1,38 +0,0 @@ -// -// TitleTableViewDataSource.m -// TitleSelection -// -// Created by Joshua Howland on 8/23/14. -// Copyright (c) 2014 DevMountain. All rights reserved. -// - -#import "TitleTableViewDataSource.h" - -@implementation TitleTableViewDataSource - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return [self titles].count; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; - if (!cell) { - cell = [UITableViewCell new]; - } - cell.textLabel.text = [self titles][indexPath.row]; - return cell; -} - -- (NSArray *)titles { - return @[@"The Constant Gardener", @"How the West Was Fun", @"Every Which Way But Loose", @"Riding In Cars With Boys", @"It Happened One Night", @"Firday After Next", @"Herbie: Fully Loaded", @"The Owls of GaHoole", @"Surfer Dude", @"The Day After Tomorrow", @"John Carter", @"Octopussy", @"Face Off", @"I Still Know What You Did Last Summer", @"Gigli"]; -} - -- (NSString *)titleAtIndexPath:(NSIndexPath *)path { - if (path.row < [self titles].count) { - return [self titles][path.row]; - } else { - return nil; - } -} - -@end