diff --git a/AirDropAnimation/AnimationChallengeTwo.xcodeproj/project.pbxproj b/AirDropAnimation/AnimationChallengeTwo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..82288a8 --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo.xcodeproj/project.pbxproj @@ -0,0 +1,350 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 0BA600812894D01A008CA1F8 /* AnimationChallengeTwoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BA600802894D01A008CA1F8 /* AnimationChallengeTwoApp.swift */; }; + 0BA600832894D01A008CA1F8 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BA600822894D01A008CA1F8 /* ContentView.swift */; }; + 0BA600852894D01C008CA1F8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0BA600842894D01C008CA1F8 /* Assets.xcassets */; }; + 0BA600882894D01C008CA1F8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0BA600872894D01C008CA1F8 /* Preview Assets.xcassets */; }; + 0BA600912894D048008CA1F8 /* AirDropView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BA600902894D048008CA1F8 /* AirDropView.swift */; }; + 0BA600932894D9D1008CA1F8 /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BA600922894D9D1008CA1F8 /* Helper.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0BA6007D2894D01A008CA1F8 /* AnimationChallengeTwo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AnimationChallengeTwo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0BA600802894D01A008CA1F8 /* AnimationChallengeTwoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationChallengeTwoApp.swift; sourceTree = ""; }; + 0BA600822894D01A008CA1F8 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 0BA600842894D01C008CA1F8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0BA600872894D01C008CA1F8 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 0BA600902894D048008CA1F8 /* AirDropView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AirDropView.swift; sourceTree = ""; }; + 0BA600922894D9D1008CA1F8 /* Helper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Helper.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0BA6007A2894D01A008CA1F8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0BA600742894D01A008CA1F8 = { + isa = PBXGroup; + children = ( + 0BA6007F2894D01A008CA1F8 /* AnimationChallengeTwo */, + 0BA6007E2894D01A008CA1F8 /* Products */, + ); + sourceTree = ""; + }; + 0BA6007E2894D01A008CA1F8 /* Products */ = { + isa = PBXGroup; + children = ( + 0BA6007D2894D01A008CA1F8 /* AnimationChallengeTwo.app */, + ); + name = Products; + sourceTree = ""; + }; + 0BA6007F2894D01A008CA1F8 /* AnimationChallengeTwo */ = { + isa = PBXGroup; + children = ( + 0BA600802894D01A008CA1F8 /* AnimationChallengeTwoApp.swift */, + 0BA600822894D01A008CA1F8 /* ContentView.swift */, + 0BA600902894D048008CA1F8 /* AirDropView.swift */, + 0BA600922894D9D1008CA1F8 /* Helper.swift */, + 0BA600842894D01C008CA1F8 /* Assets.xcassets */, + 0BA600862894D01C008CA1F8 /* Preview Content */, + ); + path = AnimationChallengeTwo; + sourceTree = ""; + }; + 0BA600862894D01C008CA1F8 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 0BA600872894D01C008CA1F8 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0BA6007C2894D01A008CA1F8 /* AnimationChallengeTwo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0BA6008B2894D01C008CA1F8 /* Build configuration list for PBXNativeTarget "AnimationChallengeTwo" */; + buildPhases = ( + 0BA600792894D01A008CA1F8 /* Sources */, + 0BA6007A2894D01A008CA1F8 /* Frameworks */, + 0BA6007B2894D01A008CA1F8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AnimationChallengeTwo; + productName = AnimationChallengeTwo; + productReference = 0BA6007D2894D01A008CA1F8 /* AnimationChallengeTwo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0BA600752894D01A008CA1F8 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1400; + LastUpgradeCheck = 1400; + TargetAttributes = { + 0BA6007C2894D01A008CA1F8 = { + CreatedOnToolsVersion = 14.0; + }; + }; + }; + buildConfigurationList = 0BA600782894D01A008CA1F8 /* Build configuration list for PBXProject "AnimationChallengeTwo" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 0BA600742894D01A008CA1F8; + productRefGroup = 0BA6007E2894D01A008CA1F8 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0BA6007C2894D01A008CA1F8 /* AnimationChallengeTwo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 0BA6007B2894D01A008CA1F8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0BA600882894D01C008CA1F8 /* Preview Assets.xcassets in Resources */, + 0BA600852894D01C008CA1F8 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0BA600792894D01A008CA1F8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0BA600832894D01A008CA1F8 /* ContentView.swift in Sources */, + 0BA600812894D01A008CA1F8 /* AnimationChallengeTwoApp.swift in Sources */, + 0BA600912894D048008CA1F8 /* AirDropView.swift in Sources */, + 0BA600932894D9D1008CA1F8 /* Helper.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 0BA600892894D01C008CA1F8 /* 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 = 16.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 0BA6008A2894D01C008CA1F8 /* 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 = 16.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0BA6008C2894D01C008CA1F8 /* 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 = "\"AnimationChallengeTwo/Preview Content\""; + 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 = com.newOne.Test.AnimationChallengeTwo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 0BA6008D2894D01C008CA1F8 /* 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 = "\"AnimationChallengeTwo/Preview Content\""; + 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 = com.newOne.Test.AnimationChallengeTwo; + 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 */ + 0BA600782894D01A008CA1F8 /* Build configuration list for PBXProject "AnimationChallengeTwo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0BA600892894D01C008CA1F8 /* Debug */, + 0BA6008A2894D01C008CA1F8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0BA6008B2894D01C008CA1F8 /* Build configuration list for PBXNativeTarget "AnimationChallengeTwo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0BA6008C2894D01C008CA1F8 /* Debug */, + 0BA6008D2894D01C008CA1F8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0BA600752894D01A008CA1F8 /* Project object */; +} diff --git a/AirDropAnimation/AnimationChallengeTwo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/AirDropAnimation/AnimationChallengeTwo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/AirDropAnimation/AnimationChallengeTwo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/AirDropAnimation/AnimationChallengeTwo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/AirDropAnimation/AnimationChallengeTwo/AirDropView.swift b/AirDropAnimation/AnimationChallengeTwo/AirDropView.swift new file mode 100644 index 0000000..828a73d --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo/AirDropView.swift @@ -0,0 +1,138 @@ +// +// AirDropView.swift +// AnimationChallengeTwo +// +// Created by QBuser on 30/07/22. +// + +import SwiftUI + +struct AirDropView: View { + @State private var completionAmount = 0.0 + @State var status: AirDropSates = .receive + @State var isTimerRunning: Bool = false + + let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect() + + var body: some View { + ZStack { + Color.black.ignoresSafeArea(.all) + VStack { + LoaderView(completionAmount: $completionAmount) + NameView(status: $status) + } + .onReceive(timer) { _ in + if status == .sending { + if completionAmount >= 1.0 { + status = .sent + self.timer.upstream.connect().cancel() + } else { + completionAmount += 0.1 + } + } + } + .onAppear() { + DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) { + status = .waiting + DispatchQueue.main.asyncAfter(deadline: .now() + 3.5) { + isTimerRunning = true + status = .sending + } + } + + } + } + } +} + +struct AirDropView_Previews: PreviewProvider { + static var previews: some View { + AirDropView() + } +} + +struct LoaderView: View { + @Binding var completionAmount: Double + var body: some View { + ZStack { + Image(systemName: "person.circle.fill") + .resizable() + .renderingMode(.template) + .foregroundColor(imageColor) + .frame(width: 190, height: 190) + ZStack { + Circle() + .stroke(loaderColor, lineWidth: 6) + .frame(width: 200, height: 200) + Circle() + .trim(from: 0, to: completionAmount) + .stroke(.blue, lineWidth: 6) + .frame(width: 200, height: 200) + .rotationEffect(.degrees(-90)) + .animation(Animation.easeInOut(duration: 1), value: completionAmount) + } + } + } +} + +struct NameView: View { + @Binding var status: AirDropSates + @State private var blinking: Bool = false + var body: some View { + VStack(spacing: 5.0) { + Text("iPhone") + .foregroundColor(.white) + .font(.title3) + titleView(status: status) + } + } + + @ViewBuilder + private func titleView(status: AirDropSates) -> some View { + switch status { + case .waiting: + BlinkView(title: status.rawValue) + case .receive: + TitleView(title: status.rawValue, + color: .white) + case .sent: + TitleView(title: status.rawValue, + color: .blue) + case .sending: + TitleView(title: status.rawValue, + color: .white) + } + } +} +struct TitleView: View { + @State var title: String + @State var color: Color = .white + var body: some View { + Text(title) + .font(.title3) + .foregroundColor(color) + } +} +struct BlinkView: View { + @State private var blinking: Bool = false + @State var title: String + var body: some View { + Text("Waiting...") + .font(.title3) + .foregroundColor(loaderColor) + .opacity(blinking ? 0 : 1) + .onAppear { + withAnimation(.easeOut(duration: 0.75).repeatForever()) { + blinking = true + } + } + } +} + + +enum AirDropSates: String { + case receive = "From Amos" + case waiting = "Waiting..." + case sending = "Sending..." + case sent = "Sent" +} diff --git a/AirDropAnimation/AnimationChallengeTwo/AnimationChallengeTwoApp.swift b/AirDropAnimation/AnimationChallengeTwo/AnimationChallengeTwoApp.swift new file mode 100644 index 0000000..199bb98 --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo/AnimationChallengeTwoApp.swift @@ -0,0 +1,17 @@ +// +// AnimationChallengeTwoApp.swift +// AnimationChallengeTwo +// +// Created by QBuser on 30/07/22. +// + +import SwiftUI + +@main +struct AnimationChallengeTwoApp: App { + var body: some Scene { + WindowGroup { + AirDropView() + } + } +} diff --git a/AirDropAnimation/AnimationChallengeTwo/Assets.xcassets/AccentColor.colorset/Contents.json b/AirDropAnimation/AnimationChallengeTwo/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AirDropAnimation/AnimationChallengeTwo/Assets.xcassets/AppIcon.appiconset/Contents.json b/AirDropAnimation/AnimationChallengeTwo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AirDropAnimation/AnimationChallengeTwo/Assets.xcassets/Contents.json b/AirDropAnimation/AnimationChallengeTwo/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AirDropAnimation/AnimationChallengeTwo/ContentView.swift b/AirDropAnimation/AnimationChallengeTwo/ContentView.swift new file mode 100644 index 0000000..8012a20 --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo/ContentView.swift @@ -0,0 +1,25 @@ +// +// ContentView.swift +// AnimationChallengeTwo +// +// Created by QBuser on 30/07/22. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world!") + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/AirDropAnimation/AnimationChallengeTwo/Helper.swift b/AirDropAnimation/AnimationChallengeTwo/Helper.swift new file mode 100644 index 0000000..a615045 --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo/Helper.swift @@ -0,0 +1,12 @@ +// +// Helper.swift +// AnimationChallengeTwo +// +// Created by QBuser on 30/07/22. +// + +import Foundation +import SwiftUI + +let imageColor = Color(red: 152 / 255, green: 155 / 255, blue: 154 / 255) +let loaderColor = Color(red: 106 / 255, green: 106 / 255, blue: 106 / 255) diff --git a/AirDropAnimation/AnimationChallengeTwo/Preview Content/Preview Assets.xcassets/Contents.json b/AirDropAnimation/AnimationChallengeTwo/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/AirDropAnimation/AnimationChallengeTwo/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +}