Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combined datasource and uiviewcontroller (sorry Josh) #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
8 changes: 2 additions & 6 deletions TitleSelection.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -37,8 +36,6 @@
7150973019A924FA00E6AE2A /* TitleSelectionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TitleSelectionTests.m; sourceTree = "<group>"; };
7150973A19A9250F00E6AE2A /* TitleSelectorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TitleSelectorViewController.h; sourceTree = "<group>"; };
7150973B19A9250F00E6AE2A /* TitleSelectorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TitleSelectorViewController.m; sourceTree = "<group>"; };
7150973D19A925DA00E6AE2A /* TitleTableViewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TitleTableViewDataSource.h; sourceTree = "<group>"; };
7150973E19A925DA00E6AE2A /* TitleTableViewDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TitleTableViewDataSource.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -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 */,
);
Expand Down Expand Up @@ -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 */,
);
Expand Down Expand Up @@ -392,6 +386,7 @@
7150973619A924FA00E6AE2A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7150973719A924FA00E6AE2A /* Build configuration list for PBXNativeTarget "TitleSelectionTests" */ = {
isa = XCConfigurationList;
Expand All @@ -400,6 +395,7 @@
7150973919A924FA00E6AE2A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>8AEB2546-885A-4AFD-B437-3D48923BC887</string>
<key>IDESourceControlProjectName</key>
<string>TitleSelection</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>38108751D4C920E9E37882B50C02936471110EC6</key>
<string>https://github.com/DevMountain/TitleSelection-Objc</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>TitleSelection.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>38108751D4C920E9E37882B50C02936471110EC6</key>
<string>../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/DevMountain/TitleSelection-Objc</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>38108751D4C920E9E37882B50C02936471110EC6</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>38108751D4C920E9E37882B50C02936471110EC6</string>
<key>IDESourceControlWCCName</key>
<string>TitleSelection-Objc</string>
</dict>
</array>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7150971919A924FA00E6AE2A"
BuildableName = "TitleSelection.app"
BlueprintName = "TitleSelection"
ReferencedContainer = "container:TitleSelection.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7150972919A924FA00E6AE2A"
BuildableName = "TitleSelectionTests.xctest"
BlueprintName = "TitleSelectionTests"
ReferencedContainer = "container:TitleSelection.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7150972919A924FA00E6AE2A"
BuildableName = "TitleSelectionTests.xctest"
BlueprintName = "TitleSelectionTests"
ReferencedContainer = "container:TitleSelection.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7150971919A924FA00E6AE2A"
BuildableName = "TitleSelection.app"
BlueprintName = "TitleSelection"
ReferencedContainer = "container:TitleSelection.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7150971919A924FA00E6AE2A"
BuildableName = "TitleSelection.app"
BlueprintName = "TitleSelection"
ReferencedContainer = "container:TitleSelection.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7150971919A924FA00E6AE2A"
BuildableName = "TitleSelection.app"
BlueprintName = "TitleSelection"
ReferencedContainer = "container:TitleSelection.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>TitleSelection.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>7150971919A924FA00E6AE2A</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>7150972919A924FA00E6AE2A</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
27 changes: 20 additions & 7 deletions TitleSelection/TitleSelectorViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
//

#import "TitleSelectorViewController.h"
#import "TitleTableViewDataSource.h"

@interface TitleSelectorViewController ()
@interface TitleSelectorViewController () <UITableViewDataSource>

@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) TitleTableViewDataSource *dataSource;

@end

Expand All @@ -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
16 changes: 0 additions & 16 deletions TitleSelection/TitleTableViewDataSource.h

This file was deleted.

38 changes: 0 additions & 38 deletions TitleSelection/TitleTableViewDataSource.m

This file was deleted.