AutorÃa | Ultima modificación | Ver Log |
//// HtmlView.swift// twogetskills//// Created by Efrain Yanez Recanatini on 4/26/22.//import Foundationimport Foundationimport SwiftUIimport PDFKitstruct WebViewerView: View {@Environment(\.presentationMode)var presentationMode: Binding//@State private var backToGallery : Bool = false@State private var isCompleted : Bool = falseprivate var content : Stringprivate var slideName : String;private 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)init(content : String, slideName : String){self.content = contentself.slideName = slideName}var body: some View {//GeometryReader { geometry inVStack {WebViewRepresentedView(content: content)}.background(Color(colorBackgroundTopic ?? .gray)).navigationBarBackButtonHidden(true).navigationBarTitleDisplayMode(.inline).navigationTitle(slideName).toolbar {ToolbarItem(placement: .navigationBarLeading) {Button(action: {self.presentationMode.wrappedValue.dismiss()}) {HStack {Image(systemName: "chevron.backward").aspectRatio(contentMode: .fit).foregroundColor(Color( colorAppTextView ?? .systemBlue)).background(Color(colorAppBackground ?? .systemBlue))}}}}//}}}struct WebViewerView_Previews: PreviewProvider {static var previews: some View {WebViewerView(content : "<html><head></head><body><h1>Test</h1></body></html>",slideName: "")}}