diff --git a/PulseAnimation/PulseAnimation.xcodeproj/project.pbxproj b/PulseAnimation/PulseAnimation.xcodeproj/project.pbxproj new file mode 100644 index 0000000..bd9db4e --- /dev/null +++ b/PulseAnimation/PulseAnimation.xcodeproj/project.pbxproj @@ -0,0 +1,343 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 7F011BEC2608A33400543BD4 /* PulseAnimationApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F011BEB2608A33400543BD4 /* PulseAnimationApp.swift */; }; + 7F011BEE2608A33400543BD4 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F011BED2608A33400543BD4 /* ContentView.swift */; }; + 7F011BF02608A33800543BD4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7F011BEF2608A33800543BD4 /* Assets.xcassets */; }; + 7F011BF32608A33800543BD4 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7F011BF22608A33800543BD4 /* Preview Assets.xcassets */; }; + 7F011BFC2608A3CD00543BD4 /* PJRPulseButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F011BFB2608A3CD00543BD4 /* PJRPulseButton.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 7F011BE82608A33400543BD4 /* PulseAnimation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PulseAnimation.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7F011BEB2608A33400543BD4 /* PulseAnimationApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PulseAnimationApp.swift; sourceTree = ""; }; + 7F011BED2608A33400543BD4 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 7F011BEF2608A33800543BD4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7F011BF22608A33800543BD4 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 7F011BF42608A33800543BD4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7F011BFB2608A3CD00543BD4 /* PJRPulseButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PJRPulseButton.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7F011BE52608A33400543BD4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7F011BDF2608A33400543BD4 = { + isa = PBXGroup; + children = ( + 7F011BEA2608A33400543BD4 /* PulseAnimation */, + 7F011BE92608A33400543BD4 /* Products */, + ); + sourceTree = ""; + }; + 7F011BE92608A33400543BD4 /* Products */ = { + isa = PBXGroup; + children = ( + 7F011BE82608A33400543BD4 /* PulseAnimation.app */, + ); + name = Products; + sourceTree = ""; + }; + 7F011BEA2608A33400543BD4 /* PulseAnimation */ = { + isa = PBXGroup; + children = ( + 7F011BEB2608A33400543BD4 /* PulseAnimationApp.swift */, + 7F011BED2608A33400543BD4 /* ContentView.swift */, + 7F011BFE2608D43F00543BD4 /* New Group */, + 7F011BEF2608A33800543BD4 /* Assets.xcassets */, + 7F011BF42608A33800543BD4 /* Info.plist */, + 7F011BF12608A33800543BD4 /* Preview Content */, + ); + path = PulseAnimation; + sourceTree = ""; + }; + 7F011BF12608A33800543BD4 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 7F011BF22608A33800543BD4 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 7F011BFE2608D43F00543BD4 /* New Group */ = { + isa = PBXGroup; + children = ( + 7F011BFB2608A3CD00543BD4 /* PJRPulseButton.swift */, + ); + path = "New Group"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7F011BE72608A33400543BD4 /* PulseAnimation */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7F011BF72608A33800543BD4 /* Build configuration list for PBXNativeTarget "PulseAnimation" */; + buildPhases = ( + 7F011BE42608A33400543BD4 /* Sources */, + 7F011BE52608A33400543BD4 /* Frameworks */, + 7F011BE62608A33400543BD4 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PulseAnimation; + productName = PulseAnimation; + productReference = 7F011BE82608A33400543BD4 /* PulseAnimation.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7F011BE02608A33400543BD4 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1240; + LastUpgradeCheck = 1240; + TargetAttributes = { + 7F011BE72608A33400543BD4 = { + CreatedOnToolsVersion = 12.4; + }; + }; + }; + buildConfigurationList = 7F011BE32608A33400543BD4 /* Build configuration list for PBXProject "PulseAnimation" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7F011BDF2608A33400543BD4; + productRefGroup = 7F011BE92608A33400543BD4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7F011BE72608A33400543BD4 /* PulseAnimation */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7F011BE62608A33400543BD4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7F011BF32608A33800543BD4 /* Preview Assets.xcassets in Resources */, + 7F011BF02608A33800543BD4 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7F011BE42608A33400543BD4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7F011BEE2608A33400543BD4 /* ContentView.swift in Sources */, + 7F011BEC2608A33400543BD4 /* PulseAnimationApp.swift in Sources */, + 7F011BFC2608A3CD00543BD4 /* PJRPulseButton.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 7F011BF52608A33800543BD4 /* 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_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 = 14.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; + }; + 7F011BF62608A33800543BD4 /* 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_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 = 14.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; + }; + 7F011BF82608A33800543BD4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"PulseAnimation/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = PulseAnimation/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.test.todoapp.PulseAnimation; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 7F011BF92608A33800543BD4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"PulseAnimation/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = PulseAnimation/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.test.todoapp.PulseAnimation; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7F011BE32608A33400543BD4 /* Build configuration list for PBXProject "PulseAnimation" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7F011BF52608A33800543BD4 /* Debug */, + 7F011BF62608A33800543BD4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7F011BF72608A33800543BD4 /* Build configuration list for PBXNativeTarget "PulseAnimation" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7F011BF82608A33800543BD4 /* Debug */, + 7F011BF92608A33800543BD4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7F011BE02608A33400543BD4 /* Project object */; +} diff --git a/PulseAnimation/PulseAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/PulseAnimation/PulseAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/PulseAnimation/PulseAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/PulseAnimation/PulseAnimation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/PulseAnimation/PulseAnimation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/PulseAnimation/PulseAnimation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/PulseAnimation/PulseAnimation.xcodeproj/project.xcworkspace/xcuserdata/paritosh.raval.xcuserdatad/UserInterfaceState.xcuserstate b/PulseAnimation/PulseAnimation.xcodeproj/project.xcworkspace/xcuserdata/paritosh.raval.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..3b1aa7d Binary files /dev/null and b/PulseAnimation/PulseAnimation.xcodeproj/project.xcworkspace/xcuserdata/paritosh.raval.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/PulseAnimation/PulseAnimation.xcodeproj/xcuserdata/paritosh.raval.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/PulseAnimation/PulseAnimation.xcodeproj/xcuserdata/paritosh.raval.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..31a917d --- /dev/null +++ b/PulseAnimation/PulseAnimation.xcodeproj/xcuserdata/paritosh.raval.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/PulseAnimation/PulseAnimation.xcodeproj/xcuserdata/paritosh.raval.xcuserdatad/xcschemes/xcschememanagement.plist b/PulseAnimation/PulseAnimation.xcodeproj/xcuserdata/paritosh.raval.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..86b980c --- /dev/null +++ b/PulseAnimation/PulseAnimation.xcodeproj/xcuserdata/paritosh.raval.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + PulseAnimation.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/PulseAnimation/PulseAnimation/Assets.xcassets/AccentColor.colorset/Contents.json b/PulseAnimation/PulseAnimation/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/PulseAnimation/PulseAnimation/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PulseAnimation/PulseAnimation/Assets.xcassets/AppIcon.appiconset/Contents.json b/PulseAnimation/PulseAnimation/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/PulseAnimation/PulseAnimation/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "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" : "1x", + "size" : "76x76" + }, + { + "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/PulseAnimation/PulseAnimation/Assets.xcassets/Contents.json b/PulseAnimation/PulseAnimation/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/PulseAnimation/PulseAnimation/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PulseAnimation/PulseAnimation/ContentView.swift b/PulseAnimation/PulseAnimation/ContentView.swift new file mode 100644 index 0000000..647d4f4 --- /dev/null +++ b/PulseAnimation/PulseAnimation/ContentView.swift @@ -0,0 +1,59 @@ +// +// ContentView.swift +// PulseAnimation +// +// Created by Paritosh Raval on 22/03/21. +// + +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/*#******************************************************************************************************************** + + You can try different variations like + PJRPulseButton(color: Color.red, systemImageName: "heart.circle.fill", buttonWidth: 48, numberOfOuterCircles: 2, animationDuration: 1) + + *********************************************************************************************************************/ + +import SwiftUI + +struct ContentView: View { + + var body: some View { + EmptyView() + .overlay( + PJRPulseButton() + .padding(.bottom, 15) + .padding(.trailing, 15) + , alignment: .bottomTrailing + ) + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/PulseAnimation/PulseAnimation/Info.plist b/PulseAnimation/PulseAnimation/Info.plist new file mode 100644 index 0000000..efc211a --- /dev/null +++ b/PulseAnimation/PulseAnimation/Info.plist @@ -0,0 +1,50 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + UIApplicationSupportsIndirectInputEvents + + UILaunchScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/PulseAnimation/PulseAnimation/New Group/PJRPulseButton.swift b/PulseAnimation/PulseAnimation/New Group/PJRPulseButton.swift new file mode 100644 index 0000000..b4d0dc0 --- /dev/null +++ b/PulseAnimation/PulseAnimation/New Group/PJRPulseButton.swift @@ -0,0 +1,110 @@ +// +// PJRPulseButton.swift +// PulseAnimation +// +// Created by Paritosh Raval on 22/03/21. +// + +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +import SwiftUI + +// MARK: - Strucutre for Circle +struct CircleData: Hashable { + let width: CGFloat + let opacity: Double +} + +struct PJRPulseButton: View { + + // MARK: - Properties + @State private var isAnimating: Bool = false + var color: Color + var systemImageName: String + var buttonWidth: CGFloat + var numberOfOuterCircles: Int + var animationDuration: Double + var circleArray = [CircleData]() + + + init(color: Color = Color.blue, systemImageName: String = "plus.circle.fill", buttonWidth: CGFloat = 48, numberOfOuterCircles: Int = 2, animationDuration: Double = 1) { + self.color = color + self.systemImageName = systemImageName + self.buttonWidth = buttonWidth + self.numberOfOuterCircles = numberOfOuterCircles + self.animationDuration = animationDuration + + var circleWidth = self.buttonWidth + var opacity = (numberOfOuterCircles > 4) ? 0.40 : 0.20 + + for _ in 0.. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +import SwiftUI + +@main +struct PulseAnimationApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +}