Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>SwiftUIDemo.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
1 change: 0 additions & 1 deletion SwiftUIDemo/BlurView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import SwiftUI
struct BlurView: UIViewRepresentable {

let style: UIBlurEffect.Style

func makeUIView(context: UIViewRepresentableContext<BlurView>) -> UIView {
let view = UIView(frame: .zero)
view.backgroundColor = .clear
Expand Down
13 changes: 4 additions & 9 deletions SwiftUIDemo/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -104,7 +101,6 @@ struct LeeView: View {
Image("Logo")
.resizable()
.frame(width: 30.0, height: 30.0)

}
.padding(.horizontal)
Spacer()
Expand All @@ -116,7 +112,6 @@ struct LeeView: View {
.shadow(radius: 20.0)
}
}

struct TitleView: View {
var body: some View {
VStack {
Expand Down
12 changes: 2 additions & 10 deletions SwiftUIDemo/Home.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -61,23 +57,19 @@ 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"),
Menu(title: "Hello jiang", icon: "trash"),
Menu(title: "Hello bo", icon: "paperplane"),
]


struct MenuView: View {

@Binding var show : Bool
let menu = menuData

Expand All @@ -104,7 +96,7 @@ struct MenuView: View {
}
}
}

//Button development
struct CircleButton: View {
var icon = "person.crop.circle"
var body: some View {
Expand Down
2 changes: 0 additions & 2 deletions SwiftUIDemo/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions SwiftUIDemo/UpdateDetail.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -28,7 +26,6 @@ struct UpdateDetail: View {

Text(text)
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading)

Spacer()
}
.padding(30.0)
Expand Down