From 07066b410d16988ca4daa55e9ca423a1f07841f3 Mon Sep 17 00:00:00 2001 From: Michail Date: Sun, 11 Sep 2016 12:20:30 +0300 Subject: [PATCH 1/3] add app Discard #582 :i --- tap_counter.xcodeproj/project.pbxproj | 507 ++++++++++++++++++ tap_counter/AppDelegate.swift | 46 ++ .../AppIcon.appiconset/Contents.json | 68 +++ .../Base.lproj/LaunchScreen.storyboard | 27 + tap_counter/Base.lproj/Main.storyboard | 73 +++ tap_counter/Info.plist | 47 ++ tap_counter/ViewController.swift | 55 ++ tap_counterTests/Info.plist | 24 + tap_counterTests/tap_counterTests.swift | 36 ++ tap_counterUITests/Info.plist | 24 + tap_counterUITests/tap_counterUITests.swift | 36 ++ 11 files changed, 943 insertions(+) create mode 100644 tap_counter.xcodeproj/project.pbxproj create mode 100644 tap_counter/AppDelegate.swift create mode 100644 tap_counter/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 tap_counter/Base.lproj/LaunchScreen.storyboard create mode 100644 tap_counter/Base.lproj/Main.storyboard create mode 100644 tap_counter/Info.plist create mode 100644 tap_counter/ViewController.swift create mode 100644 tap_counterTests/Info.plist create mode 100644 tap_counterTests/tap_counterTests.swift create mode 100644 tap_counterUITests/Info.plist create mode 100644 tap_counterUITests/tap_counterUITests.swift diff --git a/tap_counter.xcodeproj/project.pbxproj b/tap_counter.xcodeproj/project.pbxproj new file mode 100644 index 0000000..d590e0f --- /dev/null +++ b/tap_counter.xcodeproj/project.pbxproj @@ -0,0 +1,507 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 5448E27A1D849FEB003ED350 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5448E2791D849FEB003ED350 /* AppDelegate.swift */; }; + 5448E27C1D849FEB003ED350 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5448E27B1D849FEB003ED350 /* ViewController.swift */; }; + 5448E27F1D849FEB003ED350 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5448E27D1D849FEB003ED350 /* Main.storyboard */; }; + 5448E2811D849FEB003ED350 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5448E2801D849FEB003ED350 /* Assets.xcassets */; }; + 5448E2841D849FEB003ED350 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5448E2821D849FEB003ED350 /* LaunchScreen.storyboard */; }; + 5448E28F1D849FEB003ED350 /* tap_counterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5448E28E1D849FEB003ED350 /* tap_counterTests.swift */; }; + 5448E29A1D849FEB003ED350 /* tap_counterUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5448E2991D849FEB003ED350 /* tap_counterUITests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 5448E28B1D849FEB003ED350 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5448E26E1D849FEB003ED350 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5448E2751D849FEB003ED350; + remoteInfo = tap_counter; + }; + 5448E2961D849FEB003ED350 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5448E26E1D849FEB003ED350 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5448E2751D849FEB003ED350; + remoteInfo = tap_counter; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 5448E2761D849FEB003ED350 /* tap_counter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tap_counter.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5448E2791D849FEB003ED350 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 5448E27B1D849FEB003ED350 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 5448E27E1D849FEB003ED350 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 5448E2801D849FEB003ED350 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 5448E2831D849FEB003ED350 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 5448E2851D849FEB003ED350 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5448E28A1D849FEB003ED350 /* tap_counterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = tap_counterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 5448E28E1D849FEB003ED350 /* tap_counterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = tap_counterTests.swift; sourceTree = ""; }; + 5448E2901D849FEB003ED350 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5448E2951D849FEB003ED350 /* tap_counterUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = tap_counterUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 5448E2991D849FEB003ED350 /* tap_counterUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = tap_counterUITests.swift; sourceTree = ""; }; + 5448E29B1D849FEB003ED350 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5448E2731D849FEB003ED350 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5448E2871D849FEB003ED350 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5448E2921D849FEB003ED350 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5448E26D1D849FEB003ED350 = { + isa = PBXGroup; + children = ( + 5448E2781D849FEB003ED350 /* tap_counter */, + 5448E28D1D849FEB003ED350 /* tap_counterTests */, + 5448E2981D849FEB003ED350 /* tap_counterUITests */, + 5448E2771D849FEB003ED350 /* Products */, + ); + sourceTree = ""; + }; + 5448E2771D849FEB003ED350 /* Products */ = { + isa = PBXGroup; + children = ( + 5448E2761D849FEB003ED350 /* tap_counter.app */, + 5448E28A1D849FEB003ED350 /* tap_counterTests.xctest */, + 5448E2951D849FEB003ED350 /* tap_counterUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 5448E2781D849FEB003ED350 /* tap_counter */ = { + isa = PBXGroup; + children = ( + 5448E2791D849FEB003ED350 /* AppDelegate.swift */, + 5448E27B1D849FEB003ED350 /* ViewController.swift */, + 5448E27D1D849FEB003ED350 /* Main.storyboard */, + 5448E2801D849FEB003ED350 /* Assets.xcassets */, + 5448E2821D849FEB003ED350 /* LaunchScreen.storyboard */, + 5448E2851D849FEB003ED350 /* Info.plist */, + ); + path = tap_counter; + sourceTree = ""; + }; + 5448E28D1D849FEB003ED350 /* tap_counterTests */ = { + isa = PBXGroup; + children = ( + 5448E28E1D849FEB003ED350 /* tap_counterTests.swift */, + 5448E2901D849FEB003ED350 /* Info.plist */, + ); + path = tap_counterTests; + sourceTree = ""; + }; + 5448E2981D849FEB003ED350 /* tap_counterUITests */ = { + isa = PBXGroup; + children = ( + 5448E2991D849FEB003ED350 /* tap_counterUITests.swift */, + 5448E29B1D849FEB003ED350 /* Info.plist */, + ); + path = tap_counterUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 5448E2751D849FEB003ED350 /* tap_counter */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5448E29E1D849FEB003ED350 /* Build configuration list for PBXNativeTarget "tap_counter" */; + buildPhases = ( + 5448E2721D849FEB003ED350 /* Sources */, + 5448E2731D849FEB003ED350 /* Frameworks */, + 5448E2741D849FEB003ED350 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tap_counter; + productName = tap_counter; + productReference = 5448E2761D849FEB003ED350 /* tap_counter.app */; + productType = "com.apple.product-type.application"; + }; + 5448E2891D849FEB003ED350 /* tap_counterTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5448E2A11D849FEB003ED350 /* Build configuration list for PBXNativeTarget "tap_counterTests" */; + buildPhases = ( + 5448E2861D849FEB003ED350 /* Sources */, + 5448E2871D849FEB003ED350 /* Frameworks */, + 5448E2881D849FEB003ED350 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 5448E28C1D849FEB003ED350 /* PBXTargetDependency */, + ); + name = tap_counterTests; + productName = tap_counterTests; + productReference = 5448E28A1D849FEB003ED350 /* tap_counterTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 5448E2941D849FEB003ED350 /* tap_counterUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5448E2A41D849FEB003ED350 /* Build configuration list for PBXNativeTarget "tap_counterUITests" */; + buildPhases = ( + 5448E2911D849FEB003ED350 /* Sources */, + 5448E2921D849FEB003ED350 /* Frameworks */, + 5448E2931D849FEB003ED350 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 5448E2971D849FEB003ED350 /* PBXTargetDependency */, + ); + name = tap_counterUITests; + productName = tap_counterUITests; + productReference = 5448E2951D849FEB003ED350 /* tap_counterUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 5448E26E1D849FEB003ED350 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = mishaparadising; + TargetAttributes = { + 5448E2751D849FEB003ED350 = { + CreatedOnToolsVersion = 7.3.1; + }; + 5448E2891D849FEB003ED350 = { + CreatedOnToolsVersion = 7.3.1; + TestTargetID = 5448E2751D849FEB003ED350; + }; + 5448E2941D849FEB003ED350 = { + CreatedOnToolsVersion = 7.3.1; + TestTargetID = 5448E2751D849FEB003ED350; + }; + }; + }; + buildConfigurationList = 5448E2711D849FEB003ED350 /* Build configuration list for PBXProject "tap_counter" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 5448E26D1D849FEB003ED350; + productRefGroup = 5448E2771D849FEB003ED350 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5448E2751D849FEB003ED350 /* tap_counter */, + 5448E2891D849FEB003ED350 /* tap_counterTests */, + 5448E2941D849FEB003ED350 /* tap_counterUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 5448E2741D849FEB003ED350 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5448E2841D849FEB003ED350 /* LaunchScreen.storyboard in Resources */, + 5448E2811D849FEB003ED350 /* Assets.xcassets in Resources */, + 5448E27F1D849FEB003ED350 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5448E2881D849FEB003ED350 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5448E2931D849FEB003ED350 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5448E2721D849FEB003ED350 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5448E27C1D849FEB003ED350 /* ViewController.swift in Sources */, + 5448E27A1D849FEB003ED350 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5448E2861D849FEB003ED350 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5448E28F1D849FEB003ED350 /* tap_counterTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5448E2911D849FEB003ED350 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5448E29A1D849FEB003ED350 /* tap_counterUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 5448E28C1D849FEB003ED350 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 5448E2751D849FEB003ED350 /* tap_counter */; + targetProxy = 5448E28B1D849FEB003ED350 /* PBXContainerItemProxy */; + }; + 5448E2971D849FEB003ED350 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 5448E2751D849FEB003ED350 /* tap_counter */; + targetProxy = 5448E2961D849FEB003ED350 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 5448E27D1D849FEB003ED350 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 5448E27E1D849FEB003ED350 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 5448E2821D849FEB003ED350 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 5448E2831D849FEB003ED350 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 5448E29C1D849FEB003ED350 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 5448E29D1D849FEB003ED350 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "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 = gnu99; + 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 = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 5448E29F1D849FEB003ED350 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = tap_counter/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "mishaparadising.tap-counter"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 5448E2A01D849FEB003ED350 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = tap_counter/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "mishaparadising.tap-counter"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 5448E2A21D849FEB003ED350 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = tap_counterTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "mishaparadising.tap-counterTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tap_counter.app/tap_counter"; + }; + name = Debug; + }; + 5448E2A31D849FEB003ED350 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = tap_counterTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "mishaparadising.tap-counterTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tap_counter.app/tap_counter"; + }; + name = Release; + }; + 5448E2A51D849FEB003ED350 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = tap_counterUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "mishaparadising.tap-counterUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = tap_counter; + }; + name = Debug; + }; + 5448E2A61D849FEB003ED350 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = tap_counterUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "mishaparadising.tap-counterUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = tap_counter; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5448E2711D849FEB003ED350 /* Build configuration list for PBXProject "tap_counter" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5448E29C1D849FEB003ED350 /* Debug */, + 5448E29D1D849FEB003ED350 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5448E29E1D849FEB003ED350 /* Build configuration list for PBXNativeTarget "tap_counter" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5448E29F1D849FEB003ED350 /* Debug */, + 5448E2A01D849FEB003ED350 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 5448E2A11D849FEB003ED350 /* Build configuration list for PBXNativeTarget "tap_counterTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5448E2A21D849FEB003ED350 /* Debug */, + 5448E2A31D849FEB003ED350 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 5448E2A41D849FEB003ED350 /* Build configuration list for PBXNativeTarget "tap_counterUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5448E2A51D849FEB003ED350 /* Debug */, + 5448E2A61D849FEB003ED350 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 5448E26E1D849FEB003ED350 /* Project object */; +} diff --git a/tap_counter/AppDelegate.swift b/tap_counter/AppDelegate.swift new file mode 100644 index 0000000..68785f6 --- /dev/null +++ b/tap_counter/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// tap_counter +// +// Created by Michail on 9/10/16. +// Copyright © 2016 mishaparadising. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + // START HERE + 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 throttle down OpenGL ES frame rates. 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 inactive 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/tap_counter/Assets.xcassets/AppIcon.appiconset/Contents.json b/tap_counter/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..36d2c80 --- /dev/null +++ b/tap_counter/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "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" : "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" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/tap_counter/Base.lproj/LaunchScreen.storyboard b/tap_counter/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..5bc8b47 --- /dev/null +++ b/tap_counter/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tap_counter/Base.lproj/Main.storyboard b/tap_counter/Base.lproj/Main.storyboard new file mode 100644 index 0000000..91b4337 --- /dev/null +++ b/tap_counter/Base.lproj/Main.storyboard @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tap_counter/Info.plist b/tap_counter/Info.plist new file mode 100644 index 0000000..40c6215 --- /dev/null +++ b/tap_counter/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/tap_counter/ViewController.swift b/tap_counter/ViewController.swift new file mode 100644 index 0000000..ccadc86 --- /dev/null +++ b/tap_counter/ViewController.swift @@ -0,0 +1,55 @@ +// +// ViewController.swift +// tap_counter +// +// Created by Michail on 9/10/16. +// Copyright © 2016 mishaparadising. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + var counter = 0; + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + + tapCounter.text = String(counter); + + self.navigationItem.hidesBackButton = true; + + let resetButton = UIBarButtonItem(title: "Reset", style: UIBarButtonItemStyle.Bordered, target: self, action: Selector("resetButton")) + self.navigationItem.leftBarButtonItem = resetButton; + + let decreaseByOneButton = UIBarButtonItem(title: "Undo", style: UIBarButtonItemStyle.Bordered, target: self, action: Selector("decreaseByOne")) + self.navigationItem.rightBarButtonItem = decreaseByOneButton; + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + @IBOutlet weak var tapCounter: UILabel!; + + @IBAction func tapButton(sender: UIButton) { + counter += 1; + tapCounter.text = String(counter); + } + + func resetButton() { + counter = 0; + tapCounter.text = String(counter); + } + + func decreaseByOne() { + if(counter > 0) { + counter -= 1; + } + + tapCounter.text = String(counter); + } +} + diff --git a/tap_counterTests/Info.plist b/tap_counterTests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/tap_counterTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/tap_counterTests/tap_counterTests.swift b/tap_counterTests/tap_counterTests.swift new file mode 100644 index 0000000..fbe00ee --- /dev/null +++ b/tap_counterTests/tap_counterTests.swift @@ -0,0 +1,36 @@ +// +// tap_counterTests.swift +// tap_counterTests +// +// Created by Michail on 9/10/16. +// Copyright © 2016 mishaparadising. All rights reserved. +// + +import XCTest +@testable import tap_counter + +class tap_counterTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/tap_counterUITests/Info.plist b/tap_counterUITests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/tap_counterUITests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/tap_counterUITests/tap_counterUITests.swift b/tap_counterUITests/tap_counterUITests.swift new file mode 100644 index 0000000..61381ea --- /dev/null +++ b/tap_counterUITests/tap_counterUITests.swift @@ -0,0 +1,36 @@ +// +// tap_counterUITests.swift +// tap_counterUITests +// +// Created by Michail on 9/10/16. +// Copyright © 2016 mishaparadising. All rights reserved. +// + +import XCTest + +class tap_counterUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} From deabb39c2c6a0abb127acd7681ee74e990769805 Mon Sep 17 00:00:00 2001 From: mmalikov Date: Mon, 12 Sep 2016 02:27:34 +0300 Subject: [PATCH 2/3] Add mark comment. Remove navigation bar. Add reset and undo button and link them to tap handlers --- tap_counter/ViewController.swift | 33 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/tap_counter/ViewController.swift b/tap_counter/ViewController.swift index ccadc86..e1c0b6a 100644 --- a/tap_counter/ViewController.swift +++ b/tap_counter/ViewController.swift @@ -10,46 +10,41 @@ import UIKit class ViewController: UIViewController { + // MARK: Outlets + @IBOutlet weak var tapCounterLabel: UILabel!; + + // MARK: Properties var counter = 0; + // MARK: Init override func viewDidLoad() { super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - - tapCounter.text = String(counter); - - self.navigationItem.hidesBackButton = true; - let resetButton = UIBarButtonItem(title: "Reset", style: UIBarButtonItemStyle.Bordered, target: self, action: Selector("resetButton")) - self.navigationItem.leftBarButtonItem = resetButton; - - let decreaseByOneButton = UIBarButtonItem(title: "Undo", style: UIBarButtonItemStyle.Bordered, target: self, action: Selector("decreaseByOne")) - self.navigationItem.rightBarButtonItem = decreaseByOneButton; + tapCounterLabel.text = String(counter); } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. } - - @IBOutlet weak var tapCounter: UILabel!; - @IBAction func tapButton(sender: UIButton) { + + // MARK: Actions + @IBAction func tapButtonTapped(sender: UIButton) { counter += 1; - tapCounter.text = String(counter); + tapCounterLabel.text = String(counter); } - func resetButton() { + @IBAction func resetBarButtonTapped(sender: UIButton) { counter = 0; - tapCounter.text = String(counter); + tapCounterLabel.text = String(counter); } - func decreaseByOne() { + @IBAction func undoBarButtonTapped(sender: UIButton) { if(counter > 0) { counter -= 1; } - tapCounter.text = String(counter); + tapCounterLabel.text = String(counter); } } From 91ed18ca6de6daf5a8502e8a3066ab82af673fcb Mon Sep 17 00:00:00 2001 From: mmalikov Date: Mon, 12 Sep 2016 02:27:54 +0300 Subject: [PATCH 3/3] Update storyboard accordingly design --- tap_counter/Base.lproj/Main.storyboard | 68 ++++++++++++++------------ 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/tap_counter/Base.lproj/Main.storyboard b/tap_counter/Base.lproj/Main.storyboard index 91b4337..b3193fd 100644 --- a/tap_counter/Base.lproj/Main.storyboard +++ b/tap_counter/Base.lproj/Main.storyboard @@ -1,11 +1,12 @@ - + + - + @@ -17,57 +18,64 @@ + - + + + + + + + - - + - - - - - - - - - - - - - - - - - - - +