From 9b0c409c615438bb48e6eb03826b1213ef2046ca Mon Sep 17 00:00:00 2001 From: "emre.kartal" Date: Sat, 23 Sep 2023 19:10:24 +0200 Subject: [PATCH] Add SplashScreen :white_check_mark: --- Sources/allin/allin.xcodeproj/project.pbxproj | 5 ++- .../allin/allin/Screens/SplashScreen.swift | 39 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Sources/allin/allin/Screens/SplashScreen.swift diff --git a/Sources/allin/allin.xcodeproj/project.pbxproj b/Sources/allin/allin.xcodeproj/project.pbxproj index 3441376..4f0b26e 100644 --- a/Sources/allin/allin.xcodeproj/project.pbxproj +++ b/Sources/allin/allin.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ D98C4D8E2AB9D440007A6B4D /* TopBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D98C4D8D2AB9D440007A6B4D /* TopBarView.swift */; }; EC46D7DD2ABCCC270030AC04 /* MenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46D7DC2ABCCC270030AC04 /* MenuView.swift */; }; EC46D7DF2ABCE0A20030AC04 /* ParameterMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46D7DE2ABCE0A20030AC04 /* ParameterMenuView.swift */; }; + EC50BF962ABF4D3300197685 /* SplashScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC50BF952ABF4D3300197685 /* SplashScreen.swift */; }; EC87FCD62ABBA24000363986 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCD52ABBA24000363986 /* Extensions.swift */; }; EC87FCD92ABBA60900363986 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCD82ABBA60900363986 /* Colors.swift */; }; EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */; }; @@ -57,6 +58,7 @@ EC0EA7AF2ABDAAD1006BA4A0 /* PlusJakartaSans.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = PlusJakartaSans.ttf; sourceTree = ""; }; EC46D7DC2ABCCC270030AC04 /* MenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MenuView.swift; path = allin/Views/MenuView.swift; sourceTree = SOURCE_ROOT; }; EC46D7DE2ABCE0A20030AC04 /* ParameterMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ParameterMenuView.swift; path = allin/Views/ParameterMenuView.swift; sourceTree = SOURCE_ROOT; }; + EC50BF952ABF4D3300197685 /* SplashScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SplashScreen.swift; path = allin/Screens/SplashScreen.swift; sourceTree = SOURCE_ROOT; }; EC87FCD52ABBA24000363986 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = allin/Extensions/Extensions.swift; sourceTree = SOURCE_ROOT; }; EC87FCD82ABBA60900363986 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Colors.swift; path = allin/Ressources/Colors.swift; sourceTree = SOURCE_ROOT; }; EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TrendingBetCard.swift; path = allin/Views/TrendingBetCard.swift; sourceTree = SOURCE_ROOT; }; @@ -124,7 +126,6 @@ isa = PBXGroup; children = ( EC9A45AE2ABDF47A00125D41 /* Screens */, - EC0EA7B02ABDACED006BA4A0 /* Info.plist */, EC0EA7AD2ABDAAAC006BA4A0 /* Fonts */, EC87FCD72ABBA5F200363986 /* Ressources */, ECF816C72ABB51E300DE30A4 /* Extensions */, @@ -182,6 +183,7 @@ isa = PBXGroup; children = ( EC9A45AF2ABDF4A800125D41 /* HomeScreen.swift */, + EC50BF952ABF4D3300197685 /* SplashScreen.swift */, ); path = Screens; sourceTree = ""; @@ -330,6 +332,7 @@ D98C4D662AB9D017007A6B4D /* ContentView.swift in Sources */, D92EC57C2ABADA2800CCD30E /* CoinCounterView.swift in Sources */, D98C4D8E2AB9D440007A6B4D /* TopBarView.swift in Sources */, + EC50BF962ABF4D3300197685 /* SplashScreen.swift in Sources */, EC9A45B02ABDF4A800125D41 /* HomeScreen.swift in Sources */, EC46D7DF2ABCE0A20030AC04 /* ParameterMenuView.swift in Sources */, D98C4D642AB9D017007A6B4D /* AllInApp.swift in Sources */, diff --git a/Sources/allin/allin/Screens/SplashScreen.swift b/Sources/allin/allin/Screens/SplashScreen.swift new file mode 100644 index 0000000..4c36951 --- /dev/null +++ b/Sources/allin/allin/Screens/SplashScreen.swift @@ -0,0 +1,39 @@ +// +// SplashScreen.swift +// AllIn +// +// Created by étudiant on 23/09/2023. +// + +import SwiftUI + +struct Splash: View { + + @State private var size = 0.7 + @State private var opacity = 0.5 + @State private var rotationAngle: Angle = .degrees(0) + var body: some View { + GeometryReader { geometry in + VStack(alignment: .center) { + Image("Icon") + .resizable() + .frame(width: 80, height: 80) + } + .scaleEffect(size) + .opacity(opacity) + .rotationEffect(rotationAngle) + .onAppear { + withAnimation(.easeIn(duration:1.1)){ + self.size = 1 + self.opacity = 1.00 + self.rotationAngle = .degrees(1080) + } + } + .frame(width: geometry.size.width, height: geometry.size.height) + .background(LinearGradient(gradient: + Gradient(colors:[AllinColor.TopBarColorPink,AllinColor.TopBarColorPink,AllinColor.TopBarColorPurple,AllinColor.TopBarColorBlue,AllinColor.TopBarColorBlue]), + startPoint: .bottomLeading, endPoint: .topTrailing)) + } + } + +}