Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
//// HomeView.swift// twogetskills//// Created by Efrain Yanez Recanatini on 6/17/22.//import SwiftUIstruct HomeView: View {@EnvironmentObject var appNavigation : AppNavigation@EnvironmentObject var networkMonitor : NetworkMonitor@State var showPopUp = falsevar body: some View {GeometryReader { geometry inVStack(spacing: 0) {Spacer()HomeViewSubPage().environmentObject(appNavigation).environmentObject(networkMonitor)Spacer()ZStack {if showPopUp {PlusMenuView(showPopUp: self.$showPopUp, widthAndHeight: geometry.size.width/7).offset(y: -geometry.size.height/6 )}HStack {TabBarIconView(appNavigation: appNavigation, assignedPage: .mycapsules, width: geometry.size.width/5, height: geometry.size.height/28, systemIconName: "house", tabName: Config.LANG_TAB_BAR_BUTTON_MY_CAPSULES )TabBarIconView(appNavigation: appNavigation, assignedPage: .topics, width: geometry.size.width/5, height: geometry.size.height/28, systemIconName: "books.vertical", tabName: Config.LANG_TAB_BAR_BUTTON_TOPICS)ZStack {Circle().foregroundColor(.white).frame(width: geometry.size.width/7, height: geometry.size.width/7).shadow(radius: 4)Image(systemName: showPopUp ? "minus.circle.fill" : "plus.circle.fill").resizable().aspectRatio(contentMode: .fit).frame(width: geometry.size.width/7-6 , height: geometry.size.width/7-6).foregroundColor(Color("color_tab_bar_button_plus_background" )).rotationEffect(Angle(degrees: showPopUp ? 0 : 90))}.offset(y: -geometry.size.height/8/2).onTapGesture {withAnimation {showPopUp.toggle()}}TabBarIconView(appNavigation: appNavigation, assignedPage: .timeline, width: geometry.size.width/5, height: geometry.size.height/28, systemIconName: "clock.arrow.circlepath", tabName: Config.LANG_TAB_BAR_BUTTON_TIME_LINE)TabBarIconView(appNavigation: appNavigation, assignedPage: .companies, width: geometry.size.width/5, height: geometry.size.height/28, systemIconName: "chart.bar", tabName: Config.LANG_TAB_BAR_BUTTON_PROGRESS)}//.frame(width: geometry.size.width, height: geometry.size.height/8).frame(width: geometry.size.width, height: 60).background(Color("color_tab_bar_background").shadow(radius: 2))}}}}}struct HomeView_Previews: PreviewProvider {static var previews: some View {HomeView()}}