diff --git a/SwiftUIDemo.xcodeproj/project.xcworkspace/xcuserdata/Ashtari1993.xcuserdatad/UserInterfaceState.xcuserstate b/SwiftUIDemo.xcodeproj/project.xcworkspace/xcuserdata/Ashtari1993.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..23c7205 Binary files /dev/null and b/SwiftUIDemo.xcodeproj/project.xcworkspace/xcuserdata/Ashtari1993.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/SwiftUIDemo.xcodeproj/xcuserdata/Ashtari1993.xcuserdatad/xcschemes/xcschememanagement.plist b/SwiftUIDemo.xcodeproj/xcuserdata/Ashtari1993.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..aeeaf4b --- /dev/null +++ b/SwiftUIDemo.xcodeproj/xcuserdata/Ashtari1993.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + SwiftUIDemo.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/SwiftUIDemo/BlurView.swift b/SwiftUIDemo/BlurView.swift index f3febd2..aef84c4 100644 --- a/SwiftUIDemo/BlurView.swift +++ b/SwiftUIDemo/BlurView.swift @@ -11,7 +11,6 @@ import SwiftUI struct BlurView: UIViewRepresentable { let style: UIBlurEffect.Style - func makeUIView(context: UIViewRepresentableContext) -> UIView { let view = UIView(frame: .zero) view.backgroundColor = .clear diff --git a/SwiftUIDemo/ContentView.swift b/SwiftUIDemo/ContentView.swift index 1b0caa9..16697b0 100644 --- a/SwiftUIDemo/ContentView.swift +++ b/SwiftUIDemo/ContentView.swift @@ -9,23 +9,20 @@ import SwiftUI struct ContentView: View { - @State var show = false @State var viewState = CGSize.zero var body: some View { ZStack { - BlurView(style: .extraLight) - TitleView() .blur(radius: show ? 20 : 0) .animation(.default) - + //animation view CardBottomView() .blur(radius: show ? 20 : 0) .animation(.default) - + //Describes the first view of the card CardView() .background(show ? Color.red : Color("background8")) .cornerRadius(10.0) @@ -35,7 +32,7 @@ struct ContentView: View { .rotationEffect(Angle(degrees: show ? 15.0 : 0)) .rotation3DEffect(Angle(degrees: show ? 50 : 0), axis: (x: 10.0, y: 10.0, z: 10.0)).animation(Animation.easeInOut(duration: 0.7)) .offset(x: viewState.width, y: viewState.height) - + //Describes the second view of the card CardView() .background(show ? Color.blue : Color("background9")) .cornerRadius(10.0) @@ -46,7 +43,7 @@ struct ContentView: View { .rotation3DEffect(Angle(degrees: show ? 40 : 0), axis: (x: 10.0, y: 10.0, z: 10.0)) .animation(Animation.easeInOut(duration: 0.5)) .offset(x: viewState.width, y: viewState.height) - + //Gesture development for the Cards LeeView() .offset(x: viewState.width, y: viewState.height) .scaleEffect(0.95) @@ -104,7 +101,6 @@ struct LeeView: View { Image("Logo") .resizable() .frame(width: 30.0, height: 30.0) - } .padding(.horizontal) Spacer() @@ -116,7 +112,6 @@ struct LeeView: View { .shadow(radius: 20.0) } } - struct TitleView: View { var body: some View { VStack { diff --git a/SwiftUIDemo/Home.swift b/SwiftUIDemo/Home.swift index b009eb1..6df9a50 100644 --- a/SwiftUIDemo/Home.swift +++ b/SwiftUIDemo/Home.swift @@ -9,28 +9,24 @@ import SwiftUI struct Home: View { - @State var show: Bool = false @State var showProfile: Bool = false var body: some View { ZStack { - + //Call HomeList, ContentView, MenuBtn, MenuRight and MenuView HomeList() .blur(radius: show ? 20 : 0) .scaleEffect(showProfile ? 0.95 : 1) .animation(.default) - ContentView() .cornerRadius(30) .shadow(radius: 20) .animation(.spring()) .offset(y: showProfile ? 40 : UIScreen.main.bounds.height) - MenuButton(show: $show) .offset(x: -30, y: showProfile ? 0 : 80) .animation(.spring()) - MenuRight(show: $showProfile) .offset(x: -16, y: showProfile ? 0 : 88) .animation(.spring()) @@ -61,13 +57,11 @@ struct MenuRow: View { } } } - struct Menu: Identifiable { var id = UUID() var title : String var icon : String } - let menuData = [ Menu(title: "Hello World!", icon: "person.crop.circle"), Menu(title: "lee", icon: "square.and.arrow.up"), @@ -75,9 +69,7 @@ let menuData = [ Menu(title: "Hello bo", icon: "paperplane"), ] - struct MenuView: View { - @Binding var show : Bool let menu = menuData @@ -104,7 +96,7 @@ struct MenuView: View { } } } - +//Button development struct CircleButton: View { var icon = "person.crop.circle" var body: some View { diff --git a/SwiftUIDemo/SceneDelegate.swift b/SwiftUIDemo/SceneDelegate.swift index 6463969..9967772 100644 --- a/SwiftUIDemo/SceneDelegate.swift +++ b/SwiftUIDemo/SceneDelegate.swift @@ -10,10 +10,8 @@ import UIKit import SwiftUI class SceneDelegate: UIResponder, UIWindowSceneDelegate { - var window: UIWindow? - func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. diff --git a/SwiftUIDemo/UpdateDetail.swift b/SwiftUIDemo/UpdateDetail.swift index ddf800d..1ff6d0b 100644 --- a/SwiftUIDemo/UpdateDetail.swift +++ b/SwiftUIDemo/UpdateDetail.swift @@ -9,12 +9,10 @@ import SwiftUI struct UpdateDetail: View { - var title = "Swiftui" var text = "Loading" var image = "Illustration1" - var body: some View { VStack(spacing: 20.0) { Text(title) @@ -28,7 +26,6 @@ struct UpdateDetail: View { Text(text) .frame(minWidth: 0, maxWidth: .infinity, alignment: .leading) - Spacer() } .padding(30.0)