diff --git a/Zircles.xcodeproj/project.pbxproj b/Zircles.xcodeproj/project.pbxproj index 9fa1551..97f9187 100644 --- a/Zircles.xcodeproj/project.pbxproj +++ b/Zircles.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ 0D1366B824991A6100F0EB54 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0D1366B624991A6100F0EB54 /* LaunchScreen.storyboard */; }; 0D1366C324991A6200F0EB54 /* ZirclesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D1366C224991A6200F0EB54 /* ZirclesTests.swift */; }; 0D1366CE24991A6200F0EB54 /* ZirclesUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D1366CD24991A6200F0EB54 /* ZirclesUITests.swift */; }; + 0D5142C324A0F0B800F9AE2E /* Zboto.otf in Resources */ = {isa = PBXBuildFile; fileRef = 0D5142C224A0F0B800F9AE2E /* Zboto.otf */; }; 0D6A22C0249A9C3000B4E946 /* Colors+Zircles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D6A22BF249A9C3000B4E946 /* Colors+Zircles.swift */; }; 0D6A22C5249AB1FC00B4E946 /* ZcashSymbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D6A22C4249AB1FC00B4E946 /* ZcashSymbol.swift */; }; 0D6A22C7249AB36100B4E946 /* ZcashButtonBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D6A22C6249AB36100B4E946 /* ZcashButtonBackground.swift */; }; @@ -70,6 +71,7 @@ 0D1366C924991A6200F0EB54 /* ZirclesUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZirclesUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 0D1366CD24991A6200F0EB54 /* ZirclesUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZirclesUITests.swift; sourceTree = ""; }; 0D1366CF24991A6200F0EB54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0D5142C224A0F0B800F9AE2E /* Zboto.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Zboto.otf; sourceTree = ""; }; 0D6A22BF249A9C3000B4E946 /* Colors+Zircles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Colors+Zircles.swift"; sourceTree = ""; }; 0D6A22C4249AB1FC00B4E946 /* ZcashSymbol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZcashSymbol.swift; sourceTree = ""; }; 0D6A22C6249AB36100B4E946 /* ZcashButtonBackground.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZcashButtonBackground.swift; sourceTree = ""; }; @@ -135,6 +137,7 @@ 0D1366AA24991A6000F0EB54 /* Zircles */ = { isa = PBXGroup; children = ( + 0D5142C224A0F0B800F9AE2E /* Zboto.otf */, 0D11D3D5249D2E0400223146 /* Utils */, 0D6A22CC249ACD6C00B4E946 /* Neumorphic */, 0D6A22C1249AB12200B4E946 /* Components */, @@ -313,6 +316,7 @@ files = ( 0D1366B824991A6100F0EB54 /* LaunchScreen.storyboard in Resources */, 0D1366B524991A6100F0EB54 /* Preview Assets.xcassets in Resources */, + 0D5142C324A0F0B800F9AE2E /* Zboto.otf in Resources */, 0D1366B224991A6100F0EB54 /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Zircles/Components/ZcashButton.swift b/Zircles/Components/ZcashButton.swift index b9d6e7e..7a3fe47 100644 --- a/Zircles/Components/ZcashButton.swift +++ b/Zircles/Components/ZcashButton.swift @@ -160,7 +160,7 @@ struct ZcashChamferedButtonBackground: Shape { struct ZcashButton_Previews: PreviewProvider { static var previews: some View { ZStack { - Color.black + Color.background VStack { ZcashButton(color: Color.buttonBlue, fill: Color.clear, text: "Create New Wallet") .frame(width: 300, height: 60) diff --git a/Zircles/Components/ZircleProgress.swift b/Zircles/Components/ZircleProgress.swift index c93254b..96e66d9 100644 --- a/Zircles/Components/ZircleProgress.swift +++ b/Zircles/Components/ZircleProgress.swift @@ -9,12 +9,12 @@ import SwiftUI struct ZircleProgress: View { var progress: Double = 0 - + var stroke: StrokeStyle var body: some View { Wedge(startAngle: Angle(radians: 0), endAngle: Angle(radians: 2 * Double.pi * progress), clockwise: false) - .stroke(style: .init(lineWidth: 40, lineCap: .round)) + .stroke(style: stroke) .fill(LinearGradient.zButtonGradient) .rotationEffect(Angle(radians: -Double.pi / 2)) } @@ -26,7 +26,7 @@ struct Wedge_Previews: PreviewProvider { ZStack { Color.background VStack { - ZircleProgress(progress: progress) + ZircleProgress(progress: progress, stroke: .init(lineWidth: 40, lineCap: .round)) .glow(vibe: .heavy, soul: .split(left: Color.gradientPink, right: Color.gradientOrange)) .animation(.easeIn) Button(action: { diff --git a/Zircles/Info.plist b/Zircles/Info.plist index 9742bf0..495e095 100644 --- a/Zircles/Info.plist +++ b/Zircles/Info.plist @@ -56,5 +56,9 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIAppFonts + + Zboto.otf + diff --git a/Zircles/Neumorphic/Card.swift b/Zircles/Neumorphic/Card.swift index 2b68ba9..efe9662 100644 --- a/Zircles/Neumorphic/Card.swift +++ b/Zircles/Neumorphic/Card.swift @@ -23,7 +23,7 @@ struct Card: View { Toggle(isOn: $isToggled) { content } - .toggleStyle(SimpleToggleStyle(cornerRadius: cornerRadius, padding: padding)) + .toggleStyle(SimpleToggleStyle(shape: RoundedRectangle(cornerRadius: cornerRadius), padding: padding)) } } diff --git a/Zircles/Neumorphic/NeumorphicButtons.swift b/Zircles/Neumorphic/NeumorphicButtons.swift index 23e9498..a06d1a7 100644 --- a/Zircles/Neumorphic/NeumorphicButtons.swift +++ b/Zircles/Neumorphic/NeumorphicButtons.swift @@ -167,19 +167,19 @@ struct ColorfulButtonStyle: ButtonStyle { .animation(nil) } } -struct SimpleToggleStyle: ToggleStyle { - var cornerRadius: CGFloat = 5 +struct SimpleToggleStyle: ToggleStyle { + let shape: S var padding: CGFloat = 30 func makeBody(configuration: Self.Configuration) -> some View { Button(action: { configuration.isOn.toggle() }) { configuration.label - .contentShape(RoundedRectangle(cornerRadius: cornerRadius)) + .contentShape(shape) .padding(padding) } .background( - SimpleBackground(isHighlighted: configuration.isOn, shape: RoundedRectangle(cornerRadius: cornerRadius)) + SimpleBackground(isHighlighted: configuration.isOn, shape: shape) ) } } @@ -240,9 +240,9 @@ struct NeumorphicContentView: View { Toggle(isOn: $isToggled) { Image(systemName: "heart.fill") .foregroundColor(.gray) - .frame(width: 200, height: 200) + } - .toggleStyle(SimpleToggleStyle(cornerRadius: 50)) + .toggleStyle(SimpleToggleStyle(shape: RoundedRectangle(cornerRadius: 5))) } } } diff --git a/Zircles/Neumorphic/Pie.swift b/Zircles/Neumorphic/Pie.swift index 6c420b2..469cf12 100644 --- a/Zircles/Neumorphic/Pie.swift +++ b/Zircles/Neumorphic/Pie.swift @@ -23,14 +23,30 @@ struct Pie: View { Toggle(isOn: $isToggled) { content } - .toggleStyle(SimpleToggleStyle(cornerRadius: cornerRadius, padding: padding)) + .toggleStyle(SimpleToggleStyle(shape: Circle(), padding: padding)) } } struct Pie_Previews: PreviewProvider { static var previews: some View { - Pie(isOn: .constant(false)) { - Text("hello") + ZStack { + Color.background + VStack(spacing: 20) { + Pie(isOn: .constant(true)) { + Text("hello") + .padding() + } + Pie(isOn: .constant(false)) { + Text("good bye") + .padding() + } + Pie(isOn: .constant(true)) { + Pie(isOn: .constant(false)) { + Text("good bye") + .padding() + } + } + } } } } diff --git a/Zircles/SplashScreen.swift b/Zircles/SplashScreen.swift index 34c197a..96c7e2c 100644 --- a/Zircles/SplashScreen.swift +++ b/Zircles/SplashScreen.swift @@ -15,8 +15,24 @@ struct SplashScreen: View { ZStack { Color.background .edgesIgnoringSafeArea(.all) - FancyLogo() - .frame(width: 100, height: 200) + VStack { + Spacer() + FancyLogo() + .frame(width: 200, height: 200) + Spacer() + Button(action: {}) { + Text("Create New") + .font(.system(size: 20, weight: .bold, design: .default)) + .shadow(color:Color(red: 0.2, green: 0.2, blue: 0.2).opacity(0.2), radius: 1, x: 0, y: 2) + .foregroundColor(Color.background) + .modifier(ZcashButtonBackground(buttonShape: .roundedCorners(fillStyle: .solid(color: Color.buttonBlue)))) + + .shadow(color: Color(red: 0.2, green: 0.2, blue: 0.2).opacity(0.5), radius: 25, x: 10, y: 10) + .frame(height: 50) + } + }.padding(30) + + }.navigationBarTitle(Text("Welcome to Zircles")) } @@ -25,16 +41,33 @@ struct SplashScreen: View { struct FancyLogo: View { var body: some View { - GeometryReader { geometry in - - ZStack { - - ZcashSymbol().path(in: geometry.frame(in: .local)) - .fill(Color.gray) - - ZircleProgress(progress: 0.75) - .glow(vibe: .heavy, soul: .split(left: Color.gradientPink, right: Color.gradientOrange)) + + ZStack { + Pie(isOn: .constant(false),padding: 16) { + Pie(isOn: .constant(true), padding: 40) { + Pie(isOn: .constant(false)) { + + Text("") + .padding(40) + + } + + } + .overlay( + ZircleProgress(progress: 0.75, stroke: .init(lineWidth: 40, lineCap: .round)) + .padding(23) + + ) + } + Text("$") + .foregroundColor(.buttonGray) + .font( + .custom("Zboto", size: 200) + ).padding() + .frame(alignment: .center) + .contentShape(Circle()) + .offset(x: 0, y: 50) } } } diff --git a/Zircles/Zboto.otf b/Zircles/Zboto.otf new file mode 100644 index 0000000..e963a36 Binary files /dev/null and b/Zircles/Zboto.otf differ