CoolApp @johnson

 

 

import SwiftUI

 

struct AppBox: View {

    var body: some View {

        HStack {

            HomeView()

        }

    }

}

 

 

import SwiftUI

 

struct HomeView: View {

    @Environment(\.horizontalSizeClass) var horizontalClass

    var body: some View {

        ScrollView{

        VStack{

            Text("CoolApp")

                .bold()

                .font(.largeTitle)

            Text("make some cool app")

                .bold()

                .padding(.bottom)

            //Top title

            if horizontalClass == .regular{

                VStack{

                HStack{

                Button{

                    

                }label: {

                    HStack {

                        VStack(alignment: .leading){

                            Text("Let's make an App")

                                .bold()

                                .font(.title2)

                                .foregroundColor(.white)

                            Text("View tutorial")

                                .font(.caption)

                                .foregroundColor(.white)

                        }

                        Spacer()

                        Image(systemName: "book.fill")

                            .resizable()

                            .scaledToFit()

                            .frame(width: 35, height: 35)

                            .foregroundColor(.white)

                    }.shadow(radius: 5)

                        .padding()

                        .background(Color.blue)

                        .cornerRadius(10)

                        .shadow(radius: 5)

                }/

                

                Button{

                    

                }label: {

                    HStack {

                        VStack(alignment: .leading){

                            Text("Designed for large screen")

                                .bold()

                                .font(.title3)

                                .foregroundColor(.white)

                            Text("Learn more")

                                .font(.caption)

                                .foregroundColor(.white)

                        }

                        Spacer()

                        Image(systemName: "ipad")

                            .resizable()

                            .scaledToFit()

                            .frame(width: 35, height: 35)

                            .foregroundColor(.white)

                    }.shadow(radius: 5)

                        .padding()

                        .background(Color.blue)

                        .cornerRadius(10)

                        .shadow(radius: 5)

                }/

                }

                    Text("Make an App")

                        .bold()

                        .font(.title)

                    first()

                    

            }

                

                

            } else {

                Button{

                    

                }label: {

                HStack {

                VStack(alignment: .leading){

                    Text("Let's make an App")

                        .bold()

                        .font(.title2)

                        .foregroundColor(.white)

                    Text("View tutorial")

                        .font(.caption)

                        .foregroundColor(.white)

                }

                    Spacer()

                    Image(systemName: "book.fill")

                        .resizable()

                        .scaledToFit()

                        .frame(width: 35, height: 35)

                        .foregroundColor(.white)

                }.shadow(radius: 5)

                .padding()

                        .background(Color.blue)

                        .cornerRadius(10)

                        .shadow(radius: 5)

                }/

                second()

            }

        }.padding()

        }

    }

}

 

import SwiftUI

 

struct first: View {

    @State var open = false

    @State var newmacOSapp = false

    @State var newapp = false

    var body: some View {

        HStack{

            Button{

                open.toggle()

            }label: {

                HStack{

                    Spacer()

                    Image(systemName: "plus")

                        .foregroundColor(.white)

                        .font(.bold(.title)())

                        .shadow(radius: 3)

                    Text("iOS APP")

                        .bold()

                        .font(.title3)

                        .foregroundColor(.white)

                        .shadow(radius: 5)

                    Spacer()

                }.padding()

                    .background(Color.blue)

                    .cornerRadius(10)

                    .shadow(radius: 5)

            }.sheet(isPresented: $open){

                iosapp()

            }///

            Button{

                newmacOSapp.toggle()

            }label: {

                HStack{

                    Spacer()

                    Image(systemName: "plus")

                        .foregroundColor(.white)

                        .font(.bold(.title)())

                        .shadow(radius: 3)

                    Text("macOS APP")

                        .bold()

                        .font(.title3)

                        .foregroundColor(.white)

                        .shadow(radius: 5)

                    Spacer()

                }.padding()

                    .background(Color.blue)

                    .cornerRadius(10)

                    .shadow(radius: 5)

            }.sheet(isPresented: $newmacOSapp){

                macOSapp()

            }///

            .padding()

            Button{

                newapp.toggle()

            }label: {

                HStack{

                    Spacer()

                    Image(systemName: "plus")

                        .foregroundColor(.white)

                        .font(.bold(.title)())

                        .shadow(radius: 3)

                    Text("APP")

                        .bold()

                        .font(.title3)

                        .foregroundColor(.white)

                        .shadow(radius: 5)

                    Spacer()

                }.padding()

                    .background(Color.blue)

                    .cornerRadius(10)

                    .shadow(radius: 5)

            }.sheet(isPresented: $newapp){

                app()

            }///

        }

    }

}

 

