Splash Screen
This commit is contained in:
parent
c83e05c2fb
commit
57a04decd6
|
@ -23,6 +23,7 @@
|
||||||
0D1366B824991A6100F0EB54 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0D1366B624991A6100F0EB54 /* LaunchScreen.storyboard */; };
|
0D1366B824991A6100F0EB54 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0D1366B624991A6100F0EB54 /* LaunchScreen.storyboard */; };
|
||||||
0D1366C324991A6200F0EB54 /* ZirclesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D1366C224991A6200F0EB54 /* ZirclesTests.swift */; };
|
0D1366C324991A6200F0EB54 /* ZirclesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D1366C224991A6200F0EB54 /* ZirclesTests.swift */; };
|
||||||
0D1366CE24991A6200F0EB54 /* ZirclesUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D1366CD24991A6200F0EB54 /* ZirclesUITests.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 */; };
|
0D6A22C0249A9C3000B4E946 /* Colors+Zircles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D6A22BF249A9C3000B4E946 /* Colors+Zircles.swift */; };
|
||||||
0D6A22C5249AB1FC00B4E946 /* ZcashSymbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D6A22C4249AB1FC00B4E946 /* ZcashSymbol.swift */; };
|
0D6A22C5249AB1FC00B4E946 /* ZcashSymbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D6A22C4249AB1FC00B4E946 /* ZcashSymbol.swift */; };
|
||||||
0D6A22C7249AB36100B4E946 /* ZcashButtonBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D6A22C6249AB36100B4E946 /* ZcashButtonBackground.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; };
|
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 = "<group>"; };
|
0D1366CD24991A6200F0EB54 /* ZirclesUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZirclesUITests.swift; sourceTree = "<group>"; };
|
||||||
0D1366CF24991A6200F0EB54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
0D1366CF24991A6200F0EB54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
0D5142C224A0F0B800F9AE2E /* Zboto.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Zboto.otf; sourceTree = "<group>"; };
|
||||||
0D6A22BF249A9C3000B4E946 /* Colors+Zircles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Colors+Zircles.swift"; sourceTree = "<group>"; };
|
0D6A22BF249A9C3000B4E946 /* Colors+Zircles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Colors+Zircles.swift"; sourceTree = "<group>"; };
|
||||||
0D6A22C4249AB1FC00B4E946 /* ZcashSymbol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZcashSymbol.swift; sourceTree = "<group>"; };
|
0D6A22C4249AB1FC00B4E946 /* ZcashSymbol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZcashSymbol.swift; sourceTree = "<group>"; };
|
||||||
0D6A22C6249AB36100B4E946 /* ZcashButtonBackground.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZcashButtonBackground.swift; sourceTree = "<group>"; };
|
0D6A22C6249AB36100B4E946 /* ZcashButtonBackground.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZcashButtonBackground.swift; sourceTree = "<group>"; };
|
||||||
|
@ -135,6 +137,7 @@
|
||||||
0D1366AA24991A6000F0EB54 /* Zircles */ = {
|
0D1366AA24991A6000F0EB54 /* Zircles */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
0D5142C224A0F0B800F9AE2E /* Zboto.otf */,
|
||||||
0D11D3D5249D2E0400223146 /* Utils */,
|
0D11D3D5249D2E0400223146 /* Utils */,
|
||||||
0D6A22CC249ACD6C00B4E946 /* Neumorphic */,
|
0D6A22CC249ACD6C00B4E946 /* Neumorphic */,
|
||||||
0D6A22C1249AB12200B4E946 /* Components */,
|
0D6A22C1249AB12200B4E946 /* Components */,
|
||||||
|
@ -313,6 +316,7 @@
|
||||||
files = (
|
files = (
|
||||||
0D1366B824991A6100F0EB54 /* LaunchScreen.storyboard in Resources */,
|
0D1366B824991A6100F0EB54 /* LaunchScreen.storyboard in Resources */,
|
||||||
0D1366B524991A6100F0EB54 /* Preview Assets.xcassets in Resources */,
|
0D1366B524991A6100F0EB54 /* Preview Assets.xcassets in Resources */,
|
||||||
|
0D5142C324A0F0B800F9AE2E /* Zboto.otf in Resources */,
|
||||||
0D1366B224991A6100F0EB54 /* Assets.xcassets in Resources */,
|
0D1366B224991A6100F0EB54 /* Assets.xcassets in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
|
|
@ -160,7 +160,7 @@ struct ZcashChamferedButtonBackground: Shape {
|
||||||
struct ZcashButton_Previews: PreviewProvider {
|
struct ZcashButton_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
Color.black
|
Color.background
|
||||||
VStack {
|
VStack {
|
||||||
ZcashButton(color: Color.buttonBlue, fill: Color.clear, text: "Create New Wallet")
|
ZcashButton(color: Color.buttonBlue, fill: Color.clear, text: "Create New Wallet")
|
||||||
.frame(width: 300, height: 60)
|
.frame(width: 300, height: 60)
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
struct ZircleProgress: View {
|
struct ZircleProgress: View {
|
||||||
var progress: Double = 0
|
var progress: Double = 0
|
||||||
|
var stroke: StrokeStyle
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Wedge(startAngle: Angle(radians: 0),
|
Wedge(startAngle: Angle(radians: 0),
|
||||||
endAngle: Angle(radians: 2 * Double.pi * progress),
|
endAngle: Angle(radians: 2 * Double.pi * progress),
|
||||||
clockwise: false)
|
clockwise: false)
|
||||||
.stroke(style: .init(lineWidth: 40, lineCap: .round))
|
.stroke(style: stroke)
|
||||||
.fill(LinearGradient.zButtonGradient)
|
.fill(LinearGradient.zButtonGradient)
|
||||||
.rotationEffect(Angle(radians: -Double.pi / 2))
|
.rotationEffect(Angle(radians: -Double.pi / 2))
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ struct Wedge_Previews: PreviewProvider {
|
||||||
ZStack {
|
ZStack {
|
||||||
Color.background
|
Color.background
|
||||||
VStack {
|
VStack {
|
||||||
ZircleProgress(progress: progress)
|
ZircleProgress(progress: progress, stroke: .init(lineWidth: 40, lineCap: .round))
|
||||||
.glow(vibe: .heavy, soul: .split(left: Color.gradientPink, right: Color.gradientOrange))
|
.glow(vibe: .heavy, soul: .split(left: Color.gradientPink, right: Color.gradientOrange))
|
||||||
.animation(.easeIn)
|
.animation(.easeIn)
|
||||||
Button(action: {
|
Button(action: {
|
||||||
|
|
|
@ -56,5 +56,9 @@
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>UIAppFonts</key>
|
||||||
|
<array>
|
||||||
|
<string>Zboto.otf</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -23,7 +23,7 @@ struct Card<Content: View>: View {
|
||||||
Toggle(isOn: $isToggled) {
|
Toggle(isOn: $isToggled) {
|
||||||
content
|
content
|
||||||
}
|
}
|
||||||
.toggleStyle(SimpleToggleStyle(cornerRadius: cornerRadius, padding: padding))
|
.toggleStyle(SimpleToggleStyle(shape: RoundedRectangle(cornerRadius: cornerRadius), padding: padding))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,19 +167,19 @@ struct ColorfulButtonStyle: ButtonStyle {
|
||||||
.animation(nil)
|
.animation(nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct SimpleToggleStyle: ToggleStyle {
|
struct SimpleToggleStyle<S :Shape>: ToggleStyle {
|
||||||
var cornerRadius: CGFloat = 5
|
let shape: S
|
||||||
var padding: CGFloat = 30
|
var padding: CGFloat = 30
|
||||||
func makeBody(configuration: Self.Configuration) -> some View {
|
func makeBody(configuration: Self.Configuration) -> some View {
|
||||||
Button(action: {
|
Button(action: {
|
||||||
configuration.isOn.toggle()
|
configuration.isOn.toggle()
|
||||||
}) {
|
}) {
|
||||||
configuration.label
|
configuration.label
|
||||||
.contentShape(RoundedRectangle(cornerRadius: cornerRadius))
|
.contentShape(shape)
|
||||||
.padding(padding)
|
.padding(padding)
|
||||||
}
|
}
|
||||||
.background(
|
.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) {
|
Toggle(isOn: $isToggled) {
|
||||||
Image(systemName: "heart.fill")
|
Image(systemName: "heart.fill")
|
||||||
.foregroundColor(.gray)
|
.foregroundColor(.gray)
|
||||||
.frame(width: 200, height: 200)
|
|
||||||
}
|
}
|
||||||
.toggleStyle(SimpleToggleStyle(cornerRadius: 50))
|
.toggleStyle(SimpleToggleStyle(shape: RoundedRectangle(cornerRadius: 5)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,14 +23,30 @@ struct Pie<Content: View>: View {
|
||||||
Toggle(isOn: $isToggled) {
|
Toggle(isOn: $isToggled) {
|
||||||
content
|
content
|
||||||
}
|
}
|
||||||
.toggleStyle(SimpleToggleStyle(cornerRadius: cornerRadius, padding: padding))
|
.toggleStyle(SimpleToggleStyle(shape: Circle(), padding: padding))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Pie_Previews: PreviewProvider {
|
struct Pie_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
Pie(isOn: .constant(false)) {
|
ZStack {
|
||||||
|
Color.background
|
||||||
|
VStack(spacing: 20) {
|
||||||
|
Pie(isOn: .constant(true)) {
|
||||||
Text("hello")
|
Text("hello")
|
||||||
|
.padding()
|
||||||
|
}
|
||||||
|
Pie(isOn: .constant(false)) {
|
||||||
|
Text("good bye")
|
||||||
|
.padding()
|
||||||
|
}
|
||||||
|
Pie(isOn: .constant(true)) {
|
||||||
|
Pie(isOn: .constant(false)) {
|
||||||
|
Text("good bye")
|
||||||
|
.padding()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,24 @@ struct SplashScreen: View {
|
||||||
ZStack {
|
ZStack {
|
||||||
Color.background
|
Color.background
|
||||||
.edgesIgnoringSafeArea(.all)
|
.edgesIgnoringSafeArea(.all)
|
||||||
|
VStack {
|
||||||
|
Spacer()
|
||||||
FancyLogo()
|
FancyLogo()
|
||||||
.frame(width: 100, height: 200)
|
.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"))
|
}.navigationBarTitle(Text("Welcome to Zircles"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,16 +41,33 @@ struct SplashScreen: View {
|
||||||
|
|
||||||
struct FancyLogo: View {
|
struct FancyLogo: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
GeometryReader { geometry in
|
|
||||||
|
|
||||||
ZStack {
|
ZStack {
|
||||||
|
Pie(isOn: .constant(false),padding: 16) {
|
||||||
|
Pie(isOn: .constant(true), padding: 40) {
|
||||||
|
Pie(isOn: .constant(false)) {
|
||||||
|
|
||||||
ZcashSymbol().path(in: geometry.frame(in: .local))
|
Text("")
|
||||||
.fill(Color.gray)
|
.padding(40)
|
||||||
|
|
||||||
ZircleProgress(progress: 0.75)
|
|
||||||
.glow(vibe: .heavy, soul: .split(left: Color.gradientPink, right: Color.gradientOrange))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue