From da8c17627ce4fc8b05289f586126ddf6d9654052 Mon Sep 17 00:00:00 2001 From: "remi.regnault" Date: Thu, 16 May 2024 17:16:10 +0200 Subject: [PATCH 1/2] :construction: working on title view --- DouShouQi_App/Assets/title-background.png | Bin 0 -> 2935 bytes .../DouShouQi_App.xcodeproj/project.pbxproj | 60 ++++++++++++++++++ .../Components/TitlePageFrame.swift | 36 +++++++++++ 3 files changed, 96 insertions(+) create mode 100644 DouShouQi_App/Assets/title-background.png create mode 100644 DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift diff --git a/DouShouQi_App/Assets/title-background.png b/DouShouQi_App/Assets/title-background.png new file mode 100644 index 0000000000000000000000000000000000000000..dcd3220206783d44b6c165c2aae3b8fd8ea1d434 GIT binary patch literal 2935 zcmV--3yAcIP)%C7iTjIObF)a#u70CblC!G|)=STc zoOp!D!4pN^eN*JvlSL+<6g6+kh zjpYOD$%irq(9GxXxW%Zx*Djlq4L0U&bA5gBmm=pXb7=cc$N*cU;Jy3Css@bz@p-pD zAhMsnH=Z4fVJCJ8AG_^&pRc1#Lv9bWXH5~Gl2fkLFTYBpTU&- z03eOWwe(o03Ec4EB4;UEr(IcUo|OYE0GXtbTfR+ICVenpp*gSh~{TK zyJ^0*WvjD;{J%3`(bYu@L>|9C3nV`OOytwW8LI}9Ck44=j}L)W1RflKM|=Ilj_Hk^ z1B(mWOs^Jj@K3P;Wf%k4`c1%ijtcVO7an&&`==HQ7Roo~51&OaK~RBz!t}+&sQh>W z5-lEF-0Gaw_#rrZc+ghfR^cj8LWCE_kvx= zot&u~tgB}}E?^4>mUZgAw?%gB5!rQ=$P(4k2-U01D!cARM5u=wY}f>9Ai%4oEYxGvxNl4$h zl_MNjs1+2n02GY~kl>TCiH2vam%Q&@@s z1M^3?ZmkOQRUUW$%2Um6;lqy60-I}foIC|ye`a9|V7j3@ zuRZ*%_XMOrShnAUb&{kQ$*Ja%dt-`!+_}oq8?fuN~Q;52@{T(Kpv5q@Kf&IQy%OJ!z^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af..3626663 100644 --- a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj +++ b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj @@ -18,6 +18,13 @@ 645834892BF5FEA000E18321 /* DSQ.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 645834872BF5FEA000E18321 /* DSQ.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 649ABF5B2BF60D78002E8894 /* MainMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649ABF5A2BF60D78002E8894 /* MainMenuView.swift */; }; 649ABF602BF60F2D002E8894 /* MainMenuButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */; }; + 649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */; }; + 649B59A72BF64BA9002BAE38 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 649B59A62BF64BA9002BAE38 /* Colors.xcassets */; }; + 649B59A92BF64C6A002BAE38 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59A82BF64C6A002BAE38 /* Colors.swift */; }; + 649B59AC2BF64E12002BAE38 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 649B59AB2BF64E12002BAE38 /* Images.xcassets */; }; + 649B59AE2BF64EAB002BAE38 /* AppImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59AD2BF64EAB002BAE38 /* AppImages.swift */; }; + 649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59B12BF65392002BAE38 /* TextStyles.swift */; }; + 649B59B42BF653E1002BAE38 /* ViewTitleTextStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59B32BF653E1002BAE38 /* ViewTitleTextStyle.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -66,6 +73,13 @@ 645834872BF5FEA000E18321 /* DSQ.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = DSQ.xcframework; sourceTree = ""; }; 649ABF5A2BF60D78002E8894 /* MainMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuView.swift; sourceTree = ""; }; 649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuButton.swift; sourceTree = ""; }; + 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitlePageFrame.swift; sourceTree = ""; }; + 649B59A62BF64BA9002BAE38 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = ""; }; + 649B59A82BF64C6A002BAE38 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; }; + 649B59AB2BF64E12002BAE38 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 649B59AD2BF64EAB002BAE38 /* AppImages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppImages.swift; sourceTree = ""; }; + 649B59B12BF65392002BAE38 /* TextStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextStyles.swift; sourceTree = ""; }; + 649B59B32BF653E1002BAE38 /* ViewTitleTextStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewTitleTextStyle.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -118,6 +132,7 @@ 6458345A2BF5F92300E18321 /* DouShouQi_App */ = { isa = PBXGroup; children = ( + 649B59A52BF64B1B002BAE38 /* Assets */, 649ABF5E2BF60ED5002E8894 /* Components */, 649ABF592BF60D13002E8894 /* Views */, 645834852BF5FE1400E18321 /* DouShouQi-App-Info.plist */, @@ -174,10 +189,48 @@ isa = PBXGroup; children = ( 649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */, + 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */, ); path = Components; sourceTree = ""; }; + 649B59A52BF64B1B002BAE38 /* Assets */ = { + isa = PBXGroup; + children = ( + 649B59B02BF65360002BAE38 /* TextStyles */, + 649B59AF2BF64F0A002BAE38 /* Colors */, + 649B59AA2BF64DF1002BAE38 /* Images */, + ); + path = Assets; + sourceTree = ""; + }; + 649B59AA2BF64DF1002BAE38 /* Images */ = { + isa = PBXGroup; + children = ( + 649B59AB2BF64E12002BAE38 /* Images.xcassets */, + 649B59AD2BF64EAB002BAE38 /* AppImages.swift */, + ); + path = Images; + sourceTree = ""; + }; + 649B59AF2BF64F0A002BAE38 /* Colors */ = { + isa = PBXGroup; + children = ( + 649B59A62BF64BA9002BAE38 /* Colors.xcassets */, + 649B59A82BF64C6A002BAE38 /* Colors.swift */, + ); + path = Colors; + sourceTree = ""; + }; + 649B59B02BF65360002BAE38 /* TextStyles */ = { + isa = PBXGroup; + children = ( + 649B59B12BF65392002BAE38 /* TextStyles.swift */, + 649B59B32BF653E1002BAE38 /* ViewTitleTextStyle.swift */, + ); + path = TextStyles; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -283,6 +336,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 649B59A72BF64BA9002BAE38 /* Colors.xcassets in Resources */, + 649B59AC2BF64E12002BAE38 /* Images.xcassets in Resources */, 645834632BF5F92500E18321 /* Preview Assets.xcassets in Resources */, 645834602BF5F92500E18321 /* Assets.xcassets in Resources */, ); @@ -310,9 +365,14 @@ buildActionMask = 2147483647; files = ( 6458345E2BF5F92300E18321 /* ContentView.swift in Sources */, + 649B59A92BF64C6A002BAE38 /* Colors.swift in Sources */, + 649B59B42BF653E1002BAE38 /* ViewTitleTextStyle.swift in Sources */, + 649B59AE2BF64EAB002BAE38 /* AppImages.swift in Sources */, 649ABF602BF60F2D002E8894 /* MainMenuButton.swift in Sources */, + 649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */, 6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */, 649ABF5B2BF60D78002E8894 /* MainMenuView.swift in Sources */, + 649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift b/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift new file mode 100644 index 0000000..e492471 --- /dev/null +++ b/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift @@ -0,0 +1,36 @@ +// +// TitlePageFrame.swift +// DouShouQi_App +// +// Created by Rémi REGNAULT on 16/05/2024. +// + +import SwiftUI + +struct TitlePageFrame: View { + + // Image Params + var ImageWidth: CGFloat + var ImageHeight: CGFloat + + var body: some View { + VStack(alignment: .leading) { + ZStack { + Image(AppImages.TitleImage) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: ImageWidth, height: ImageHeight) + + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + .textStyle(T: TextStyles.ViewTitle) + + } + } + } +} + +struct TitlePageFrame_Previews: PreviewProvider { + static var previews: some View { + TitlePageFrame(ImageWidth: 200, ImageHeight: 200) + } +} -- 2.36.3 From be0c9a35265bbb65114925bec3bdd790f678d45e Mon Sep 17 00:00:00 2001 From: "remi.regnault" Date: Tue, 21 May 2024 14:10:32 +0200 Subject: [PATCH 2/2] :construction: Adding font size on TitlePageFrame. Missing a custom police and probably a better image ? --- .../DouShouQi_App/Components/TitlePageFrame.swift | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift b/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift index e492471..7f6be9c 100644 --- a/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift +++ b/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift @@ -9,6 +9,9 @@ import SwiftUI struct TitlePageFrame: View { + // Text Params + var Text: String + // Image Params var ImageWidth: CGFloat var ImageHeight: CGFloat @@ -21,8 +24,10 @@ struct TitlePageFrame: View { .aspectRatio(contentMode: .fit) .frame(width: ImageWidth, height: ImageHeight) - Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) - .textStyle(T: TextStyles.ViewTitle) + SwiftUI.Text(self.Text) + .foregroundColor(Colors.TitleText) + .fontWeight(.bold) + .font(.title) } } @@ -31,6 +36,6 @@ struct TitlePageFrame: View { struct TitlePageFrame_Previews: PreviewProvider { static var previews: some View { - TitlePageFrame(ImageWidth: 200, ImageHeight: 200) + TitlePageFrame(Text: "DouShouQi", ImageWidth: 200, ImageHeight: 200) } } -- 2.36.3