Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // ContentView.swift
- // myPassions
- //
- // Created by Denny Caruso on 30/03/22.
- //
- import SwiftUI
- struct ContentView_Previews: PreviewProvider {
- static var previews: some View {
- ContentView()
- .previewInterfaceOrientation(.portrait)
- }
- }
- struct ContentView: View {
- var body: some View {
- VStack(alignment: .center) {
- cloudView()
- basicInfoView()
- passionView()
- }
- }
- }
- struct cloudView: View {
- @State private var colorChange=false
- @State private var sizeChange=false
- var body: some View {
- VStack(spacing: 100.0) {
- Image("myImage")
- .resizable()
- .scaledToFit()
- .font(.system(size: 200))
- .foregroundColor(colorChange ? .black: .cyan)
- .scaleEffect(sizeChange ? 2 : 1)
- .animation(.default)
- .onTapGesture {
- self.colorChange.toggle()
- }
- .onLongPressGesture{
- self.sizeChange.toggle()
- }
- }
- .padding(.all, 100)
- }
- }
- struct basicInfoView: View {
- @State private var colorChange=false
- @State private var sizeChange=false
- var body: some View {
- VStack(spacing: 100.0) {
- Text("\n\nName: Denny\nSurname: Caruso\n\n\n")
- .fontWeight(.bold)
- .lineSpacing(3)
- .multilineTextAlignment(.leading)
- .ignoresSafeArea()
- .padding(.trailing, 250)
- .foregroundColor(.black)
- .font(.system(size: 15))
- .font(.system(.largeTitle, design: .rounded))
- .frame(width: nil)
- }
- }
- }
- struct passionView: View {
- @State private var colorChange=false
- @State private var sizeChange=false
- var body: some View {
- VStack(spacing: 100.0) {
- Text("Passion List:\n1. Ping Pong\n2. Coding\n3. Soccer\n\n\n")
- .fontWeight(.bold)
- .lineSpacing(3)
- .multilineTextAlignment(.leading)
- .ignoresSafeArea()
- .padding(.trailing, 280)
- .foregroundColor(.black)
- .font(.system(size: 15))
- .font(.system(.largeTitle, design: .rounded))
- .frame(width: nil)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement