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()
}
}
}