AutorÃa | Ultima modificación | Ver Log |
import SwiftUIstruct TimeLineView: View {@Environment(\.presentationMode)var presentationMode: Bindingprivate let colorBackgroundTopic = UIColor(hex: Config.COLOR_BACKGROUND_TOPIC)private let colorAppTextView = UIColor(hex: Config.COLOR_APP_TEXT_VIEW_TITLE)private let colorAppBackground = UIColor(hex: Config.COLOR_APP_BAR)private var viewModel : TimeLineViewModel = TimeLineViewModel()let preference = Preference.sharedInstancelet config = [GridItem(.flexible())]var body: some View {GeometryReader { geometry inVStack {/**/ScrollView {ForEach(0..<self.viewModel.userlogs.count) { i inTimeLinePointView(userLogModel: self.viewModel.userlogs[i]).listRowInsets(.init()).frame(width: geometry.size.width, height: 70, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/).background(i == 0 || i == self.viewModel.userlogs.count - 1 ?Color(colorAppBackground ?? .white):Color(colorBackgroundTopic ?? .white))}}//.listStyle(InsetListStyle()).background(Color(colorBackgroundTopic ?? .white))}.background(Color(colorBackgroundTopic ?? .white)).navigationTitle("Linea de Tiempo").navigationBarTitleDisplayMode(.inline).navigationBarBackButtonHidden(true)}}}struct TimeLineView_Previews: PreviewProvider {static var previews: some View {TimeLineView()}}