diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..90b8490 Binary files /dev/null and b/.DS_Store differ diff --git a/Poll/.DS_Store b/Poll/.DS_Store new file mode 100644 index 0000000..64998a3 Binary files /dev/null and b/Poll/.DS_Store differ diff --git a/Poll/Poll.xcodeproj/project.pbxproj b/Poll/Poll.xcodeproj/project.pbxproj new file mode 100644 index 0000000..dc499f0 --- /dev/null +++ b/Poll/Poll.xcodeproj/project.pbxproj @@ -0,0 +1,413 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 39BEDBBA2166AF7F00052910 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BEDBB92166AF7F00052910 /* AppDelegate.swift */; }; + 39BEDBBC2166AF7F00052910 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BEDBBB2166AF7F00052910 /* ViewController.swift */; }; + 39BEDBBF2166AF7F00052910 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39BEDBBD2166AF7F00052910 /* Main.storyboard */; }; + 39BEDBC12166AF7F00052910 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 39BEDBC02166AF7F00052910 /* Assets.xcassets */; }; + 39BEDBC42166AF7F00052910 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39BEDBC22166AF7F00052910 /* LaunchScreen.storyboard */; }; + 39BEDBCC2166B02100052910 /* Vote.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BEDBCB2166B02100052910 /* Vote.swift */; }; + 39BEDBCE2166B22500052910 /* VoteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BEDBCD2166B22500052910 /* VoteController.swift */; }; + 39BEDBD22166C32300052910 /* VotingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BEDBD12166C32300052910 /* VotingViewController.swift */; }; + 39BEDBD62166CB3B00052910 /* ResultsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BEDBD52166CB3B00052910 /* ResultsTableViewController.swift */; }; + 39BEDBD82166CD4400052910 /* Combined.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39BEDBD72166CD4400052910 /* Combined.storyboard */; }; + 39BEDBDA2166D63100052910 /* CombinedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BEDBD92166D63100052910 /* CombinedViewController.swift */; }; + 39BEDBDC2166F68D00052910 /* PollingTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BEDBDB2166F68D00052910 /* PollingTabBarController.swift */; }; + 39BEDBDE2166FFFA00052910 /* Voting.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39BEDBDD2166FFFA00052910 /* Voting.storyboard */; }; + 39BEDBE22167036400052910 /* Results.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39BEDBE12167036400052910 /* Results.storyboard */; }; + 39BEDBE42167082600052910 /* VoteControllerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BEDBE32167082600052910 /* VoteControllerProtocol.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 39BEDBB62166AF7F00052910 /* Poll.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Poll.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 39BEDBB92166AF7F00052910 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 39BEDBBB2166AF7F00052910 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 39BEDBBE2166AF7F00052910 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 39BEDBC02166AF7F00052910 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 39BEDBC32166AF7F00052910 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 39BEDBC52166AF7F00052910 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 39BEDBCB2166B02100052910 /* Vote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Vote.swift; sourceTree = ""; }; + 39BEDBCD2166B22500052910 /* VoteController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoteController.swift; sourceTree = ""; }; + 39BEDBD12166C32300052910 /* VotingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VotingViewController.swift; sourceTree = ""; }; + 39BEDBD52166CB3B00052910 /* ResultsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultsTableViewController.swift; sourceTree = ""; }; + 39BEDBD72166CD4400052910 /* Combined.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Combined.storyboard; sourceTree = ""; }; + 39BEDBD92166D63100052910 /* CombinedViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CombinedViewController.swift; sourceTree = ""; }; + 39BEDBDB2166F68D00052910 /* PollingTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollingTabBarController.swift; sourceTree = ""; }; + 39BEDBDD2166FFFA00052910 /* Voting.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Voting.storyboard; sourceTree = ""; }; + 39BEDBE12167036400052910 /* Results.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Results.storyboard; sourceTree = ""; }; + 39BEDBE32167082600052910 /* VoteControllerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoteControllerProtocol.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 39BEDBB32166AF7F00052910 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 39BEDBAD2166AF7F00052910 = { + isa = PBXGroup; + children = ( + 39BEDBB82166AF7F00052910 /* Poll */, + 39BEDBB72166AF7F00052910 /* Products */, + ); + sourceTree = ""; + }; + 39BEDBB72166AF7F00052910 /* Products */ = { + isa = PBXGroup; + children = ( + 39BEDBB62166AF7F00052910 /* Poll.app */, + ); + name = Products; + sourceTree = ""; + }; + 39BEDBB82166AF7F00052910 /* Poll */ = { + isa = PBXGroup; + children = ( + 39BEDBB92166AF7F00052910 /* AppDelegate.swift */, + 39BEDBE62167155900052910 /* Models */, + 39BEDBE72167157A00052910 /* View Controllers */, + 39BEDBE52167152E00052910 /* Storyboards */, + 39BEDBE8216715C300052910 /* Resources */, + ); + path = Poll; + sourceTree = ""; + }; + 39BEDBE52167152E00052910 /* Storyboards */ = { + isa = PBXGroup; + children = ( + 39BEDBBD2166AF7F00052910 /* Main.storyboard */, + 39BEDBDD2166FFFA00052910 /* Voting.storyboard */, + 39BEDBE12167036400052910 /* Results.storyboard */, + 39BEDBD72166CD4400052910 /* Combined.storyboard */, + ); + path = Storyboards; + sourceTree = ""; + }; + 39BEDBE62167155900052910 /* Models */ = { + isa = PBXGroup; + children = ( + 39BEDBCB2166B02100052910 /* Vote.swift */, + 39BEDBCD2166B22500052910 /* VoteController.swift */, + 39BEDBE32167082600052910 /* VoteControllerProtocol.swift */, + 39BEDBDB2166F68D00052910 /* PollingTabBarController.swift */, + ); + path = Models; + sourceTree = ""; + }; + 39BEDBE72167157A00052910 /* View Controllers */ = { + isa = PBXGroup; + children = ( + 39BEDBD92166D63100052910 /* CombinedViewController.swift */, + 39BEDBD52166CB3B00052910 /* ResultsTableViewController.swift */, + 39BEDBD12166C32300052910 /* VotingViewController.swift */, + 39BEDBBB2166AF7F00052910 /* ViewController.swift */, + ); + path = "View Controllers"; + sourceTree = ""; + }; + 39BEDBE8216715C300052910 /* Resources */ = { + isa = PBXGroup; + children = ( + 39BEDBC02166AF7F00052910 /* Assets.xcassets */, + 39BEDBC22166AF7F00052910 /* LaunchScreen.storyboard */, + 39BEDBC52166AF7F00052910 /* Info.plist */, + ); + path = Resources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 39BEDBB52166AF7F00052910 /* Poll */ = { + isa = PBXNativeTarget; + buildConfigurationList = 39BEDBC82166AF7F00052910 /* Build configuration list for PBXNativeTarget "Poll" */; + buildPhases = ( + 39BEDBB22166AF7F00052910 /* Sources */, + 39BEDBB32166AF7F00052910 /* Frameworks */, + 39BEDBB42166AF7F00052910 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Poll; + productName = Poll; + productReference = 39BEDBB62166AF7F00052910 /* Poll.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 39BEDBAE2166AF7F00052910 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1000; + LastUpgradeCheck = 1000; + ORGANIZATIONNAME = "Moses Robinson"; + TargetAttributes = { + 39BEDBB52166AF7F00052910 = { + CreatedOnToolsVersion = 10.0; + }; + }; + }; + buildConfigurationList = 39BEDBB12166AF7F00052910 /* Build configuration list for PBXProject "Poll" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 39BEDBAD2166AF7F00052910; + productRefGroup = 39BEDBB72166AF7F00052910 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 39BEDBB52166AF7F00052910 /* Poll */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 39BEDBB42166AF7F00052910 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 39BEDBC42166AF7F00052910 /* LaunchScreen.storyboard in Resources */, + 39BEDBC12166AF7F00052910 /* Assets.xcassets in Resources */, + 39BEDBDE2166FFFA00052910 /* Voting.storyboard in Resources */, + 39BEDBE22167036400052910 /* Results.storyboard in Resources */, + 39BEDBBF2166AF7F00052910 /* Main.storyboard in Resources */, + 39BEDBD82166CD4400052910 /* Combined.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 39BEDBB22166AF7F00052910 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 39BEDBD62166CB3B00052910 /* ResultsTableViewController.swift in Sources */, + 39BEDBBC2166AF7F00052910 /* ViewController.swift in Sources */, + 39BEDBE42167082600052910 /* VoteControllerProtocol.swift in Sources */, + 39BEDBDA2166D63100052910 /* CombinedViewController.swift in Sources */, + 39BEDBCE2166B22500052910 /* VoteController.swift in Sources */, + 39BEDBCC2166B02100052910 /* Vote.swift in Sources */, + 39BEDBDC2166F68D00052910 /* PollingTabBarController.swift in Sources */, + 39BEDBBA2166AF7F00052910 /* AppDelegate.swift in Sources */, + 39BEDBD22166C32300052910 /* VotingViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 39BEDBBD2166AF7F00052910 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 39BEDBBE2166AF7F00052910 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 39BEDBC22166AF7F00052910 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 39BEDBC32166AF7F00052910 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 39BEDBC62166AF7F00052910 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 39BEDBC72166AF7F00052910 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 39BEDBC92166AF7F00052910 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 5ZRKC88876; + INFOPLIST_FILE = "$(SRCROOT)/Poll/Resources/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.mosesrobinson.Poll; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 39BEDBCA2166AF7F00052910 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 5ZRKC88876; + INFOPLIST_FILE = "$(SRCROOT)/Poll/Resources/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.mosesrobinson.Poll; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 39BEDBB12166AF7F00052910 /* Build configuration list for PBXProject "Poll" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 39BEDBC62166AF7F00052910 /* Debug */, + 39BEDBC72166AF7F00052910 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 39BEDBC82166AF7F00052910 /* Build configuration list for PBXNativeTarget "Poll" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 39BEDBC92166AF7F00052910 /* Debug */, + 39BEDBCA2166AF7F00052910 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 39BEDBAE2166AF7F00052910 /* Project object */; +} diff --git a/Poll/Poll.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Poll/Poll.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..9d02d16 --- /dev/null +++ b/Poll/Poll.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Poll/Poll.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Poll/Poll.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Poll/Poll.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Poll/Poll.xcodeproj/project.xcworkspace/xcuserdata/mosesrobinson.xcuserdatad/UserInterfaceState.xcuserstate b/Poll/Poll.xcodeproj/project.xcworkspace/xcuserdata/mosesrobinson.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..1be2fc1 Binary files /dev/null and b/Poll/Poll.xcodeproj/project.xcworkspace/xcuserdata/mosesrobinson.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Poll/Poll.xcodeproj/xcuserdata/mosesrobinson.xcuserdatad/xcschemes/xcschememanagement.plist b/Poll/Poll.xcodeproj/xcuserdata/mosesrobinson.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..aecce71 --- /dev/null +++ b/Poll/Poll.xcodeproj/xcuserdata/mosesrobinson.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Poll.xcscheme + + orderHint + 0 + + + + diff --git a/Poll/Poll/AppDelegate.swift b/Poll/Poll/AppDelegate.swift new file mode 100644 index 0000000..e42ab0f --- /dev/null +++ b/Poll/Poll/AppDelegate.swift @@ -0,0 +1,9 @@ +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + +} + diff --git a/Poll/Poll/Models/PollingTabBarController.swift b/Poll/Poll/Models/PollingTabBarController.swift new file mode 100644 index 0000000..acb03a3 --- /dev/null +++ b/Poll/Poll/Models/PollingTabBarController.swift @@ -0,0 +1,23 @@ +import UIKit + +class PollingTabBarController: UITabBarController { + + let voteController = VoteController() + + + override func viewDidLoad() { + super.viewDidLoad() + + passVoteControllerToChildViewControllers() + } + + func passVoteControllerToChildViewControllers() { + + guard let viewControllers = self.viewControllers else { return } + for i in viewControllers { + if var viewController = i as? VoteControllerProtocol { + viewController.voteController = self.voteController + } + } + } +} diff --git a/Poll/Poll/Models/Vote.swift b/Poll/Poll/Models/Vote.swift new file mode 100644 index 0000000..8549a43 --- /dev/null +++ b/Poll/Poll/Models/Vote.swift @@ -0,0 +1,11 @@ +import UIKit + +class Vote { + var name: String + var response: String + + init(name: String, response: String) { + self.name = name + self.response = response + } +} diff --git a/Poll/Poll/Models/VoteController.swift b/Poll/Poll/Models/VoteController.swift new file mode 100644 index 0000000..d276cee --- /dev/null +++ b/Poll/Poll/Models/VoteController.swift @@ -0,0 +1,19 @@ +import UIKit + +class VoteController { + + //DO C.R.U.D. HERE + + + // READ + var votes: [Vote] = [] + + + //CREATE + func createNewVote(name: String, response: String) -> Vote { + + let newVote = Vote(name: name, response: response) + votes.append(newVote) + return newVote + } +} diff --git a/Poll/Poll/Models/VoteControllerProtocol.swift b/Poll/Poll/Models/VoteControllerProtocol.swift new file mode 100644 index 0000000..2c260c9 --- /dev/null +++ b/Poll/Poll/Models/VoteControllerProtocol.swift @@ -0,0 +1,5 @@ +import UIKit + +protocol VoteControllerProtocol { + var voteController: VoteController? { get set } +} diff --git a/Poll/Poll/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Poll/Poll/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Poll/Poll/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Poll/Poll/Resources/Assets.xcassets/Contents.json b/Poll/Poll/Resources/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Poll/Poll/Resources/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Poll/Poll/Resources/Base.lproj/LaunchScreen.storyboard b/Poll/Poll/Resources/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/Poll/Poll/Resources/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/Resources/Info.plist b/Poll/Poll/Resources/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/Poll/Poll/Resources/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Poll/Poll/Storyboards/Base.lproj/Main.storyboard b/Poll/Poll/Storyboards/Base.lproj/Main.storyboard new file mode 100644 index 0000000..b974e53 --- /dev/null +++ b/Poll/Poll/Storyboards/Base.lproj/Main.storyboard @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/Storyboards/Combined.storyboard b/Poll/Poll/Storyboards/Combined.storyboard new file mode 100644 index 0000000..4184e28 --- /dev/null +++ b/Poll/Poll/Storyboards/Combined.storyboard @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/Storyboards/Results.storyboard b/Poll/Poll/Storyboards/Results.storyboard new file mode 100755 index 0000000..bc488cc --- /dev/null +++ b/Poll/Poll/Storyboards/Results.storyboard @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/Storyboards/Voting.storyboard b/Poll/Poll/Storyboards/Voting.storyboard new file mode 100644 index 0000000..5c43849 --- /dev/null +++ b/Poll/Poll/Storyboards/Voting.storyboard @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/View Controllers/CombinedViewController.swift b/Poll/Poll/View Controllers/CombinedViewController.swift new file mode 100644 index 0000000..dfa0863 --- /dev/null +++ b/Poll/Poll/View Controllers/CombinedViewController.swift @@ -0,0 +1,21 @@ +import UIKit + +class CombinedViewController: UIViewController, VoteControllerProtocol { + + var voteController: VoteController? + + override func viewDidLoad() { + super.viewDidLoad() + } + + + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "votingSegue" || segue.identifier == "resultsSegue" { + if var viewDestination = segue.destination as? VoteControllerProtocol { + viewDestination.voteController = voteController + + } + } + } +} diff --git a/Poll/Poll/View Controllers/ResultsTableViewController.swift b/Poll/Poll/View Controllers/ResultsTableViewController.swift new file mode 100644 index 0000000..83252d9 --- /dev/null +++ b/Poll/Poll/View Controllers/ResultsTableViewController.swift @@ -0,0 +1,32 @@ +import UIKit + +class ResultsTableViewController: UITableViewController, VoteControllerProtocol { + + var voteController: VoteController? + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + tableView.reloadData() + } + + + override func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return voteController?.votes.count ?? 0 + } + + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) + let vote = voteController?.votes[indexPath.row] + cell.textLabel?.text = vote?.name + cell.detailTextLabel?.text = vote?.response + + + return cell + } +} diff --git a/Poll/Poll/View Controllers/ViewController.swift b/Poll/Poll/View Controllers/ViewController.swift new file mode 100644 index 0000000..df71016 --- /dev/null +++ b/Poll/Poll/View Controllers/ViewController.swift @@ -0,0 +1,10 @@ +import UIKit + +class ViewController: UIViewController { + + + } + + + + diff --git a/Poll/Poll/View Controllers/VotingViewController.swift b/Poll/Poll/View Controllers/VotingViewController.swift new file mode 100644 index 0000000..76ea635 --- /dev/null +++ b/Poll/Poll/View Controllers/VotingViewController.swift @@ -0,0 +1,17 @@ +import UIKit + +class VotingViewController: UIViewController, VoteControllerProtocol { + + var voteController: VoteController? + + @IBOutlet weak var nameField: UITextField! + @IBOutlet weak var responseField: UITextField! + + + @IBAction func submitButton(_ sender: Any) { + if let name = nameField.text, let response = responseField.text { + voteController?.createNewVote(name: name, response: response) + + } + } +}