Skip to content
Merged
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
8 changes: 4 additions & 4 deletions Uplift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 33;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = ZGMCXU7X3U;
ENABLE_PREVIEWS = YES;
Expand All @@ -923,7 +923,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.5.7;
MARKETING_VERSION = 3.0.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = com.cornellappdev.uplift.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -946,7 +946,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 28;
CURRENT_PROJECT_VERSION = 33;
DEVELOPMENT_TEAM = ZGMCXU7X3U;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -966,7 +966,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.5.7;
MARKETING_VERSION = 3.0.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = com.cornellappdev.uplift.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
4 changes: 3 additions & 1 deletion Uplift/Views/Classes/ClassDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ struct ClassDetailView: View {
.font(Constants.Fonts.s1)
.foregroundStyle(Constants.Colors.white)
.multilineTextAlignment(.center)
.minimumScaleFactor(0.01)
.lineLimit(2)

Text(classInstance.location)
.font(Constants.Fonts.bodyNormal)
.foregroundStyle(Constants.Colors.white)
.multilineTextAlignment(.center)

Text(classInstance.instructor.uppercased())
Text("INSTRUCTOR: \(classInstance.instructor.uppercased())")
.font(Constants.Fonts.h2)
.foregroundStyle(Constants.Colors.white)
.multilineTextAlignment(.center)
Expand Down
3 changes: 3 additions & 0 deletions Uplift/Views/ClassesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct ClassesView: View {

// MARK: - Properties

@EnvironmentObject var tabBarProp: TabBarProperty
@StateObject private var viewModel = ViewModel()
@State private var weeks: [Int] = [0, 1, 2] // Integers represent the number of weeks from the current week

Expand Down Expand Up @@ -184,6 +185,8 @@ struct ClassesView: View {
ForEach(viewModel.filteredClasses, id: \.self) { classInstance in
NavigationLink {
ClassDetailView(classInstance: classInstance, viewModel: viewModel)
.onAppear { tabBarProp.hidden = true }
.onDisappear { tabBarProp.hidden = false }
} label: {
ClassCell(classInstance: classInstance, viewModel: viewModel)
}
Expand Down
15 changes: 10 additions & 5 deletions Uplift/Views/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ struct MainView: View {
// MARK: - Properties

@State private var selectedTab: Screen = .home
@StateObject var tabBarProp = TabBarProperty()
@StateObject private var viewModel = ViewModel()

// MARK: - UI
Expand All @@ -23,15 +24,15 @@ struct MainView: View {
HomeView(popUpGiveaway: $viewModel.popUpGiveaway)

ZStack(alignment: .bottom) {
TabView(selection: $selectedTab) {
switch selectedTab {
case .home:
HomeView(popUpGiveaway: $viewModel.popUpGiveaway)
.tag(Screen.home)

case .classes:
ClassesView()
.tag(Screen.classes)
.environmentObject(tabBarProp)
}

tabBar
!tabBarProp.hidden ? tabBar : nil
}

if viewModel.popUpGiveaway {
Expand Down Expand Up @@ -131,6 +132,10 @@ extension MainView {

}

final class TabBarProperty: ObservableObject {
@Published var hidden: Bool = false
}

#Preview {
MainView()
}