From 13297d91d04f1366084f3d3656e86e259492a39f Mon Sep 17 00:00:00 2001 From: talksik Date: Sun, 12 Dec 2021 15:29:11 -0800 Subject: [PATCH] fixing things to get it solid on ipod touch --- nirvana-ios.xcodeproj/project.pbxproj | 6 +++ nirvana-ios/ContentView.swift | 2 - nirvana-ios/Globals/colors.swift | 1 + .../Views/WelcomeView/WelcomeView.swift | 40 ++++++++++--------- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/nirvana-ios.xcodeproj/project.pbxproj b/nirvana-ios.xcodeproj/project.pbxproj index f53c6a6..bc28553 100644 --- a/nirvana-ios.xcodeproj/project.pbxproj +++ b/nirvana-ios.xcodeproj/project.pbxproj @@ -396,9 +396,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"nirvana-ios/Preview Content\""; + DEVELOPMENT_TEAM = RK9WWM4Q99; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "nirvana-ios/Info.plist"; @@ -414,6 +416,7 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = "com.usenirvana.nirvana-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -425,9 +428,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"nirvana-ios/Preview Content\""; + DEVELOPMENT_TEAM = RK9WWM4Q99; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "nirvana-ios/Info.plist"; @@ -443,6 +448,7 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = "com.usenirvana.nirvana-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/nirvana-ios/ContentView.swift b/nirvana-ios/ContentView.swift index 6b75d91..4834ff9 100644 --- a/nirvana-ios/ContentView.swift +++ b/nirvana-ios/ContentView.swift @@ -10,8 +10,6 @@ import SwiftUI struct ContentView: View { var body: some View { WelcomeView() - - HomeView() } } diff --git a/nirvana-ios/Globals/colors.swift b/nirvana-ios/Globals/colors.swift index db70e37..44c23fb 100644 --- a/nirvana-ios/Globals/colors.swift +++ b/nirvana-ios/Globals/colors.swift @@ -40,4 +40,5 @@ final class NirvanaColor { static let teal:Color = Color(red: 0.0, green: 0.314, blue: 0.314) static let bgLightGrey:Color = Color(red: 0.898, green: 0.898, blue: 0.898) static let white: Color = Color.white + static let black: Color = Color.black } diff --git a/nirvana-ios/Views/WelcomeView/WelcomeView.swift b/nirvana-ios/Views/WelcomeView/WelcomeView.swift index 446cafd..76774e7 100644 --- a/nirvana-ios/Views/WelcomeView/WelcomeView.swift +++ b/nirvana-ios/Views/WelcomeView/WelcomeView.swift @@ -8,6 +8,9 @@ import SwiftUI struct WelcomeView: View { + let screenWidth = UIScreen.main.bounds.width + let screenHeight = UIScreen.main.bounds.height + var body: some View { VStack { // nav bar @@ -19,26 +22,27 @@ struct WelcomeView: View { .renderingMode(.original) .resizable() .aspectRatio(contentMode: .fit) - .padding(.horizontal, 30) - .padding(.top, 30) + + Spacer() VStack(alignment: .leading) { Text("Your ") .font(.title) + .foregroundColor(NirvanaColor.black) + Text("minimalist ") .font(.title) .foregroundColor(NirvanaColor.teal) + Text("social media.") .font(.title) + .foregroundColor(NirvanaColor.black) Text("tired of the rat race on insta, tik-tok, snap, meta?") .foregroundColor(Color.gray) .padding(.top, 5) + .fixedSize(horizontal: false, vertical: true) } - .frame(maxWidth: .infinity) - .padding(.horizontal, 30) - .padding(.top, 20) + .frame(maxWidth: screenWidth - 20) Spacer() @@ -51,35 +55,33 @@ struct WelcomeView: View { Text("Start Your Detox") .bold() .foregroundColor(NirvanaColor.white) - } - ) - .frame(maxWidth: .infinity) - .padding(.vertical, 25) - .background(NirvanaColor.teal) - .clipShape(Capsule()) - // .shadow(color: NirvanaColors.teal, radius: 3, x: 1, y: 2) - // .cornerRadius(8) - + .frame(maxWidth: .infinity) + .padding(.vertical, 25) + .background(NirvanaColor.teal) + .clipShape(Capsule()) + .shadow(radius:10) + }) + + Button( action: { - print("link to w ebsite learn more clicked") + print("link to website learn more clicked") }, label: { Text("Learn More") .bold() - } - ) + }) .background(NirvanaColor.bgLightGrey) //learn more button to usenirvana.com } - .frame(maxWidth: .infinity) - .padding(.horizontal, 30) .padding(.top, 20) + .frame(maxWidth: 300) Spacer() } .padding() + .frame(maxWidth: screenWidth - 20) } .frame(maxWidth: .infinity, maxHeight: .infinity)