diff --git a/Poll/Poll.xcodeproj/project.pbxproj b/Poll/Poll.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3a1359c --- /dev/null +++ b/Poll/Poll.xcodeproj/project.pbxproj @@ -0,0 +1,399 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 825E1C032138919100E427A4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825E1C022138919100E427A4 /* AppDelegate.swift */; }; + 825E1C082138919100E427A4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 825E1C062138919100E427A4 /* Main.storyboard */; }; + 825E1C0A2138919200E427A4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 825E1C092138919200E427A4 /* Assets.xcassets */; }; + 825E1C0D2138919200E427A4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 825E1C0B2138919200E427A4 /* LaunchScreen.storyboard */; }; + 825E1C152138921A00E427A4 /* Vote.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825E1C142138921A00E427A4 /* Vote.swift */; }; + 825E1C172138937E00E427A4 /* VoteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825E1C162138937E00E427A4 /* VoteController.swift */; }; + 825E1C1C2138969300E427A4 /* Voting.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 825E1C1B2138969300E427A4 /* Voting.storyboard */; }; + 825E1C1E213897C900E427A4 /* VotingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825E1C1D213897C900E427A4 /* VotingViewController.swift */; }; + 825E1C20213899EE00E427A4 /* Results.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 825E1C1F213899EE00E427A4 /* Results.storyboard */; }; + 825E1C2221389A5600E427A4 /* ResultsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825E1C2121389A5600E427A4 /* ResultsTableViewController.swift */; }; + 825E1C2421389B9500E427A4 /* Combined.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 825E1C2321389B9500E427A4 /* Combined.storyboard */; }; + 825E1C2621389C8E00E427A4 /* CombinedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825E1C2521389C8E00E427A4 /* CombinedViewController.swift */; }; + 825E1C282138AC0F00E427A4 /* PollingTabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825E1C272138AC0F00E427A4 /* PollingTabBarViewController.swift */; }; + 825E1C2A2138B1A900E427A4 /* VoteControllerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825E1C292138B1A900E427A4 /* VoteControllerProtocol.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 825E1BFF2138919100E427A4 /* Poll.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Poll.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 825E1C022138919100E427A4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 825E1C072138919100E427A4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 825E1C092138919200E427A4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 825E1C0C2138919200E427A4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 825E1C0E2138919200E427A4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 825E1C142138921A00E427A4 /* Vote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Vote.swift; sourceTree = ""; }; + 825E1C162138937E00E427A4 /* VoteController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoteController.swift; sourceTree = ""; }; + 825E1C1B2138969300E427A4 /* Voting.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Voting.storyboard; sourceTree = ""; }; + 825E1C1D213897C900E427A4 /* VotingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VotingViewController.swift; sourceTree = ""; }; + 825E1C1F213899EE00E427A4 /* Results.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Results.storyboard; sourceTree = ""; }; + 825E1C2121389A5600E427A4 /* ResultsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultsTableViewController.swift; sourceTree = ""; }; + 825E1C2321389B9500E427A4 /* Combined.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Combined.storyboard; sourceTree = ""; }; + 825E1C2521389C8E00E427A4 /* CombinedViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CombinedViewController.swift; sourceTree = ""; }; + 825E1C272138AC0F00E427A4 /* PollingTabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollingTabBarViewController.swift; sourceTree = ""; }; + 825E1C292138B1A900E427A4 /* VoteControllerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoteControllerProtocol.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 825E1BFC2138919100E427A4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 825E1BF62138919100E427A4 = { + isa = PBXGroup; + children = ( + 825E1C012138919100E427A4 /* Poll */, + 825E1C002138919100E427A4 /* Products */, + ); + sourceTree = ""; + }; + 825E1C002138919100E427A4 /* Products */ = { + isa = PBXGroup; + children = ( + 825E1BFF2138919100E427A4 /* Poll.app */, + ); + name = Products; + sourceTree = ""; + }; + 825E1C012138919100E427A4 /* Poll */ = { + isa = PBXGroup; + children = ( + 825E1C142138921A00E427A4 /* Vote.swift */, + 825E1C292138B1A900E427A4 /* VoteControllerProtocol.swift */, + 825E1C1A213895EA00E427A4 /* Controllers */, + 825E1C19213895DE00E427A4 /* Stroyboards */, + 825E1C18213895D100E427A4 /* Supporting files */, + ); + path = Poll; + sourceTree = ""; + }; + 825E1C18213895D100E427A4 /* Supporting files */ = { + isa = PBXGroup; + children = ( + 825E1C022138919100E427A4 /* AppDelegate.swift */, + 825E1C092138919200E427A4 /* Assets.xcassets */, + 825E1C0E2138919200E427A4 /* Info.plist */, + ); + path = "Supporting files"; + sourceTree = ""; + }; + 825E1C19213895DE00E427A4 /* Stroyboards */ = { + isa = PBXGroup; + children = ( + 825E1C062138919100E427A4 /* Main.storyboard */, + 825E1C1B2138969300E427A4 /* Voting.storyboard */, + 825E1C1F213899EE00E427A4 /* Results.storyboard */, + 825E1C2321389B9500E427A4 /* Combined.storyboard */, + 825E1C0B2138919200E427A4 /* LaunchScreen.storyboard */, + ); + path = Stroyboards; + sourceTree = ""; + }; + 825E1C1A213895EA00E427A4 /* Controllers */ = { + isa = PBXGroup; + children = ( + 825E1C162138937E00E427A4 /* VoteController.swift */, + 825E1C1D213897C900E427A4 /* VotingViewController.swift */, + 825E1C2121389A5600E427A4 /* ResultsTableViewController.swift */, + 825E1C2521389C8E00E427A4 /* CombinedViewController.swift */, + 825E1C272138AC0F00E427A4 /* PollingTabBarViewController.swift */, + ); + path = Controllers; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 825E1BFE2138919100E427A4 /* Poll */ = { + isa = PBXNativeTarget; + buildConfigurationList = 825E1C112138919200E427A4 /* Build configuration list for PBXNativeTarget "Poll" */; + buildPhases = ( + 825E1BFB2138919100E427A4 /* Sources */, + 825E1BFC2138919100E427A4 /* Frameworks */, + 825E1BFD2138919100E427A4 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Poll; + productName = Poll; + productReference = 825E1BFF2138919100E427A4 /* Poll.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 825E1BF72138919100E427A4 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0940; + LastUpgradeCheck = 0940; + ORGANIZATIONNAME = "Lambda School"; + TargetAttributes = { + 825E1BFE2138919100E427A4 = { + CreatedOnToolsVersion = 9.4.1; + }; + }; + }; + buildConfigurationList = 825E1BFA2138919100E427A4 /* Build configuration list for PBXProject "Poll" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 825E1BF62138919100E427A4; + productRefGroup = 825E1C002138919100E427A4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 825E1BFE2138919100E427A4 /* Poll */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 825E1BFD2138919100E427A4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 825E1C0D2138919200E427A4 /* LaunchScreen.storyboard in Resources */, + 825E1C20213899EE00E427A4 /* Results.storyboard in Resources */, + 825E1C0A2138919200E427A4 /* Assets.xcassets in Resources */, + 825E1C082138919100E427A4 /* Main.storyboard in Resources */, + 825E1C1C2138969300E427A4 /* Voting.storyboard in Resources */, + 825E1C2421389B9500E427A4 /* Combined.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 825E1BFB2138919100E427A4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 825E1C172138937E00E427A4 /* VoteController.swift in Sources */, + 825E1C152138921A00E427A4 /* Vote.swift in Sources */, + 825E1C032138919100E427A4 /* AppDelegate.swift in Sources */, + 825E1C2A2138B1A900E427A4 /* VoteControllerProtocol.swift in Sources */, + 825E1C1E213897C900E427A4 /* VotingViewController.swift in Sources */, + 825E1C2221389A5600E427A4 /* ResultsTableViewController.swift in Sources */, + 825E1C2621389C8E00E427A4 /* CombinedViewController.swift in Sources */, + 825E1C282138AC0F00E427A4 /* PollingTabBarViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 825E1C062138919100E427A4 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 825E1C072138919100E427A4 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 825E1C0B2138919200E427A4 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 825E1C0C2138919200E427A4 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 825E1C0F2138919200E427A4 /* 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 = 11.4; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 825E1C102138919200E427A4 /* 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 = 11.4; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 825E1C122138919200E427A4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = KK26JKU2YA; + INFOPLIST_FILE = "$(SRCROOT)/Poll/Supporting files/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.LambdaSchool.Poll; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 825E1C132138919200E427A4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = KK26JKU2YA; + INFOPLIST_FILE = "$(SRCROOT)/Poll/Supporting files/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.LambdaSchool.Poll; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 825E1BFA2138919100E427A4 /* Build configuration list for PBXProject "Poll" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 825E1C0F2138919200E427A4 /* Debug */, + 825E1C102138919200E427A4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 825E1C112138919200E427A4 /* Build configuration list for PBXNativeTarget "Poll" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 825E1C122138919200E427A4 /* Debug */, + 825E1C132138919200E427A4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 825E1BF72138919100E427A4 /* 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/ilgarilyasov.xcuserdatad/UserInterfaceState.xcuserstate b/Poll/Poll.xcodeproj/project.xcworkspace/xcuserdata/ilgarilyasov.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..61ac06e Binary files /dev/null and b/Poll/Poll.xcodeproj/project.xcworkspace/xcuserdata/ilgarilyasov.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Poll/Poll.xcodeproj/xcuserdata/ilgarilyasov.xcuserdatad/xcschemes/xcschememanagement.plist b/Poll/Poll.xcodeproj/xcuserdata/ilgarilyasov.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..aecce71 --- /dev/null +++ b/Poll/Poll.xcodeproj/xcuserdata/ilgarilyasov.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Poll.xcscheme + + orderHint + 0 + + + + diff --git a/Poll/Poll/Controllers/CombinedViewController.swift b/Poll/Poll/Controllers/CombinedViewController.swift new file mode 100644 index 0000000..a367806 --- /dev/null +++ b/Poll/Poll/Controllers/CombinedViewController.swift @@ -0,0 +1,37 @@ +// +// CombinedViewController.swift +// Poll +// +// Created by Ilgar Ilyasov on 8/30/18. +// Copyright © 2018 Lambda School. All rights reserved. +// + +import UIKit + +class CombinedViewController: UIViewController, VoteControlProtocol { + + override func viewDidLoad() { + super.viewDidLoad() + + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + + if segue.identifier == "VotingSegue" { + + guard let votingVC = segue.destination as? VotingViewController else { return } + + votingVC.voteController = voteController + + } else if segue.identifier == "ResultsSegue" { + + guard let resultsVC = segue.destination as? ResultsTableViewController else { return } + + resultsVC.voteController = voteController + } + + } + + var voteController: VoteController? + +} diff --git a/Poll/Poll/Controllers/PollingTabBarViewController.swift b/Poll/Poll/Controllers/PollingTabBarViewController.swift new file mode 100644 index 0000000..abd2bf1 --- /dev/null +++ b/Poll/Poll/Controllers/PollingTabBarViewController.swift @@ -0,0 +1,33 @@ +// +// PollingTabBarViewController.swift +// Poll +// +// Created by Ilgar Ilyasov on 8/30/18. +// Copyright © 2018 Lambda School. All rights reserved. +// + +import UIKit + +class PollingTabBarViewController: UITabBarController { + + override func viewDidLoad() { + super.viewDidLoad() + + passVoteControllerToChildViewController() + } + + let voteController = VoteController() + + func passVoteControllerToChildViewController() { + + guard let viewControllers = viewControllers.self else { return } + + for viewController in viewControllers { + + if let viewController = viewController as? VoteControlProtocol { + + viewController.voteController = voteController + } + } + } +} diff --git a/Poll/Poll/Controllers/ResultsTableViewController.swift b/Poll/Poll/Controllers/ResultsTableViewController.swift new file mode 100644 index 0000000..1be8c50 --- /dev/null +++ b/Poll/Poll/Controllers/ResultsTableViewController.swift @@ -0,0 +1,33 @@ +// +// ResultsTableViewController.swift +// Poll +// +// Created by Ilgar Ilyasov on 8/30/18. +// Copyright © 2018 Lambda School. All rights reserved. +// + +import UIKit + +class ResultsTableViewController: UITableViewController, VoteControlProtocol { + + var voteController: VoteController? + + override func viewWillAppear(_ animated: Bool) { + + tableView.reloadData() + } + + 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: "ResultTableViewCell", 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/Controllers/VoteController.swift b/Poll/Poll/Controllers/VoteController.swift new file mode 100644 index 0000000..c2a0016 --- /dev/null +++ b/Poll/Poll/Controllers/VoteController.swift @@ -0,0 +1,20 @@ +// +// VoteController.swift +// Poll +// +// Created by Ilgar Ilyasov on 8/30/18. +// Copyright © 2018 Lambda School. All rights reserved. +// + +import Foundation + +class VoteController { + + private(set) var votes: [Vote] = [] + + func createVote(name: String, response: String) { + + let newVote = Vote(name: name, response: response) + votes.append(newVote) + } +} diff --git a/Poll/Poll/Controllers/VotingViewController.swift b/Poll/Poll/Controllers/VotingViewController.swift new file mode 100644 index 0000000..dfc30e1 --- /dev/null +++ b/Poll/Poll/Controllers/VotingViewController.swift @@ -0,0 +1,30 @@ +// +// VotingViewController.swift +// Poll +// +// Created by Ilgar Ilyasov on 8/30/18. +// Copyright © 2018 Lambda School. All rights reserved. +// + +import UIKit + +class VotingViewController: UIViewController, VoteControlProtocol { + + override func viewDidLoad() { + super.viewDidLoad() + } + + @IBAction func submitButtonAction(_ sender: Any) { + + guard let name = nameTextField.text, + let response = responseTextField.text else { return } + + voteController?.createVote(name: name, response: response) + } + + @IBOutlet weak var nameTextField: UITextField! + @IBOutlet weak var responseTextField: UITextField! + + var voteController: VoteController? + +} diff --git a/Poll/Poll/Stroyboards/Base.lproj/LaunchScreen.storyboard b/Poll/Poll/Stroyboards/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f83f6fd --- /dev/null +++ b/Poll/Poll/Stroyboards/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/Stroyboards/Base.lproj/Main.storyboard b/Poll/Poll/Stroyboards/Base.lproj/Main.storyboard new file mode 100644 index 0000000..ebd829b --- /dev/null +++ b/Poll/Poll/Stroyboards/Base.lproj/Main.storyboard @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/Stroyboards/Combined.storyboard b/Poll/Poll/Stroyboards/Combined.storyboard new file mode 100644 index 0000000..52bd26d --- /dev/null +++ b/Poll/Poll/Stroyboards/Combined.storyboard @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/Stroyboards/Results.storyboard b/Poll/Poll/Stroyboards/Results.storyboard new file mode 100644 index 0000000..ba7f03f --- /dev/null +++ b/Poll/Poll/Stroyboards/Results.storyboard @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/Stroyboards/Voting.storyboard b/Poll/Poll/Stroyboards/Voting.storyboard new file mode 100644 index 0000000..90dae00 --- /dev/null +++ b/Poll/Poll/Stroyboards/Voting.storyboard @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Poll/Poll/Supporting files/AppDelegate.swift b/Poll/Poll/Supporting files/AppDelegate.swift new file mode 100644 index 0000000..3a2c231 --- /dev/null +++ b/Poll/Poll/Supporting files/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// Poll +// +// Created by Ilgar Ilyasov on 8/30/18. +// Copyright © 2018 Lambda School. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Poll/Poll/Supporting files/Assets.xcassets/AppIcon.appiconset/Contents.json b/Poll/Poll/Supporting files/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Poll/Poll/Supporting files/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/Supporting files/Assets.xcassets/Contents.json b/Poll/Poll/Supporting files/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Poll/Poll/Supporting files/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Poll/Poll/Supporting files/Info.plist b/Poll/Poll/Supporting files/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/Poll/Poll/Supporting files/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/Vote.swift b/Poll/Poll/Vote.swift new file mode 100644 index 0000000..435f441 --- /dev/null +++ b/Poll/Poll/Vote.swift @@ -0,0 +1,15 @@ +// +// Vote.swift +// Poll +// +// Created by Ilgar Ilyasov on 8/30/18. +// Copyright © 2018 Lambda School. All rights reserved. +// + +import Foundation + +struct Vote { + + let name: String + let response: String +} diff --git a/Poll/Poll/VoteControllerProtocol.swift b/Poll/Poll/VoteControllerProtocol.swift new file mode 100644 index 0000000..501837b --- /dev/null +++ b/Poll/Poll/VoteControllerProtocol.swift @@ -0,0 +1,14 @@ +// +// VoteControllerProtocol.swift +// Poll +// +// Created by Ilgar Ilyasov on 8/30/18. +// Copyright © 2018 Lambda School. All rights reserved. +// + +import Foundation + +protocol VoteControlProtocol: class { + + var voteController: VoteController? { get set } +}