import SwiftUI

 

struct iosapp : View{

    

    var body: some View{

        ZStack{

        ScrollView(.vertical, showsIndicators: false) {

        VStack{

            Text("iOS APP")

                .bold()

                .font(.title)

                .padding(.bottom)

        }.padding()

        }

        VStack{

            Spacer()

            Text("Lighe down to close the page")

                .bold()

                .foregroundColor(.gray)

        }.padding()

    }

    }

}

 

struct macOSapp : View{

    var body: some View{

        ZStack{

        ScrollView(.vertical, showsIndicators: false) {

        VStack{

            Text("macOS APP")

                .bold()

                .font(.title)

                .padding(.bottom)

        }.padding()

        }

        VStack{

            Spacer()

            Text("Lighe down to close the page")

                .bold()

                .foregroundColor(.gray)

        }.padding()

    }

    }

}

 

struct app : View{

    var body: some View{

        ZStack{

        ScrollView(.vertical, showsIndicators: false) {

        VStack{

            Text("Make an APP")

                .bold()

                .font(.title)

                .padding(.bottom)

            

        }.padding()

        }

            VStack{

            Spacer()

            Text("Lighe down to close the page")

                .bold()

                .foregroundColor(.gray)

            }.padding()

        }

    }

}

 

 

struct iosapp1 : View{

    

    var body: some View{

        VStack{

            

        }

    }

}

 

struct macOSapp1 : View{

    var body: some View{

        VStack{

            

        }

    }

}

 

struct app1 : View{

    var body: some View{

        VStack{

            

        }

    }

}

 

import SwiftUI

 

struct second: View {

    @State var opennew = false

    @State var makenew = false

    @State var trynew = false

    var body: some View {

        VStack{

        HStack{

            Text("Make an App")

                .bold()

                .font(.title)

            

        }

            

            Button{

                opennew.toggle()

            }label: {

                HStack{

                    Spacer()

                Image(systemName: "plus")

                        .foregroundColor(.white)

                    .font(.bold(.title)())

                    .shadow(radius: 3)

                    Text("iOS APP")

                        .bold()

                        .font(.title)

                        .foregroundColor(.white)

                        .shadow(radius: 5)

                    Spacer()

                }.padding()

                    .background(Color.blue)

                    .cornerRadius(10)

                    .shadow(radius: 5)

            }.sheet(isPresented: $opennew){

                iosapp()

            }///

            Button{

                makenew.toggle()

            }label: {

                HStack{

                    Spacer()

                    Image(systemName: "plus")

                        .foregroundColor(.white)

                        .font(.bold(.title)())

                        .shadow(radius: 3)

                    Text("macOS APP")

                        .bold()

                        .font(.title)

                        .foregroundColor(.white)

                        .shadow(radius: 5)

                    Spacer()

                }.padding()

                    .background(Color.blue)

                    .cornerRadius(10)

                    .shadow(radius: 5)

            }.sheet(isPresented: $makenew){

                macOSapp()

            }///

            .padding(.vertical)

            Button{

                trynew.toggle()

            }label: {

                HStack{

                    Spacer()

                    Image(systemName: "plus")

                        .foregroundColor(.white)

                        .font(.bold(.title)())

                        .shadow(radius: 3)

                    Text("APP")

                        .bold()

                        .font(.title)

                        .foregroundColor(.white)

                        .shadow(radius: 5)

                    Spacer()

                }.padding()

                    .background(Color.blue)

                    .cornerRadius(10)

                    .shadow(radius: 5)

            }.sheet(isPresented: $trynew){

                app()

            }///

            

            

            

        }

    }

}

 

 

import SwiftUI

 

@main

struct CoolApp: App {

    var body: some Scene {

        WindowGroup {

            AppBox()

        }

    }

}

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值