diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..c6dd613 Binary files /dev/null and b/.DS_Store differ diff --git a/MediumCumulativeClap/.DS_Store b/MediumCumulativeClap/.DS_Store new file mode 100644 index 0000000..f25b13b Binary files /dev/null and b/MediumCumulativeClap/.DS_Store differ diff --git a/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.pbxproj b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3953282 --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.pbxproj @@ -0,0 +1,348 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 4B185E86281568250044B6D3 /* MediumCumulativeClapApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B185E85281568250044B6D3 /* MediumCumulativeClapApp.swift */; }; + 4B185E88281568250044B6D3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B185E87281568250044B6D3 /* ContentView.swift */; }; + 4B185E8A281568260044B6D3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B185E89281568260044B6D3 /* Assets.xcassets */; }; + 4B185E8D281568260044B6D3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B185E8C281568260044B6D3 /* Preview Assets.xcassets */; }; + 4BCA1A7C282407F00033EEA1 /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BCA1A7B282407F00033EEA1 /* SplashView.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 4B185E82281568250044B6D3 /* MediumCumulativeClap.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MediumCumulativeClap.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4B185E85281568250044B6D3 /* MediumCumulativeClapApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediumCumulativeClapApp.swift; sourceTree = ""; }; + 4B185E87281568250044B6D3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 4B185E89281568260044B6D3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 4B185E8C281568260044B6D3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 4BCA1A7B282407F00033EEA1 /* SplashView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4B185E7F281568250044B6D3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4B185E79281568250044B6D3 = { + isa = PBXGroup; + children = ( + 4B185E84281568250044B6D3 /* MediumCumulativeClap */, + 4B185E83281568250044B6D3 /* Products */, + ); + sourceTree = ""; + }; + 4B185E83281568250044B6D3 /* Products */ = { + isa = PBXGroup; + children = ( + 4B185E82281568250044B6D3 /* MediumCumulativeClap.app */, + ); + name = Products; + sourceTree = ""; + }; + 4B185E84281568250044B6D3 /* MediumCumulativeClap */ = { + isa = PBXGroup; + children = ( + 4B185E85281568250044B6D3 /* MediumCumulativeClapApp.swift */, + 4B185E87281568250044B6D3 /* ContentView.swift */, + 4BCA1A7B282407F00033EEA1 /* SplashView.swift */, + 4B185E89281568260044B6D3 /* Assets.xcassets */, + 4B185E8B281568260044B6D3 /* Preview Content */, + ); + path = MediumCumulativeClap; + sourceTree = ""; + }; + 4B185E8B281568260044B6D3 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 4B185E8C281568260044B6D3 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 4B185E81281568250044B6D3 /* MediumCumulativeClap */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4B185E90281568260044B6D3 /* Build configuration list for PBXNativeTarget "MediumCumulativeClap" */; + buildPhases = ( + 4B185E7E281568250044B6D3 /* Sources */, + 4B185E7F281568250044B6D3 /* Frameworks */, + 4B185E80281568250044B6D3 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MediumCumulativeClap; + productName = MediumCumulativeClap; + productReference = 4B185E82281568250044B6D3 /* MediumCumulativeClap.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 4B185E7A281568250044B6D3 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1330; + LastUpgradeCheck = 1330; + TargetAttributes = { + 4B185E81281568250044B6D3 = { + CreatedOnToolsVersion = 13.3; + }; + }; + }; + buildConfigurationList = 4B185E7D281568250044B6D3 /* Build configuration list for PBXProject "MediumCumulativeClap" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 4B185E79281568250044B6D3; + productRefGroup = 4B185E83281568250044B6D3 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4B185E81281568250044B6D3 /* MediumCumulativeClap */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4B185E80281568250044B6D3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4B185E8D281568260044B6D3 /* Preview Assets.xcassets in Resources */, + 4B185E8A281568260044B6D3 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4B185E7E281568250044B6D3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4B185E88281568250044B6D3 /* ContentView.swift in Sources */, + 4B185E86281568250044B6D3 /* MediumCumulativeClapApp.swift in Sources */, + 4BCA1A7C282407F00033EEA1 /* SplashView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 4B185E8E281568260044B6D3 /* 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++17"; + 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + 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 = 15.4; + 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; + }; + 4B185E8F281568260044B6D3 /* 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++17"; + 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + 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 = 15.4; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 4B185E91281568260044B6D3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"MediumCumulativeClap/Preview Content\""; + DEVELOPMENT_TEAM = 5BXN67M73D; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = Stream.MediumCumulativeClap; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 4B185E92281568260044B6D3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"MediumCumulativeClap/Preview Content\""; + DEVELOPMENT_TEAM = 5BXN67M73D; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = Stream.MediumCumulativeClap; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4B185E7D281568250044B6D3 /* Build configuration list for PBXProject "MediumCumulativeClap" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4B185E8E281568260044B6D3 /* Debug */, + 4B185E8F281568260044B6D3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4B185E90281568260044B6D3 /* Build configuration list for PBXNativeTarget "MediumCumulativeClap" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4B185E91281568260044B6D3 /* Debug */, + 4B185E92281568260044B6D3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 4B185E7A281568250044B6D3 /* Project object */; +} diff --git a/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.xcworkspace/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/UserInterfaceState.xcuserstate b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.xcworkspace/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..38aef32 Binary files /dev/null and b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/project.xcworkspace/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/xcschemes/xcschememanagement.plist b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..f7e8736 --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap.xcodeproj/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + MediumCumulativeClap.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/MediumCumulativeClap/MediumCumulativeClap/Assets.xcassets/AccentColor.colorset/Contents.json b/MediumCumulativeClap/MediumCumulativeClap/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MediumCumulativeClap/MediumCumulativeClap/Assets.xcassets/AppIcon.appiconset/Contents.json b/MediumCumulativeClap/MediumCumulativeClap/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..5a3257a --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MediumCumulativeClap/MediumCumulativeClap/Assets.xcassets/Contents.json b/MediumCumulativeClap/MediumCumulativeClap/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MediumCumulativeClap/MediumCumulativeClap/ContentView.swift b/MediumCumulativeClap/MediumCumulativeClap/ContentView.swift new file mode 100644 index 0000000..e5c8c36 --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap/ContentView.swift @@ -0,0 +1,73 @@ +// +// ContentView.swift +// Medium's Cumulative Clap Reaction +// +// Created by getstream.io +// + +import SwiftUI + +struct ContentView: View { + @State private var didClap = 4 + @State private var moving = false + @State private var showSplash = false + + var body: some View { + VStack { + ZStack { + Circle() + .frame(width: 54, height: 54) + .foregroundColor(.green) + .opacity(0.8) + + Text("+") + Text("\(didClap)") + + // Circular splash + SplashView() + .scaleEffect(showSplash ? 1 : 0) + .rotationEffect(.degrees(showSplash ? 30 : -15)) + } + .opacity(moving ? 1 : 0) + .offset(y: moving ? 0 : 50) + + HStack { + Image(systemName: "hands.clap.fill") + .font(.largeTitle) + .onTapGesture { + didClap += 1 + withAnimation(.easeOut(duration: 0.5).repeatCount(1, autoreverses: false)){ + moving = true + } + + withAnimation(.easeInOut(duration: 0.6).delay(0.6).repeatCount(1, autoreverses: false)){ + moving = false + } + + // Try different easings + /* + withAnimation(.timingCurve(0.68, -0.6, 0.32, 1.6)) { + showSplash = true + } + */ + withAnimation(.easeOut) { + showSplash = true + } + + withAnimation(.easeOut(duration: 0.05).delay(0.6).repeatCount(1, autoreverses: false)){ + showSplash = false + } + + } + + Text("\(didClap)") + } + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + .preferredColorScheme(.dark) + } +} diff --git a/MediumCumulativeClap/MediumCumulativeClap/MediumCumulativeClapApp.swift b/MediumCumulativeClap/MediumCumulativeClap/MediumCumulativeClapApp.swift new file mode 100644 index 0000000..60add9a --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap/MediumCumulativeClapApp.swift @@ -0,0 +1,17 @@ +// +// MediumCumulativeClapApp.swift +// MediumCumulativeClap +// +// Created by amos.gyamfi@getstream.io on 24.4.2022. +// + +import SwiftUI + +@main +struct MediumCumulativeClapApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/MediumCumulativeClap/MediumCumulativeClap/Preview Content/Preview Assets.xcassets/Contents.json b/MediumCumulativeClap/MediumCumulativeClap/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MediumCumulativeClap/MediumCumulativeClap/SplashView.swift b/MediumCumulativeClap/MediumCumulativeClap/SplashView.swift new file mode 100644 index 0000000..60a284a --- /dev/null +++ b/MediumCumulativeClap/MediumCumulativeClap/SplashView.swift @@ -0,0 +1,55 @@ +// +// SplashView.swift +// TwitterLikeReaction +// +// + +import SwiftUI + +struct SplashView: View { + @State private var innerGap = true + let streamBlue = Color(#colorLiteral(red: 0, green: 0.3725490196, blue: 1, alpha: 1)) + + var body: some View { + ZStack { + ForEach(0..<8) { + Circle() + .foregroundStyle( + .linearGradient( + colors: [.green, .red], + startPoint: .bottom, + endPoint: .leading + ) + ) + .frame(width: 6, height: 6) + .offset(x: innerGap ? 50 : 0) + .rotationEffect(.degrees(Double($0) * 45)) + .hueRotation(.degrees(300)) + } + + ForEach(0..<8) { + Image(systemName: "triangle.fill") + .font(.caption2) + .foregroundStyle( + .linearGradient( + colors: [.green, streamBlue], + startPoint: .bottom, + endPoint: .leading + ) + ) + .offset(x: innerGap ? 52 : 0) + .rotationEffect(.degrees(Double($0) * 45)) + .hueRotation(.degrees(120)) + + } + .rotationEffect(.degrees(12)) + } + } +} + +struct SplashView_Previews: PreviewProvider { + static var previews: some View { + SplashView() + .preferredColorScheme(.dark) + } +} diff --git a/TwitterLikeReaction/.DS_Store b/TwitterLikeReaction/.DS_Store new file mode 100644 index 0000000..4470fd5 Binary files /dev/null and b/TwitterLikeReaction/.DS_Store differ diff --git a/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.pbxproj b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0d89049 --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.pbxproj @@ -0,0 +1,348 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 4B185E6C281567AD0044B6D3 /* TwitterLikeReactionApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B185E6B281567AD0044B6D3 /* TwitterLikeReactionApp.swift */; }; + 4B185E6E281567AD0044B6D3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B185E6D281567AD0044B6D3 /* ContentView.swift */; }; + 4B185E70281567AF0044B6D3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B185E6F281567AF0044B6D3 /* Assets.xcassets */; }; + 4B185E73281567AF0044B6D3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B185E72281567AF0044B6D3 /* Preview Assets.xcassets */; }; + 4BCA1A722822EB840033EEA1 /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BCA1A712822EB840033EEA1 /* SplashView.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 4B185E68281567AD0044B6D3 /* TwitterLikeReaction.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TwitterLikeReaction.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4B185E6B281567AD0044B6D3 /* TwitterLikeReactionApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwitterLikeReactionApp.swift; sourceTree = ""; }; + 4B185E6D281567AD0044B6D3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 4B185E6F281567AF0044B6D3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 4B185E72281567AF0044B6D3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 4BCA1A712822EB840033EEA1 /* SplashView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4B185E65281567AD0044B6D3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4B185E5F281567AD0044B6D3 = { + isa = PBXGroup; + children = ( + 4B185E6A281567AD0044B6D3 /* TwitterLikeReaction */, + 4B185E69281567AD0044B6D3 /* Products */, + ); + sourceTree = ""; + }; + 4B185E69281567AD0044B6D3 /* Products */ = { + isa = PBXGroup; + children = ( + 4B185E68281567AD0044B6D3 /* TwitterLikeReaction.app */, + ); + name = Products; + sourceTree = ""; + }; + 4B185E6A281567AD0044B6D3 /* TwitterLikeReaction */ = { + isa = PBXGroup; + children = ( + 4B185E6B281567AD0044B6D3 /* TwitterLikeReactionApp.swift */, + 4B185E6D281567AD0044B6D3 /* ContentView.swift */, + 4BCA1A712822EB840033EEA1 /* SplashView.swift */, + 4B185E6F281567AF0044B6D3 /* Assets.xcassets */, + 4B185E71281567AF0044B6D3 /* Preview Content */, + ); + path = TwitterLikeReaction; + sourceTree = ""; + }; + 4B185E71281567AF0044B6D3 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 4B185E72281567AF0044B6D3 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 4B185E67281567AD0044B6D3 /* TwitterLikeReaction */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4B185E76281567AF0044B6D3 /* Build configuration list for PBXNativeTarget "TwitterLikeReaction" */; + buildPhases = ( + 4B185E64281567AD0044B6D3 /* Sources */, + 4B185E65281567AD0044B6D3 /* Frameworks */, + 4B185E66281567AD0044B6D3 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TwitterLikeReaction; + productName = TwitterLikeReaction; + productReference = 4B185E68281567AD0044B6D3 /* TwitterLikeReaction.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 4B185E60281567AD0044B6D3 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1330; + LastUpgradeCheck = 1330; + TargetAttributes = { + 4B185E67281567AD0044B6D3 = { + CreatedOnToolsVersion = 13.3; + }; + }; + }; + buildConfigurationList = 4B185E63281567AD0044B6D3 /* Build configuration list for PBXProject "TwitterLikeReaction" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 4B185E5F281567AD0044B6D3; + productRefGroup = 4B185E69281567AD0044B6D3 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4B185E67281567AD0044B6D3 /* TwitterLikeReaction */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4B185E66281567AD0044B6D3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4B185E73281567AF0044B6D3 /* Preview Assets.xcassets in Resources */, + 4B185E70281567AF0044B6D3 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4B185E64281567AD0044B6D3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4B185E6E281567AD0044B6D3 /* ContentView.swift in Sources */, + 4B185E6C281567AD0044B6D3 /* TwitterLikeReactionApp.swift in Sources */, + 4BCA1A722822EB840033EEA1 /* SplashView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 4B185E74281567AF0044B6D3 /* 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++17"; + 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + 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 = 15.4; + 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; + }; + 4B185E75281567AF0044B6D3 /* 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++17"; + 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + 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 = 15.4; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 4B185E77281567AF0044B6D3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"TwitterLikeReaction/Preview Content\""; + DEVELOPMENT_TEAM = 5BXN67M73D; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = Stream.TwitterLikeReaction; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 4B185E78281567AF0044B6D3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"TwitterLikeReaction/Preview Content\""; + DEVELOPMENT_TEAM = 5BXN67M73D; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = Stream.TwitterLikeReaction; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4B185E63281567AD0044B6D3 /* Build configuration list for PBXProject "TwitterLikeReaction" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4B185E74281567AF0044B6D3 /* Debug */, + 4B185E75281567AF0044B6D3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4B185E76281567AF0044B6D3 /* Build configuration list for PBXNativeTarget "TwitterLikeReaction" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4B185E77281567AF0044B6D3 /* Debug */, + 4B185E78281567AF0044B6D3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 4B185E60281567AD0044B6D3 /* Project object */; +} diff --git a/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.xcworkspace/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/UserInterfaceState.xcuserstate b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.xcworkspace/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..ad409cd Binary files /dev/null and b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/project.xcworkspace/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/xcschemes/xcschememanagement.plist b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..c98fb8a --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction.xcodeproj/xcuserdata/amos.gyamfigetstream.io.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + TwitterLikeReaction.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/TwitterLikeReaction/TwitterLikeReaction/Assets.xcassets/AccentColor.colorset/Contents.json b/TwitterLikeReaction/TwitterLikeReaction/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TwitterLikeReaction/TwitterLikeReaction/Assets.xcassets/AppIcon.appiconset/Contents.json b/TwitterLikeReaction/TwitterLikeReaction/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..5a3257a --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TwitterLikeReaction/TwitterLikeReaction/Assets.xcassets/Contents.json b/TwitterLikeReaction/TwitterLikeReaction/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TwitterLikeReaction/TwitterLikeReaction/ContentView.swift b/TwitterLikeReaction/TwitterLikeReaction/ContentView.swift new file mode 100644 index 0000000..a11eac9 --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction/ContentView.swift @@ -0,0 +1,85 @@ +// +// ContentView.swift +// Twitter's Like Reaction +// +// Created by getstream.io +// + +import SwiftUI + +struct ContentView: View { + + let streamBlue = Color(#colorLiteral(red: 0, green: 0.3725490196, blue: 1, alpha: 1)) + + // Increament the number of likes by 1 when tapped + @State private var liked: Int = 239 + + // Initial outline heart icon + @State private var heart = Image(systemName: "heart") + @State private var showHeart = false + @State private var showSplash = false + @State private var removeSplash = false + @State private var likedColor = Color(.systemGray) + @State private var removeInnerStroke = false + + var body: some View { + HStack { + ZStack { + heart + .font(.largeTitle) + .foregroundColor(Color(.systemGray)) + + // Inner stroke + Circle() + .strokeBorder(lineWidth: removeInnerStroke ? 0 : 35) + .frame(width: 40, height: 40, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/) + .foregroundColor(Color(.systemPink)) + .scaleEffect(removeInnerStroke ? 1.3 : 0.0) + .hueRotation(.degrees(removeInnerStroke ? 270 : 0)) + + // Filled heart + Image(systemName: "heart.fill") + .font(.largeTitle) + .foregroundColor(streamBlue) + .scaleEffect(showHeart ? 1 : 0) + + // Circular splash + SplashView() + .scaleEffect(showSplash ? 1 : 0) + .opacity(removeSplash ? 0 : 1) + + } + .onTapGesture { + withAnimation(.interpolatingSpring(stiffness: 170, damping: 10).delay(0.1)) { + showHeart = true + } + + withAnimation(.easeIn) { + showSplash = true + } + + withAnimation(.easeOut.delay(0.5)) { + removeSplash = true + } + + withAnimation(.easeOut.delay(0.2)) { + removeInnerStroke = true + } + + liked += 1 + likedColor = streamBlue + }.accessibilityAddTraits(.isButton) + + Text("\(liked)") + .foregroundColor(likedColor) + + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + .preferredColorScheme(.dark) + } +} diff --git a/TwitterLikeReaction/TwitterLikeReaction/Preview Content/Preview Assets.xcassets/Contents.json b/TwitterLikeReaction/TwitterLikeReaction/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TwitterLikeReaction/TwitterLikeReaction/SplashView.swift b/TwitterLikeReaction/TwitterLikeReaction/SplashView.swift new file mode 100644 index 0000000..53d102e --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction/SplashView.swift @@ -0,0 +1,55 @@ +// +// SplashView.swift +// TwitterLikeReaction +// +// + +import SwiftUI + +struct SplashView: View { + @State private var innerGap = true + let streamBlue = Color(#colorLiteral(red: 0, green: 0.3725490196, blue: 1, alpha: 1)) + + var body: some View { + ZStack { + ForEach(0..<8) { + Circle() + .foregroundStyle( + .linearGradient( + colors: [.green, .red], + startPoint: .bottom, + endPoint: .leading + ) + ) + .frame(width: 3, height: 3) + .offset(x: innerGap ? 24 : 0) + .rotationEffect(.degrees(Double($0) * 45)) + .hueRotation(.degrees(300)) + } + + ForEach(0..<8) { + Circle() + .foregroundStyle( + .linearGradient( + colors: [.green, streamBlue], + startPoint: .bottom, + endPoint: .leading + ) + ) + .frame(width: 4, height: 4) + .offset(x: innerGap ? 26 : 0) + .rotationEffect(.degrees(Double($0) * 45)) + .hueRotation(.degrees(60)) + + } + .rotationEffect(.degrees(12)) + } + } +} + +struct SplashView_Previews: PreviewProvider { + static var previews: some View { + SplashView() + .preferredColorScheme(.dark) + } +} diff --git a/TwitterLikeReaction/TwitterLikeReaction/TwitterLikeReactionApp.swift b/TwitterLikeReaction/TwitterLikeReaction/TwitterLikeReactionApp.swift new file mode 100644 index 0000000..28861ab --- /dev/null +++ b/TwitterLikeReaction/TwitterLikeReaction/TwitterLikeReactionApp.swift @@ -0,0 +1,17 @@ +// +// TwitterLikeReactionApp.swift +// TwitterLikeReaction +// +// Created by amos.gyamfi@getstream.io on 24.4.2022. +// + +import SwiftUI + +@main +struct TwitterLikeReactionApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/TwitterLikeReaction/inspiration/.DS_Store b/TwitterLikeReaction/inspiration/.DS_Store new file mode 100644 index 0000000..fe8127b Binary files /dev/null and b/TwitterLikeReaction/inspiration/.DS_Store differ diff --git a/TwitterLikeReaction/inspiration/TwitterLikeDeconstructed.MP4 b/TwitterLikeReaction/inspiration/TwitterLikeDeconstructed.MP4 new file mode 100644 index 0000000..c45e31f Binary files /dev/null and b/TwitterLikeReaction/inspiration/TwitterLikeDeconstructed.MP4 differ