Advertisement
IbrahimHassan

MainStoryboard.swift

Dec 3rd, 2021
1,309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 85.63 KB | None | 0 0
  1. //  Converted by Storyboard to SwiftUI Converter - https://swiftify.com/converter/storyboard2swiftui
  2.  
  3. import SwiftUI
  4.  
  5. import Introspect
  6. // TODO: install `SwiftUI-Introspect` package from https://github.com/siteline/SwiftUI-Introspect
  7.  
  8. // --------------------------------------------------------------------------------
  9. // NavAppearanceModifier
  10. // --------------------------------------------------------------------------------
  11. struct NavAppearanceModifier: ViewModifier {
  12.     init() {
  13.         let navBarAppearance = UINavigationBarAppearance()
  14.    
  15.         navBarAppearance.configureWithOpaqueBackground()
  16.    
  17.         UINavigationBar.appearance().isTranslucent = false
  18.    
  19.         UINavigationBar.appearance().standardAppearance = navBarAppearance
  20.         UINavigationBar.appearance().compactAppearance = navBarAppearance
  21.         UINavigationBar.appearance().scrollEdgeAppearance = navBarAppearance
  22.     }
  23.    
  24.     func body(content: Content) -> some View {
  25.         content
  26.     }
  27. }
  28.  
  29. extension View {
  30.     func navigationAppearance() -> some View {
  31.         self.modifier(NavAppearanceModifier())
  32.     }
  33. }
  34.  
  35. // --------------------------------------------------------------------------------
  36. // NavAppearanceModifier1
  37. // --------------------------------------------------------------------------------
  38. struct NavAppearanceModifier1: ViewModifier {
  39.     init() {
  40.         let navBarAppearance = UINavigationBarAppearance()
  41.    
  42.         navBarAppearance.configureWithOpaqueBackground()
  43.    
  44.         UINavigationBar.appearance().isTranslucent = false
  45.    
  46.         UINavigationBar.appearance().standardAppearance = navBarAppearance
  47.         UINavigationBar.appearance().compactAppearance = navBarAppearance
  48.         UINavigationBar.appearance().scrollEdgeAppearance = navBarAppearance
  49.     }
  50.    
  51.     func body(content: Content) -> some View {
  52.         content
  53.     }
  54. }
  55.  
  56. extension View {
  57.     func navigationAppearance1() -> some View {
  58.         self.modifier(NavAppearanceModifier1())
  59.     }
  60. }
  61.  
  62. // --------------------------------------------------------------------------------
  63. // NavAppearanceModifier2
  64. // --------------------------------------------------------------------------------
  65. struct NavAppearanceModifier2: ViewModifier {
  66.     init() {
  67.         let navBarAppearance = UINavigationBarAppearance()
  68.    
  69.         navBarAppearance.configureWithOpaqueBackground()
  70.    
  71.         UINavigationBar.appearance().isTranslucent = false
  72.    
  73.         UINavigationBar.appearance().standardAppearance = navBarAppearance
  74.         UINavigationBar.appearance().compactAppearance = navBarAppearance
  75.         UINavigationBar.appearance().scrollEdgeAppearance = navBarAppearance
  76.     }
  77.    
  78.     func body(content: Content) -> some View {
  79.         content
  80.     }
  81. }
  82.  
  83. extension View {
  84.     func navigationAppearance2() -> some View {
  85.         self.modifier(NavAppearanceModifier2())
  86.     }
  87. }
  88.  
  89. // --------------------------------------------------------------------------------
  90. // MJRootViewController
  91. // --------------------------------------------------------------------------------
  92. struct MJRootView: View {
  93.     var body: some View {
  94.         NavigationView {
  95.             ZStack(alignment: .topLeading) {
  96.                 GeometryReader { geometry in
  97.                     List {
  98.                         Spacer()    // TODO: replace with the actual content
  99.                     }
  100.                 }
  101.             }
  102.             .frame(dynamicWidth: 414, dynamicHeight: 808)
  103.             .background(Color(.white))
  104.             .edgesIgnoringSafeArea(.all)
  105.             .navigationTitle("Title")
  106.             .navigationBarTitleDisplayMode(.automatic)
  107.         }
  108.     }
  109. }
  110.  
  111. struct MJRootView_Previews: PreviewProvider {
  112.     static var previews: some View {
  113.         MJRootView()
  114.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  115.             .previewInterfaceOrientation(.portrait)
  116.             .preferredColorScheme(.dark)
  117.     }
  118. }
  119.  
  120. // --------------------------------------------------------------------------------
  121. // MappaSensori
  122. // --------------------------------------------------------------------------------
  123. struct MappaSensoriView: View {
  124.     var body: some View {
  125.         NavigationView {
  126.             ZStack(alignment: .topLeading) {
  127.                 GeometryReader { geometry in
  128.                     ScrollView {
  129.                         Image("CasaDefault2")
  130.                             .resizable()
  131.                             .aspectRatio(contentMode: .fill)
  132.                             .frame(dynamicWidth: 320, dynamicHeight: 364)
  133.                             .clipped()
  134.                             .offset(dynamicX: 0, dynamicY: 3)
  135.                     }
  136.                     .introspectScrollView(customize: { scrollView in
  137.                         scrollView.clipsToBounds = true
  138.                         scrollView.delaysContentTouches = false
  139.                         scrollView.indicatorStyle = .white
  140.                         scrollView.maximumZoomScale = 3.0
  141.                         scrollView.minimumZoomScale = 0.3
  142.                         scrollView.showsHorizontalScrollIndicator = false
  143.                         scrollView.showsVerticalScrollIndicator = false
  144.                     })
  145.                     .frame(dynamicWidth: 414, dynamicHeight: 759)
  146.                     .background(Color(.white))
  147.                 }
  148.             }
  149.             .frame(dynamicWidth: 414, dynamicHeight: 808)
  150.             .background(Color(.white))
  151.             .edgesIgnoringSafeArea(.all)
  152.             .navigationBarTitleDisplayMode(.automatic)
  153.             .navigationBarItems(leading: Button(action: {}) {
  154.                
  155.             },
  156.             trailing: Button(action: {}) {
  157.                 Text("Edit")
  158.             })
  159.             .onAppear {
  160.                 _ = NavAppearanceModifier()
  161.             }
  162.         }
  163.     }
  164. }
  165.  
  166. struct MappaSensoriView_Previews: PreviewProvider {
  167.     static var previews: some View {
  168.         MappaSensoriView()
  169.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  170.             .previewInterfaceOrientation(.portrait)
  171.             .preferredColorScheme(.dark)
  172.     }
  173. }
  174.  
  175. // --------------------------------------------------------------------------------
  176. // UIViewController
  177. // --------------------------------------------------------------------------------
  178. struct UIView: View {
  179.     var body: some View {
  180.         ZStack(alignment: .topLeading) {
  181.             GeometryReader { geometry in
  182.                 Image("P_pulsante2.png")
  183.                     .resizable()
  184.                     .aspectRatio(contentMode: .fit)
  185.                     .frame(dynamicWidth: 240, dynamicHeight: 128)
  186.                     .clipped()
  187.                     .offset(dynamicX: 92, dynamicY: 339)
  188.             }
  189.         }
  190.         .frame(dynamicWidth: 414, dynamicHeight: 896)
  191.         .background(Color(.white))
  192.         .edgesIgnoringSafeArea(.all)
  193.     }
  194. }
  195.  
  196. struct UIView_Previews: PreviewProvider {
  197.     static var previews: some View {
  198.         UIView()
  199.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  200.             .previewInterfaceOrientation(.portrait)
  201.             .preferredColorScheme(.dark)
  202.     }
  203. }
  204.  
  205. // --------------------------------------------------------------------------------
  206. // AmbientiListTableController
  207. // --------------------------------------------------------------------------------
  208. struct AmbientiListTableView: View {
  209.     @State private var <#items#> = Array<<#Type#>>()
  210.     @State private var <#selectedItem#>: <#Type#>?
  211.    
  212.     var body: some View {
  213.         NavigationView {
  214.             ZStack(alignment: .topLeading) {
  215.                 GeometryReader { geometry in
  216.                     List {
  217.                         ForEach(<#items#>) { <#item#> in
  218.                             AmbientiListCell()
  219.                                 .listRowInsets(EdgeInsets())
  220.                                 .contentShape(Rectangle())
  221.                                 .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  222.                                 .onTapGesture {
  223.                                     <#selectedItem#> = <#item#>
  224.                                 }
  225.                         }
  226.                     }
  227.                     .introspectTableView(customize: { tableView in
  228.                         tableView.alwaysBounceHorizontal = true
  229.                         tableView.alwaysBounceVertical = true
  230.                         tableView.clipsToBounds = true
  231.                         tableView.separatorInset = UIEdgeInsets(top: 0.0, left: 0.0, bottom: 40.0, right: 0.0)
  232.                         tableView.separatorStyle = .default
  233.                     })
  234.                     .frame(dynamicWidth: 414, dynamicHeight: 757)
  235.                     .listStyle(.plain)
  236.                 }
  237.             }
  238.             .frame(dynamicWidth: 414, dynamicHeight: 808)
  239.             .background(Color(.white))
  240.             .edgesIgnoringSafeArea(.all)
  241.             .navigationTitle("Ambients list")
  242.             .navigationBarTitleDisplayMode(.automatic)
  243.             .navigationBarItems(leading: Button(action: {}) {
  244.                 Image(systemName: "plus")
  245.             })
  246.             .onAppear {
  247.                 _ = NavAppearanceModifier2()
  248.             }
  249.         }
  250.     }
  251. }
  252.  
  253. struct AmbientiListTableView_Previews: PreviewProvider {
  254.     static var previews: some View {
  255.         AmbientiListTableView()
  256.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  257.             .previewInterfaceOrientation(.portrait)
  258.             .preferredColorScheme(.dark)
  259.     }
  260. }
  261.  
  262. // --------------------------------------------------------------------------------
  263. // SensorInfoZoomImage
  264. // --------------------------------------------------------------------------------
  265. struct SensorInfoZoomImageView: View {
  266.     var body: some View {
  267.         NavigationView {
  268.             ZStack(alignment: .topLeading) {
  269.                 GeometryReader { geometry in
  270.                     ScrollView {
  271.                         Image("dht22_sch")
  272.                             .resizable()
  273.                             .aspectRatio(contentMode: .fit)
  274.                             .frame(dynamicWidth: 414, dynamicHeight: 896)
  275.                     }
  276.                     .introspectScrollView(customize: { scrollView in
  277.                         scrollView.clipsToBounds = true
  278.                         scrollView.maximumZoomScale = 10.0
  279.                     })
  280.                     .frame(dynamicWidth: 414, dynamicHeight: 896)
  281.                 }
  282.             }
  283.             .frame(dynamicWidth: 414, dynamicHeight: 896)
  284.             .edgesIgnoringSafeArea(.all)
  285.             .navigationBarTitleDisplayMode(.automatic)
  286.         }
  287.     }
  288. }
  289.  
  290. struct SensorInfoZoomImageView_Previews: PreviewProvider {
  291.     static var previews: some View {
  292.         SensorInfoZoomImageView()
  293.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  294.             .previewInterfaceOrientation(.portrait)
  295.             .preferredColorScheme(.dark)
  296.     }
  297. }
  298.  
  299. // --------------------------------------------------------------------------------
  300. // PickerDuration
  301. // --------------------------------------------------------------------------------
  302. struct PickerDurationView: View {
  303.     var body: some View {
  304.         NavigationView {
  305.             ZStack(alignment: .topLeading) {
  306.                 GeometryReader { geometry in
  307.                     //Picker("", selection: $bindingVariable) {}
  308.                    
  309.                     Text("How long the output PIN will remain active")
  310.                         .frame(dynamicWidth: 320, dynamicHeight: 60, alignment: .center)
  311.                         .clipped()
  312.                         .font(.system(size: 16, weight: .regular))
  313.                         .multilineTextAlignment(.center)
  314.                         .offset(dynamicX: 47, dynamicY: 114)
  315.                    
  316.                     Image("square_pulse")
  317.                         .resizable()
  318.                         .frame(dynamicWidth: 206, dynamicHeight: 54)
  319.                         .offset(dynamicX: 110, dynamicY: 377)
  320.                    
  321.                     Text("Label")
  322.                         .frame(dynamicWidth: 350, dynamicHeight: 65, alignment: .center)
  323.                         .font(.system(size: 21, weight: .regular))
  324.                         .multilineTextAlignment(.center)
  325.                         .offset(dynamicX: 32, dynamicY: 214)
  326.                 }
  327.             }
  328.             .frame(dynamicWidth: 414, dynamicHeight: 808)
  329.             .background(Color(.white))
  330.             .edgesIgnoringSafeArea(.all)
  331.             .navigationBarTitleDisplayMode(.automatic)
  332.         }
  333.     }
  334. }
  335.  
  336. struct PickerDurationView_Previews: PreviewProvider {
  337.     static var previews: some View {
  338.         PickerDurationView()
  339.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  340.             .previewInterfaceOrientation(.portrait)
  341.             .preferredColorScheme(.dark)
  342.     }
  343. }
  344.  
  345. // --------------------------------------------------------------------------------
  346. // DatePicker
  347. // --------------------------------------------------------------------------------
  348. struct DatePickerView: View {
  349.     var body: some View {
  350.         NavigationView {
  351.             ZStack(alignment: .topLeading) {
  352.                 GeometryReader { geometry in
  353.                     //DatePicker(selection: $selectedDate, in: dateClosedRange, displayedComponents: .date, label: { Text("Due Date") })
  354.                    
  355.                     Text("How long the output PIN will remain active")
  356.                         .frame(dynamicWidth: 320, dynamicHeight: 60, alignment: .center)
  357.                         .clipped()
  358.                         .font(.system(size: 16, weight: .regular))
  359.                         .multilineTextAlignment(.center)
  360.                         .foregroundColor(Color(red: 0.0, green: 0.47843137, blue: 1.0))
  361.                         .offset(dynamicX: 47, dynamicY: 114)
  362.                    
  363.                     Text("Duration: 12:00")
  364.                         .frame(dynamicWidth: 350, dynamicHeight: 59, alignment: .center)
  365.                         .font(.system(size: 21, weight: .regular))
  366.                         .multilineTextAlignment(.center)
  367.                         .offset(dynamicX: 32, dynamicY: 214)
  368.                    
  369.                     Image("square_pulse")
  370.                         .resizable()
  371.                         .frame(dynamicWidth: 206, dynamicHeight: 54)
  372.                         .offset(dynamicX: 104, dynamicY: 377)
  373.                 }
  374.             }
  375.             .frame(dynamicWidth: 414, dynamicHeight: 808)
  376.             .background(Color(.white))
  377.             .edgesIgnoringSafeArea(.all)
  378.             .navigationBarTitleDisplayMode(.automatic)
  379.         }
  380.     }
  381. }
  382.  
  383. struct DatePickerView_Previews: PreviewProvider {
  384.     static var previews: some View {
  385.         DatePickerView()
  386.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  387.             .previewInterfaceOrientation(.portrait)
  388.             .preferredColorScheme(.dark)
  389.     }
  390. }
  391.  
  392. // --------------------------------------------------------------------------------
  393. // SendMessage
  394. // --------------------------------------------------------------------------------
  395. struct SendMessageView: View {
  396.     @State private var Message: String = ""
  397.     @State private var MessageName: String = ""
  398.     @State private var MessageNumber: String = ""
  399.    
  400.     var body: some View {
  401.         NavigationView {
  402.             ZStack(alignment: .topLeading) {
  403.                 GeometryReader { geometry in
  404.                     ScrollView(.horizontal, showsIndicators: false) {
  405.                         TextField("Name", text: $MessageName)
  406.                             .textFieldStyle(RoundedBorderTextFieldStyle())
  407.                             .introspectTextField(customize: { textField in
  408.                                 textField.adjustsFontSizeToFitWidth = true
  409.                                 textField.clipsToBounds = true
  410.                                 textField.minimumFontSize = 17.0
  411.                             })
  412.                             .frame(dynamicWidth: 141, dynamicHeight: 30)
  413.                             .font(.system(size: 14, weight: .regular))
  414.                             .offset(dynamicX: 15, dynamicY: 20)
  415.                        
  416.                         Text("Message name")
  417.                             .frame(dynamicWidth: 146, dynamicHeight: 21, alignment: .leading)
  418.                             .clipped()
  419.                             .font(.system(size: 17, weight: .regular))
  420.                             .foregroundColor(Color(red: 0.0, green: 0.0, blue: 0.0))
  421.                             .offset(dynamicX: 259, dynamicY: 24)
  422.                        
  423.                         TextField("number", text: $MessageNumber)
  424.                             .textFieldStyle(RoundedBorderTextFieldStyle())
  425.                             .introspectTextField(customize: { textField in
  426.                                 textField.adjustsFontSizeToFitWidth = true
  427.                                 textField.clipsToBounds = true
  428.                                 textField.minimumFontSize = 17.0
  429.                             })
  430.                             .frame(dynamicWidth: 141, dynamicHeight: 30)
  431.                             .font(.system(size: 14, weight: .regular))
  432.                             .offset(dynamicX: 15, dynamicY: 65)
  433.                             .keyboardType(.numberPad)
  434.                        
  435.                         Text("Message index")
  436.                             .frame(dynamicWidth: 146, dynamicHeight: 21, alignment: .leading)
  437.                             .clipped()
  438.                             .font(.system(size: 17, weight: .regular))
  439.                             .foregroundColor(Color(red: 0.0, green: 0.0, blue: 0.0))
  440.                             .offset(dynamicX: 259, dynamicY: 69)
  441.                        
  442.                         TextField("Message", text: $Message)
  443.                             .textFieldStyle(RoundedBorderTextFieldStyle())
  444.                             .introspectTextField(customize: { textField in
  445.                                 textField.adjustsFontSizeToFitWidth = true
  446.                                 textField.clipsToBounds = true
  447.                                 textField.minimumFontSize = 17.0
  448.                             })
  449.                             .frame(dynamicWidth: 142, dynamicHeight: 30)
  450.                             .font(.system(size: 14, weight: .regular))
  451.                             .offset(dynamicX: 14, dynamicY: 112)
  452.                             .keyboardType(.asciiCapable)
  453.                        
  454.                         Text("Message")
  455.                             .frame(dynamicWidth: 146, dynamicHeight: 21, alignment: .leading)
  456.                             .clipped()
  457.                             .font(.system(size: 17, weight: .regular))
  458.                             .foregroundColor(Color(red: 0.0, green: 0.0, blue: 0.0))
  459.                             .offset(dynamicX: 259, dynamicY: 116)
  460.                        
  461.                         Text("#")
  462.                             .frame(dynamicWidth: 280, dynamicHeight: 21, alignment: .center)
  463.                             .clipped()
  464.                             .font(.system(size: 17, weight: .regular))
  465.                             .multilineTextAlignment(.center)
  466.                             .offset(dynamicX: 66, dynamicY: 310)
  467.                        
  468.                         Text("This message will be sent to Arduino")
  469.                             .frame(dynamicWidth: 320, dynamicHeight: 61, alignment: .center)
  470.                             .clipped()
  471.                             .font(.system(size: 17, weight: .regular))
  472.                             .multilineTextAlignment(.center)
  473.                             .offset(dynamicX: 46, dynamicY: 240)
  474.                     }
  475.                     .introspectScrollView(customize: { scrollView in
  476.                         scrollView.alwaysBounceHorizontal = true
  477.                         scrollView.clipsToBounds = true
  478.                         scrollView.showsHorizontalScrollIndicator = false
  479.                     })
  480.                     .frame(dynamicWidth: 414, dynamicHeight: 808)
  481.                 }
  482.             }
  483.             .frame(dynamicWidth: 414, dynamicHeight: 808)
  484.             .background(Color(red: 1.0, green: 1.0, blue: 1.0))
  485.             .edgesIgnoringSafeArea(.all)
  486.             .navigationTitle("Message configuration")
  487.             .navigationBarTitleDisplayMode(.automatic)
  488.             .navigationBarItems(trailing: Button(action: {}) {
  489.                 Text("Save")
  490.             })
  491.         }
  492.     }
  493. }
  494.  
  495. struct SendMessageView_Previews: PreviewProvider {
  496.     static var previews: some View {
  497.         SendMessageView()
  498.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  499.             .previewInterfaceOrientation(.portrait)
  500.             .preferredColorScheme(.dark)
  501.     }
  502. }
  503.  
  504. // --------------------------------------------------------------------------------
  505. // SelettoreGenerico
  506. // --------------------------------------------------------------------------------
  507. struct SelettoreGenericoView: View {
  508.     var body: some View {
  509.         NavigationView {
  510.             ZStack(alignment: .topLeading) {
  511.                 GeometryReader { geometry in
  512.                     //Picker("", selection: $bindingVariable) {}
  513.                    
  514.                     Text("Label")
  515.                         .frame(dynamicWidth: 320, dynamicHeight: 81, alignment: .center)
  516.                         .clipped()
  517.                         .font(.system(size: 20, weight: .regular))
  518.                         .multilineTextAlignment(.center)
  519.                         .offset(dynamicX: 46, dynamicY: 125)
  520.                    
  521.                     Text("Label")
  522.                         .frame(dynamicWidth: 320, dynamicHeight: 186, alignment: .center)
  523.                         .clipped()
  524.                         .font(.system(size: 20, weight: .regular))
  525.                         .multilineTextAlignment(.center)
  526.                         .offset(dynamicX: 46, dynamicY: 0)
  527.                 }
  528.             }
  529.             .frame(dynamicWidth: 414, dynamicHeight: 808)
  530.             .background(Color(.white))
  531.             .edgesIgnoringSafeArea(.all)
  532.             .navigationBarTitleDisplayMode(.automatic)
  533.             .navigationBarItems(leading: Button(action: {}) {
  534.                 HStack(spacing: 0) {
  535.                     Image(systemName: "chevron.left")
  536.                     Text("Back")
  537.                 }
  538.             })
  539.         }
  540.     }
  541. }
  542.  
  543. struct SelettoreGenericoView_Previews: PreviewProvider {
  544.     static var previews: some View {
  545.         SelettoreGenericoView()
  546.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  547.             .previewInterfaceOrientation(.portrait)
  548.             .preferredColorScheme(.dark)
  549.     }
  550. }
  551.  
  552. // --------------------------------------------------------------------------------
  553. // AvvioApp
  554. // --------------------------------------------------------------------------------
  555. struct AvvioAppView: View {
  556.     var body: some View {
  557.         ZStack(alignment: .topLeading) {
  558.             GeometryReader { geometry in
  559.                 ScrollView(.horizontal, showsIndicators: false) {
  560.                     Group {
  561.                         Text("A")
  562.                             .frame(dynamicWidth: 320, dynamicHeight: 81, alignment: .center)
  563.                             .clipped()
  564.                             .font(.custom("Noteworthy-Bold", size: 92))
  565.                             .multilineTextAlignment(.center)
  566.                             .offset(dynamicX: 46, dynamicY: 95)
  567.                        
  568.                         Text("Andrea Scavuzzo")
  569.                             .frame(dynamicWidth: 320, dynamicHeight: 21, alignment: .center)
  570.                             .clipped()
  571.                             .font(.system(size: 17, weight: .regular))
  572.                             .multilineTextAlignment(.center)
  573.                             .foregroundColor(Color(red: 0.0, green: 0.47843137, blue: 1.0))
  574.                             .offset(dynamicX: 46, dynamicY: 805)
  575.                        
  576.                         Text("www.andruino.it")
  577.                             .frame(dynamicWidth: 320, dynamicHeight: 21, alignment: .center)
  578.                             .clipped()
  579.                             .font(.system(size: 12, weight: .regular))
  580.                             .multilineTextAlignment(.center)
  581.                             .foregroundColor(Color(red: 0.0, green: 0.47843137, blue: 1.0))
  582.                             .offset(dynamicX: 46, dynamicY: 820)
  583.                        
  584.                         Image("100")
  585.                             .resizable()
  586.                             .aspectRatio(contentMode: .fit)
  587.                             .frame(dynamicWidth: 414, dynamicHeight: 41)
  588.                             .offset(dynamicX: 0, dynamicY: 761)
  589.                        
  590.                         Text("Push enabled")
  591.                             .frame(dynamicWidth: 320, dynamicHeight: 21, alignment: .center)
  592.                             .clipped()
  593.                             .font(.system(size: 10, weight: .regular))
  594.                             .multilineTextAlignment(.center)
  595.                             .foregroundColor(Color(red: 1.0, green: 0.23137255, blue: 0.1882353))
  596.                             .offset(dynamicX: 46, dynamicY: 740)
  597.                        
  598.                         Text("Connection")
  599.                             .frame(dynamicWidth: 320, dynamicHeight: 21, alignment: .center)
  600.                             .clipped()
  601.                             .font(.system(size: 10, weight: .regular))
  602.                             .multilineTextAlignment(.center)
  603.                             .foregroundColor(Color(red: 1.0, green: 0.23137255, blue: 0.1882353))
  604.                             .offset(dynamicX: 46, dynamicY: 726)
  605.                        
  606.                         Text("AppleWatch is now supported")
  607.                             .frame(dynamicWidth: 320, dynamicHeight: 21, alignment: .center)
  608.                             .clipped()
  609.                             .font(.system(size: 10, weight: .regular))
  610.                             .multilineTextAlignment(.center)
  611.                             .foregroundColor(Color(red: 1.0, green: 0.23137255, blue: 0.1882353))
  612.                             .offset(dynamicX: 46, dynamicY: 688)
  613.                        
  614.                         Text("Wired and wireless Arduino home sensors for iPhone")
  615.                             .frame(dynamicWidth: 393, dynamicHeight: 72, alignment: .center)
  616.                             .clipped()
  617.                             .font(.system(size: 18, weight: .regular))
  618.                             .multilineTextAlignment(.center)
  619.                             .foregroundColor(Color(red: 0.0, green: 0.47843137, blue: 1.0))
  620.                             .offset(dynamicX: 10, dynamicY: 206)
  621.                        
  622.                         Text("5.0")
  623.                             .frame(dynamicWidth: 322, dynamicHeight: 48, alignment: .center)
  624.                             .clipped()
  625.                             .font(.system(size: 17, weight: .regular))
  626.                             .multilineTextAlignment(.center)
  627.                             .foregroundColor(Color(red: 0.0, green: 0.47843137, blue: 1.0))
  628.                             .offset(dynamicX: 46, dynamicY: 66)
  629.                        
  630.                         Text("Label")
  631.                             .frame(dynamicWidth: 398, dynamicHeight: 21, alignment: .center)
  632.                             .font(.system(size: 17, weight: .regular))
  633.                             .multilineTextAlignment(.center)
  634.                             .foregroundColor(Color(red: 0.6666667, green: 0.6666667, blue: 0.6666667))
  635.                             .offset(dynamicX: 8, dynamicY: 61)
  636.                     }
  637.                    
  638.                     Group {
  639.                         Text("Lite")
  640.                             .frame(dynamicWidth: 320, dynamicHeight: 28, alignment: .center)
  641.                             .clipped()
  642.                             .font(.system(size: 13, weight: .regular))
  643.                             .multilineTextAlignment(.center)
  644.                             .foregroundColor(Color(red: 1.0, green: 0.23137255, blue: 0.1882353))
  645.                             .offset(dynamicX: 46, dynamicY: 161)
  646.                        
  647.                         Text("ndruino")
  648.                             .frame(dynamicWidth: 320, dynamicHeight: 26, alignment: .center)
  649.                             .clipped()
  650.                             .font(.custom("Noteworthy-Bold", size: 21))
  651.                             .multilineTextAlignment(.center)
  652.                             .offset(dynamicX: 46, dynamicY: 176)
  653.                        
  654.                         Image(systemName: "faceid")
  655.                             .resizable()
  656.                             .aspectRatio(contentMode: .fit)
  657.                             .frame(dynamicWidth: 69, dynamicHeight: 61)
  658.                             .clipped()
  659.                             .offset(dynamicX: 173, dynamicY: 375)
  660.                        
  661.                         Image("Andruino_Watch_preview")
  662.                             .resizable()
  663.                             .aspectRatio(contentMode: .fit)
  664.                             .frame(dynamicWidth: 86, dynamicHeight: 76)
  665.                             .offset(dynamicX: 164, dynamicY: 613)
  666.                     }
  667.                 }
  668.                 .introspectScrollView(customize: { scrollView in
  669.                     scrollView.clipsToBounds = true
  670.                     scrollView.showsHorizontalScrollIndicator = false
  671.                     scrollView.showsVerticalScrollIndicator = false
  672.                 })
  673.                 .frame(dynamicWidth: 414, dynamicHeight: 896)
  674.                 .background(Color(.white))
  675.             }
  676.         }
  677.         .frame(dynamicWidth: 414, dynamicHeight: 896)
  678.         .background(Color(.white))
  679.         .edgesIgnoringSafeArea(.all)
  680.     }
  681. }
  682.  
  683. struct AvvioAppView_Previews: PreviewProvider {
  684.     static var previews: some View {
  685.         AvvioAppView()
  686.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  687.             .previewInterfaceOrientation(.portrait)
  688.             .preferredColorScheme(.dark)
  689.     }
  690. }
  691.  
  692. // --------------------------------------------------------------------------------
  693. // PolicyWeb
  694. // --------------------------------------------------------------------------------
  695. struct PolicyWebView: View {
  696.     var body: some View {
  697.         NavigationView {
  698.             ZStack(content: {})
  699.                 .frame(dynamicWidth: 414, dynamicHeight: 896)
  700.                 .background(Color(.white))
  701.                 .edgesIgnoringSafeArea(.all)
  702.                 .navigationBarTitleDisplayMode(.automatic)
  703.         }
  704.     }
  705. }
  706.  
  707. struct PolicyWebView_Previews: PreviewProvider {
  708.     static var previews: some View {
  709.         PolicyWebView()
  710.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  711.             .previewInterfaceOrientation(.portrait)
  712.             .preferredColorScheme(.dark)
  713.     }
  714. }
  715.  
  716. // --------------------------------------------------------------------------------
  717. // GraphView
  718. // --------------------------------------------------------------------------------
  719. struct GraphView: View {
  720.     var body: some View {
  721.         ZStack(alignment: .topLeading) {
  722.             GeometryReader { geometry in
  723.                 //Picker("", selection: $bindingVariable) {}
  724.                
  725.                 ZStack(content: {})
  726.                     .frame(dynamicWidth: 414, dynamicHeight: 726)
  727.             }
  728.         }
  729.         .frame(dynamicWidth: 414, dynamicHeight: 764)
  730.         .background(Color(.white))
  731.         .edgesIgnoringSafeArea(.all)
  732.     }
  733. }
  734.  
  735. struct GraphView_Previews: PreviewProvider {
  736.     static var previews: some View {
  737.         GraphView()
  738.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  739.             .previewInterfaceOrientation(.portrait)
  740.             .preferredColorScheme(.dark)
  741.     }
  742. }
  743.  
  744. // --------------------------------------------------------------------------------
  745. // ColorCollectionView
  746. // --------------------------------------------------------------------------------
  747. struct ColorCollectionView: View {
  748.     var body: some View {
  749.         NavigationView {
  750.             ZStack(alignment: .topLeading) {
  751.                 GeometryReader { geometry in
  752.                     List {
  753.                         Spacer()    // TODO: replace with the actual content
  754.                     }
  755.                 }
  756.             }
  757.             .frame(dynamicWidth: 414, dynamicHeight: 808)
  758.             .background(Color(.white))
  759.             .edgesIgnoringSafeArea(.all)
  760.             .navigationTitle("Title")
  761.             .navigationBarTitleDisplayMode(.automatic)
  762.         }
  763.     }
  764. }
  765.  
  766. struct ColorCollectionView_Previews: PreviewProvider {
  767.     static var previews: some View {
  768.         ColorCollectionView()
  769.             .previewDevice(PreviewDevice(rawValue: "iPhone 11"))
  770.             .previewInterfaceOrientation(.portrait)
  771.             .preferredColorScheme(.dark)
  772.     }
  773. }
  774.  
  775. // --------------------------------------------------------------------------------
  776. // Colors
  777. // --------------------------------------------------------------------------------
  778. struct ColorsView: View {
  779.     @State private var <#items#> = Array<<#Type#>>()
  780.     @State private var <#selectedItem#>: <#Type#>?
  781.    
  782.     var body: some View {
  783.         List {
  784.             ForEach(<#items#>) { <#item#> in
  785.                 ColorsCell()
  786.                     .listRowInsets(EdgeInsets())
  787.                     .contentShape(Rectangle())
  788.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  789.                     .onTapGesture {
  790.                         <#selectedItem#> = <#item#>
  791.                     }
  792.             }
  793.         }
  794.         .introspectTableView(customize: { tableView in
  795.             tableView.alwaysBounceHorizontal = true
  796.             tableView.alwaysBounceVertical = true
  797.             tableView.clipsToBounds = true
  798.             tableView.separatorStyle = .default
  799.         })
  800.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  801.         .listStyle(.plain)
  802.     }
  803. }
  804.  
  805. struct ColorsView_Previews: PreviewProvider {
  806.     static var previews: some View {
  807.         ColorsView()
  808.     }
  809. }
  810.  
  811. // --------------------------------------------------------------------------------
  812. // NetworkConfig
  813. // --------------------------------------------------------------------------------
  814. struct NetworkConfigView: View {
  815.     @State private var <#items#> = Array<<#Type#>>()
  816.     @State private var <#selectedItem#>: <#Type#>?
  817.    
  818.     var body: some View {
  819.         List {
  820.             ForEach(<#items#>) { <#item#> in
  821.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  822.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  823.             }
  824.         }
  825.         .introspectTableView(customize: { tableView in
  826.             tableView.alwaysBounceHorizontal = true
  827.             tableView.alwaysBounceVertical = true
  828.             tableView.clipsToBounds = true
  829.             tableView.separatorStyle = .none
  830.         })
  831.         .frame(dynamicWidth: 320, dynamicHeight: 912)
  832.         .listStyle(.plain)
  833.     }
  834. }
  835.  
  836. struct NetworkConfigView_Previews: PreviewProvider {
  837.     static var previews: some View {
  838.         NetworkConfigView()
  839.     }
  840. }
  841.  
  842. // --------------------------------------------------------------------------------
  843. // ListaSensori
  844. // --------------------------------------------------------------------------------
  845. struct ListaSensoriView: View {
  846.     @State private var <#items#> = Array<<#Type#>>()
  847.     @State private var <#selectedItem#>: <#Type#>?
  848.    
  849.     var body: some View {
  850.         List {
  851.             ForEach(<#items#>) { <#item#> in
  852.                 CustomCell()
  853.                     .listRowInsets(EdgeInsets())
  854.                     .contentShape(Rectangle())
  855.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  856.                     .onTapGesture {
  857.                         <#selectedItem#> = <#item#>
  858.                     }
  859.                
  860.                 CustomCellSensor()
  861.                     .listRowInsets(EdgeInsets())
  862.                     .contentShape(Rectangle())
  863.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  864.                     .onTapGesture {
  865.                         <#selectedItem#> = <#item#>
  866.                     }
  867.                
  868.                 CustomCellPushButton()
  869.                     .listRowInsets(EdgeInsets())
  870.                     .contentShape(Rectangle())
  871.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  872.                     .onTapGesture {
  873.                         <#selectedItem#> = <#item#>
  874.                     }
  875.                
  876.                 CustomCellPwmSlider()
  877.                     .listRowInsets(EdgeInsets())
  878.                     .contentShape(Rectangle())
  879.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  880.                     .onTapGesture {
  881.                         <#selectedItem#> = <#item#>
  882.                     }
  883.                
  884.                 CustomCellTimer()
  885.                     .listRowInsets(EdgeInsets())
  886.                     .contentShape(Rectangle())
  887.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  888.                     .onTapGesture {
  889.                         <#selectedItem#> = <#item#>
  890.                     }
  891.                
  892.                 CustomCellBlinds()
  893.                     .listRowInsets(EdgeInsets())
  894.                     .contentShape(Rectangle())
  895.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  896.                     .onTapGesture {
  897.                         <#selectedItem#> = <#item#>
  898.                     }
  899.             }
  900.         }
  901.         .introspectTableView(customize: { tableView in
  902.             tableView.alwaysBounceHorizontal = true
  903.             tableView.alwaysBounceVertical = true
  904.             tableView.clipsToBounds = true
  905.         })
  906.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  907.         .listStyle(.plain)
  908.     }
  909. }
  910.  
  911. struct ListaSensoriView_Previews: PreviewProvider {
  912.     static var previews: some View {
  913.         ListaSensoriView()
  914.     }
  915. }
  916.  
  917. // --------------------------------------------------------------------------------
  918. // Debug_json
  919. // --------------------------------------------------------------------------------
  920. struct Debug_jsonView: View {
  921.     @State private var <#items#> = Array<<#Type#>>()
  922.     @State private var <#selectedItem#>: <#Type#>?
  923.    
  924.     var body: some View {
  925.         List {
  926.             ForEach(<#items#>) { <#item#> in
  927.                 DebugListCell()
  928.                     .listRowInsets(EdgeInsets())
  929.                     .contentShape(Rectangle())
  930.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  931.                     .onTapGesture {
  932.                         <#selectedItem#> = <#item#>
  933.                     }
  934.             }
  935.         }
  936.         .introspectTableView(customize: { tableView in
  937.             tableView.alwaysBounceHorizontal = true
  938.             tableView.alwaysBounceVertical = true
  939.             tableView.clipsToBounds = true
  940.             tableView.separatorStyle = .default
  941.         })
  942.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  943.         .listStyle(.plain)
  944.     }
  945. }
  946.  
  947. struct Debug_jsonView_Previews: PreviewProvider {
  948.     static var previews: some View {
  949.         Debug_jsonView()
  950.     }
  951. }
  952.  
  953. // --------------------------------------------------------------------------------
  954. // Language
  955. // --------------------------------------------------------------------------------
  956. struct LanguageView: View {
  957.     @State private var <#items#> = Array<<#Type#>>()
  958.     @State private var <#selectedItem#>: <#Type#>?
  959.    
  960.     var body: some View {
  961.         List {
  962.             ForEach(<#items#>) { <#item#> in
  963.                 LanguageCell()
  964.                     .listRowInsets(EdgeInsets())
  965.                     .contentShape(Rectangle())
  966.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  967.                     .onTapGesture {
  968.                         <#selectedItem#> = <#item#>
  969.                     }
  970.             }
  971.         }
  972.         .introspectTableView(customize: { tableView in
  973.             tableView.alwaysBounceHorizontal = true
  974.             tableView.alwaysBounceVertical = true
  975.             tableView.clipsToBounds = true
  976.         })
  977.         .frame(dynamicWidth: 414, dynamicHeight: 896)
  978.         .listStyle(.grouped)
  979.     }
  980. }
  981.  
  982. struct LanguageView_Previews: PreviewProvider {
  983.     static var previews: some View {
  984.         LanguageView()
  985.     }
  986. }
  987.  
  988. // --------------------------------------------------------------------------------
  989. // NewSensorListTableController
  990. // --------------------------------------------------------------------------------
  991. struct NewSensorListTableView: View {
  992.     @State private var <#items#> = Array<<#Type#>>()
  993.     @State private var <#selectedItem#>: <#Type#>?
  994.    
  995.     var body: some View {
  996.         List {
  997.             ForEach(<#items#>) { <#item#> in
  998.                 NewSensorListCell()
  999.                     .listRowInsets(EdgeInsets())
  1000.                     .contentShape(Rectangle())
  1001.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  1002.                     .onTapGesture {
  1003.                         <#selectedItem#> = <#item#>
  1004.                     }
  1005.             }
  1006.         }
  1007.         .introspectTableView(customize: { tableView in
  1008.             tableView.alwaysBounceHorizontal = true
  1009.             tableView.alwaysBounceVertical = true
  1010.             tableView.clipsToBounds = true
  1011.             tableView.separatorStyle = .default
  1012.         })
  1013.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  1014.         .listStyle(.plain)
  1015.     }
  1016. }
  1017.  
  1018. struct NewSensorListTableView_Previews: PreviewProvider {
  1019.     static var previews: some View {
  1020.         NewSensorListTableView()
  1021.     }
  1022. }
  1023.  
  1024. // --------------------------------------------------------------------------------
  1025. // AndruinoServerPhp
  1026. // --------------------------------------------------------------------------------
  1027. struct AndruinoServerPhpView: View {
  1028.     @State private var <#items#> = Array<<#Type#>>()
  1029.    
  1030.     var body: some View {
  1031.         List {
  1032.             ForEach(<#items#>) { <#item#> in
  1033.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  1034.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  1035.             }
  1036.         }
  1037.         .introspectTableView(customize: { tableView in
  1038.             tableView.alwaysBounceHorizontal = true
  1039.             tableView.alwaysBounceVertical = true
  1040.             tableView.clipsToBounds = true
  1041.             tableView.separatorStyle = .none
  1042.         })
  1043.         .frame(dynamicWidth: 414, dynamicHeight: 896)
  1044.         .listStyle(.plain)
  1045.     }
  1046. }
  1047.  
  1048. struct AndruinoServerPhpView_Previews: PreviewProvider {
  1049.     static var previews: some View {
  1050.         AndruinoServerPhpView()
  1051.     }
  1052. }
  1053.  
  1054. // --------------------------------------------------------------------------------
  1055. // Configuration
  1056. // --------------------------------------------------------------------------------
  1057. struct ConfigurationView: View {
  1058.     @State private var <#items#> = Array<<#Type#>>()
  1059.     @State private var <#selectedItem#>: <#Type#>?
  1060.    
  1061.     var body: some View {
  1062.         List {
  1063.             ForEach(<#items#>) { <#item#> in
  1064.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  1065.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  1066.             }
  1067.         }
  1068.         .introspectTableView(customize: { tableView in
  1069.             tableView.alwaysBounceHorizontal = true
  1070.             tableView.alwaysBounceVertical = true
  1071.             tableView.clipsToBounds = true
  1072.             tableView.separatorStyle = .none
  1073.         })
  1074.         .frame(dynamicWidth: 320, dynamicHeight: 632)
  1075.         .listStyle(.plain)
  1076.     }
  1077. }
  1078.  
  1079. struct ConfigurationView_Previews: PreviewProvider {
  1080.     static var previews: some View {
  1081.         ConfigurationView()
  1082.     }
  1083. }
  1084.  
  1085. // --------------------------------------------------------------------------------
  1086. // LoggerTableController
  1087. // --------------------------------------------------------------------------------
  1088. struct LoggerTableView: View {
  1089.     @State private var <#items#> = Array<<#Type#>>()
  1090.     @State private var <#selectedItem#>: <#Type#>?
  1091.    
  1092.     var body: some View {
  1093.         List {
  1094.             ForEach(<#items#>) { <#item#> in
  1095.                 LoggerCell()
  1096.                     .listRowInsets(EdgeInsets())
  1097.                     .contentShape(Rectangle())
  1098.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  1099.                     .onTapGesture {
  1100.                         <#selectedItem#> = <#item#>
  1101.                     }
  1102.             }
  1103.         }
  1104.         .introspectTableView(customize: { tableView in
  1105.             tableView.alwaysBounceHorizontal = true
  1106.             tableView.alwaysBounceVertical = true
  1107.             tableView.clipsToBounds = true
  1108.             tableView.separatorStyle = .default
  1109.         })
  1110.         .frame(dynamicWidth: 414, dynamicHeight: 896)
  1111.         .listStyle(.plain)
  1112.     }
  1113. }
  1114.  
  1115. struct LoggerTableView_Previews: PreviewProvider {
  1116.     static var previews: some View {
  1117.         LoggerTableView()
  1118.     }
  1119. }
  1120.  
  1121. // --------------------------------------------------------------------------------
  1122. // LoggerTableCtrlSensors
  1123. // --------------------------------------------------------------------------------
  1124. struct LoggerTableCtrlSensorsView: View {
  1125.     @State private var <#items#> = Array<<#Type#>>()
  1126.     @State private var <#selectedItem#>: <#Type#>?
  1127.    
  1128.     var body: some View {
  1129.         List {
  1130.             ForEach(<#items#>) { <#item#> in
  1131.                 LoggerSensorCell()
  1132.                     .listRowInsets(EdgeInsets())
  1133.                     .contentShape(Rectangle())
  1134.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  1135.                     .onTapGesture {
  1136.                         <#selectedItem#> = <#item#>
  1137.                     }
  1138.             }
  1139.         }
  1140.         .introspectTableView(customize: { tableView in
  1141.             tableView.alwaysBounceHorizontal = true
  1142.             tableView.alwaysBounceVertical = true
  1143.             tableView.clipsToBounds = true
  1144.             tableView.separatorStyle = .default
  1145.         })
  1146.         .frame(dynamicWidth: 414, dynamicHeight: 896)
  1147.         .listStyle(.plain)
  1148.     }
  1149. }
  1150.  
  1151. struct LoggerTableCtrlSensorsView_Previews: PreviewProvider {
  1152.     static var previews: some View {
  1153.         LoggerTableCtrlSensorsView()
  1154.     }
  1155. }
  1156.  
  1157. // --------------------------------------------------------------------------------
  1158. // FormulaSensore
  1159. // --------------------------------------------------------------------------------
  1160. struct FormulaSensoreView: View {
  1161.     @State private var <#items#> = Array<<#Type#>>()
  1162.    
  1163.     var body: some View {
  1164.         List {
  1165.             ForEach(<#items#>) { <#item#> in
  1166.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  1167.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  1168.             }
  1169.         }
  1170.         .introspectTableView(customize: { tableView in
  1171.             tableView.alwaysBounceHorizontal = true
  1172.             tableView.alwaysBounceVertical = true
  1173.             tableView.clipsToBounds = true
  1174.             tableView.separatorStyle = .default
  1175.         })
  1176.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  1177.         .listStyle(.plain)
  1178.     }
  1179. }
  1180.  
  1181. struct FormulaSensoreView_Previews: PreviewProvider {
  1182.     static var previews: some View {
  1183.         FormulaSensoreView()
  1184.     }
  1185. }
  1186.  
  1187. // --------------------------------------------------------------------------------
  1188. // PreferenzeSensore
  1189. // --------------------------------------------------------------------------------
  1190. struct PreferenzeSensoreView: View {
  1191.     @State private var <#items#> = Array<<#Type#>>()
  1192.    
  1193.     var body: some View {
  1194.         List {
  1195.             ForEach(<#items#>) { <#item#> in
  1196.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  1197.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  1198.             }
  1199.         }
  1200.         .introspectTableView(customize: { tableView in
  1201.             tableView.alwaysBounceHorizontal = true
  1202.             tableView.alwaysBounceVertical = true
  1203.             tableView.clipsToBounds = true
  1204.             tableView.separatorStyle = .default
  1205.         })
  1206.         .frame(dynamicWidth: 320, dynamicHeight: 912)
  1207.         .listStyle(.plain)
  1208.     }
  1209. }
  1210.  
  1211. struct PreferenzeSensoreView_Previews: PreviewProvider {
  1212.     static var previews: some View {
  1213.         PreferenzeSensoreView()
  1214.     }
  1215. }
  1216.  
  1217. // --------------------------------------------------------------------------------
  1218. // SensorInfo
  1219. // --------------------------------------------------------------------------------
  1220. struct SensorInfoView: View {
  1221.     @State private var <#items#> = Array<<#Type#>>()
  1222.     @State private var <#selectedItem#>: <#Type#>?
  1223.    
  1224.     var body: some View {
  1225.         List {
  1226.             ForEach(<#items#>) { <#item#> in
  1227.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  1228.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  1229.             }
  1230.         }
  1231.         .introspectTableView(customize: { tableView in
  1232.             tableView.alwaysBounceHorizontal = true
  1233.             tableView.alwaysBounceVertical = true
  1234.             tableView.clipsToBounds = true
  1235.             tableView.separatorStyle = .default
  1236.         })
  1237.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  1238.         .listStyle(.plain)
  1239.     }
  1240. }
  1241.  
  1242. struct SensorInfoView_Previews: PreviewProvider {
  1243.     static var previews: some View {
  1244.         SensorInfoView()
  1245.     }
  1246. }
  1247.  
  1248. // --------------------------------------------------------------------------------
  1249. // ListaGiorniSettamana
  1250. // --------------------------------------------------------------------------------
  1251. struct ListaGiorniSettamanaView: View {
  1252.     @State private var <#items#> = Array<<#Type#>>()
  1253.     @State private var <#selectedItem#>: <#Type#>?
  1254.    
  1255.     var body: some View {
  1256.         List {
  1257.             ForEach(<#items#>) { <#item#> in
  1258.                 LanguageCell()
  1259.                     .listRowInsets(EdgeInsets())
  1260.                     .contentShape(Rectangle())
  1261.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  1262.                     .onTapGesture {
  1263.                         <#selectedItem#> = <#item#>
  1264.                     }
  1265.             }
  1266.         }
  1267.         .introspectTableView(customize: { tableView in
  1268.             tableView.alwaysBounceHorizontal = true
  1269.             tableView.alwaysBounceVertical = true
  1270.             tableView.clipsToBounds = true
  1271.         })
  1272.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  1273.         .listStyle(.grouped)
  1274.     }
  1275. }
  1276.  
  1277. struct ListaGiorniSettamanaView_Previews: PreviewProvider {
  1278.     static var previews: some View {
  1279.         ListaGiorniSettamanaView()
  1280.     }
  1281. }
  1282.  
  1283. // --------------------------------------------------------------------------------
  1284. // GraphView_config
  1285. // --------------------------------------------------------------------------------
  1286. struct GraphView_configView: View {
  1287.     @State private var <#items#> = Array<<#Type#>>()
  1288.    
  1289.     var body: some View {
  1290.         List {
  1291.             ForEach(<#items#>) { <#item#> in
  1292.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  1293.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  1294.             }
  1295.         }
  1296.         .introspectTableView(customize: { tableView in
  1297.             tableView.alwaysBounceHorizontal = true
  1298.             tableView.alwaysBounceVertical = true
  1299.             tableView.clipsToBounds = true
  1300.         })
  1301.         .frame(dynamicWidth: 414, dynamicHeight: 764)
  1302.         .listStyle(.plain)
  1303.     }
  1304. }
  1305.  
  1306. struct GraphView_configView_Previews: PreviewProvider {
  1307.     static var previews: some View {
  1308.         GraphView_configView()
  1309.     }
  1310. }
  1311.  
  1312. // --------------------------------------------------------------------------------
  1313. // VariabileSlider
  1314. // --------------------------------------------------------------------------------
  1315. struct VariabileSliderView: View {
  1316.     @State private var <#items#> = Array<<#Type#>>()
  1317.    
  1318.     var body: some View {
  1319.         List {
  1320.             ForEach(<#items#>) { <#item#> in
  1321.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  1322.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  1323.             }
  1324.         }
  1325.         .introspectTableView(customize: { tableView in
  1326.             tableView.alwaysBounceHorizontal = true
  1327.             tableView.alwaysBounceVertical = true
  1328.             tableView.clipsToBounds = true
  1329.             tableView.separatorStyle = .default
  1330.         })
  1331.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  1332.         .listStyle(.plain)
  1333.     }
  1334. }
  1335.  
  1336. struct VariabileSliderView_Previews: PreviewProvider {
  1337.     static var previews: some View {
  1338.         VariabileSliderView()
  1339.     }
  1340. }
  1341.  
  1342. // --------------------------------------------------------------------------------
  1343. // SensoreDigitale
  1344. // --------------------------------------------------------------------------------
  1345. struct SensoreDigitaleView: View {
  1346.     @State private var <#items#> = Array<<#Type#>>()
  1347.    
  1348.     var body: some View {
  1349.         List {
  1350.             ForEach(<#items#>) { <#item#> in
  1351.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  1352.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  1353.             }
  1354.         }
  1355.         .introspectTableView(customize: { tableView in
  1356.             tableView.alwaysBounceHorizontal = true
  1357.             tableView.alwaysBounceVertical = true
  1358.             tableView.clipsToBounds = true
  1359.             tableView.separatorStyle = .default
  1360.         })
  1361.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  1362.         .listStyle(.plain)
  1363.     }
  1364. }
  1365.  
  1366. struct SensoreDigitaleView_Previews: PreviewProvider {
  1367.     static var previews: some View {
  1368.         SensoreDigitaleView()
  1369.     }
  1370. }
  1371.  
  1372. // --------------------------------------------------------------------------------
  1373. // AppConfig
  1374. // --------------------------------------------------------------------------------
  1375. struct AppConfigView: View {
  1376.     @State private var <#items#> = Array<<#Type#>>()
  1377.    
  1378.     var body: some View {
  1379.         List {
  1380.             ForEach(<#items#>) { <#item#> in
  1381.                 // It seems that you do not have a UITableViewCell added from the storyboard.
  1382.                 // If you have added the TableViewCell through a XiB, please convert the XiB and copy the result here.
  1383.             }
  1384.         }
  1385.         .introspectTableView(customize: { tableView in
  1386.             tableView.alwaysBounceHorizontal = true
  1387.             tableView.alwaysBounceVertical = true
  1388.             tableView.clipsToBounds = true
  1389.             tableView.separatorStyle = .default
  1390.         })
  1391.         .frame(dynamicWidth: 320, dynamicHeight: 1000)
  1392.         .listStyle(.plain)
  1393.     }
  1394. }
  1395.  
  1396. struct AppConfigView_Previews: PreviewProvider {
  1397.     static var previews: some View {
  1398.         AppConfigView()
  1399.     }
  1400. }
  1401.  
  1402. // --------------------------------------------------------------------------------
  1403. // BoardListTableController
  1404. // --------------------------------------------------------------------------------
  1405. struct BoardListTableView: View {
  1406.     @State private var <#items#> = Array<<#Type#>>()
  1407.     @State private var <#selectedItem#>: <#Type#>?
  1408.    
  1409.     var body: some View {
  1410.         List {
  1411.             ForEach(<#items#>) { <#item#> in
  1412.                 BoardListCell()
  1413.                     .listRowInsets(EdgeInsets())
  1414.                     .contentShape(Rectangle())
  1415.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  1416.                     .onTapGesture {
  1417.                         <#selectedItem#> = <#item#>
  1418.                     }
  1419.             }
  1420.         }
  1421.         .introspectTableView(customize: { tableView in
  1422.             tableView.alwaysBounceHorizontal = true
  1423.             tableView.alwaysBounceVertical = true
  1424.             tableView.clipsToBounds = true
  1425.             tableView.separatorStyle = .default
  1426.         })
  1427.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  1428.         .listStyle(.plain)
  1429.     }
  1430. }
  1431.  
  1432. struct BoardListTableView_Previews: PreviewProvider {
  1433.     static var previews: some View {
  1434.         BoardListTableView()
  1435.     }
  1436. }
  1437.  
  1438. // --------------------------------------------------------------------------------
  1439. // SensorListTableController
  1440. // --------------------------------------------------------------------------------
  1441. struct SensorListTableView: View {
  1442.     @State private var <#items#> = Array<<#Type#>>()
  1443.     @State private var <#selectedItem#>: <#Type#>?
  1444.    
  1445.     var body: some View {
  1446.         List {
  1447.             ForEach(<#items#>) { <#item#> in
  1448.                 SensorListCell()
  1449.                     .listRowInsets(EdgeInsets())
  1450.                     .contentShape(Rectangle())
  1451.                     .modifier(SelectionModifier(checked: <#selectedItem#> == <#item#>))
  1452.                     .onTapGesture {
  1453.                         <#selectedItem#> = <#item#>
  1454.                     }
  1455.             }
  1456.         }
  1457.         .introspectTableView(customize: { tableView in
  1458.             tableView.alwaysBounceHorizontal = true
  1459.             tableView.alwaysBounceVertical = true
  1460.             tableView.clipsToBounds = true
  1461.             tableView.separatorStyle = .default
  1462.         })
  1463.         .frame(dynamicWidth: 414, dynamicHeight: 808)
  1464.         .listStyle(.plain)
  1465.     }
  1466. }
  1467.  
  1468. struct SensorListTableView_Previews: PreviewProvider {
  1469.     static var previews: some View {
  1470.         SensorListTableView()
  1471.     }
  1472. }
  1473.  
  1474. // --------------------------------------------------------------------------------
  1475. // TabBarController
  1476. // --------------------------------------------------------------------------------
  1477. struct TabBarView: View {
  1478.     var body: some View {
  1479.         TabView {
  1480.             MappaSensoriView()
  1481.                 .tabItem {
  1482.                     VStack {
  1483.                         Image("home38")
  1484.            
  1485.                         Text("Map")
  1486.                     }
  1487.                  }
  1488.            
  1489.             ()
  1490.                 .tabItem {
  1491.                     VStack {
  1492.                         Image("list38")
  1493.            
  1494.                         Text("List")
  1495.                     }
  1496.                  }
  1497.            
  1498.             AmbientiListTableView()
  1499.                 .tabItem {
  1500.                     VStack {
  1501.                         Image("4case")
  1502.            
  1503.                         Text("Ambients")
  1504.                     }
  1505.                  }
  1506.            
  1507.             ()
  1508.                 .tabItem {
  1509.                     VStack {
  1510.                         Image("setting38")
  1511.            
  1512.                         Text("Settings")
  1513.                     }
  1514.                  }
  1515.            
  1516.             ()
  1517.                 .tabItem {
  1518.                     VStack {
  1519.                         Image("iot")
  1520.            
  1521.                         Text("Arduino boards")
  1522.                     }
  1523.                  }
  1524.            
  1525.             ()
  1526.                 .tabItem {
  1527.                     VStack {
  1528.                         Image("sensori")
  1529.            
  1530.                         Text("Global sensors list")
  1531.                     }
  1532.                  }
  1533.            
  1534.             ()
  1535.                 .tabItem {
  1536.                     VStack {
  1537.                         Image("graph3_38")
  1538.            
  1539.                         Text("Graphs")
  1540.                     }
  1541.                  }
  1542.         }
  1543.         .introspectTabBarController(customize: { tabBarController in
  1544.             tabBarController.tabBar.backgroundColor = UIColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0)
  1545.         })
  1546.     }
  1547. }
  1548.  
  1549. // --------------------------------------------------------------------------------
  1550. // GraphTabBViewController
  1551. // --------------------------------------------------------------------------------
  1552. struct GraphTabBView: View {
  1553.     var body: some View {
  1554.         TabView {
  1555.             GraphView()
  1556.                 .tabItem {
  1557.                     VStack {
  1558.                         Image("graph3_38")
  1559.            
  1560.                         Text("Graph")
  1561.                     }
  1562.                  }
  1563.            
  1564.             ()
  1565.                 .tabItem {
  1566.                     VStack {
  1567.                         Image("setting38")
  1568.            
  1569.                         Text("Configuration")
  1570.                     }
  1571.                  }
  1572.         }
  1573.         .introspectTabBarController(customize: { tabBarController in
  1574.             tabBarController.tabBar.isTranslucent = false
  1575.         })
  1576.     }
  1577. }
  1578.  
  1579. // --------------------------------------------------------------------------------
  1580. // AmbientiListCell
  1581. // --------------------------------------------------------------------------------
  1582. struct AmbientiListCell: View {
  1583.     var body: some View {
  1584.         Text("Label")
  1585.             .frame(dynamicWidth: 291, dynamicHeight: 23, alignment: .leading)
  1586.             .font(.system(size: 24, weight: .regular))
  1587.             .offset(dynamicX: 92, dynamicY: 9)
  1588.        
  1589.         Text("Label")
  1590.             .frame(dynamicWidth: 262, dynamicHeight: 19, alignment: .leading)
  1591.             .font(.system(size: 15, weight: .regular))
  1592.             .foregroundColor(Color(red: 1.0, green: 0.58431375, blue: 0.0))
  1593.             .offset(dynamicX: 113, dynamicY: 62)
  1594.        
  1595.         Image("CasaDefault2")
  1596.             .resizable()
  1597.             .aspectRatio(contentMode: .fill)
  1598.             .frame(dynamicWidth: 70, dynamicHeight: 70)
  1599.             .clipped()
  1600.             .offset(dynamicX: 9, dynamicY: 10)
  1601.        
  1602.         Text("Label")
  1603.             .frame(dynamicWidth: 262, dynamicHeight: 19, alignment: .leading)
  1604.             .font(.system(size: 15, weight: .regular))
  1605.             .foregroundColor(Color(red: 1.0, green: 0.58431375, blue: 0.0))
  1606.             .offset(dynamicX: 113, dynamicY: 36)
  1607.     }
  1608. }
  1609.  
  1610. // --------------------------------------------------------------------------------
  1611. // ColorsCell
  1612. // --------------------------------------------------------------------------------
  1613. struct ColorsCell: View {
  1614.     var body: some View {
  1615.         Text("Label")
  1616.             .frame(dynamicWidth: 1294, dynamicHeight: 1000, alignment: .leading)
  1617.             .font(.system(size: 17, weight: .regular))
  1618.     }
  1619. }
  1620.  
  1621. // --------------------------------------------------------------------------------
  1622. // CustomCell
  1623. // --------------------------------------------------------------------------------
  1624. struct CustomCell: View {
  1625.     var body: some View {
  1626.         Text("11:50")
  1627.             .frame(dynamicWidth: 167, dynamicHeight: 24, alignment: .leading)
  1628.             .clipped()
  1629.             .font(.system(size: 15, weight: .regular))
  1630.             .offset(dynamicX: 237, dynamicY: 57)
  1631.        
  1632.         Text("dig0")
  1633.             .frame(dynamicWidth: 184, dynamicHeight: 24, alignment: .leading)
  1634.             .clipped()
  1635.             .font(.system(size: 14, weight: .regular))
  1636.             .offset(dynamicX: 8, dynamicY: 57)
  1637.             .opacity(0.75)
  1638.        
  1639.         // TODO: Unsupported element class: UIActivityindicatorView
  1640.        
  1641.         Image("clock")
  1642.             .resizable()
  1643.             .frame(dynamicWidth: 22, dynamicHeight: 22)
  1644.             .offset(dynamicX: 244, dynamicY: 33)
  1645.        
  1646.         Image("5_battery_5_color_3d")
  1647.             .resizable()
  1648.             .aspectRatio(contentMode: .fit)
  1649.             .frame(dynamicWidth: 17, dynamicHeight: 17)
  1650.             .offset(dynamicX: 23, dynamicY: 34)
  1651.        
  1652.         Image("rf_no_signal3")
  1653.             .resizable()
  1654.             .aspectRatio(contentMode: .fit)
  1655.             .frame(dynamicWidth: 15, dynamicHeight: 15)
  1656.             .offset(dynamicX: 5, dynamicY: 35)
  1657.        
  1658.         Text("Name")
  1659.             .frame(dynamicWidth: 223, dynamicHeight: 25, alignment: .leading)
  1660.             .clipped()
  1661.             .font(.system(size: 20, weight: .bold))
  1662.             .offset(dynamicX: 3, dynamicY: 5)
  1663.        
  1664.         Image("crono2")
  1665.             .resizable()
  1666.             .frame(dynamicWidth: 20, dynamicHeight: 20)
  1667.             .offset(dynamicX: 149, dynamicY: 33)
  1668.        
  1669.         Toggle(isOn: $SwitchCell, label: {})
  1670.             .frame(dynamicWidth: 52, dynamicHeight: 31, alignment: .topLeading)
  1671.             .offset(dynamicX: 304, dynamicY: 28)
  1672.             .aspectRatio(contentMode: .fill)
  1673.             .labelsHidden()
  1674.        
  1675.         Text("Low")
  1676.             .frame(dynamicWidth: 144, dynamicHeight: 40, alignment: .trailing)
  1677.             .clipped()
  1678.             .font(.system(size: 18, weight: .bold))
  1679.             .multilineTextAlignment(.trailing)
  1680.             .offset(dynamicX: 260, dynamicY: -4)
  1681.     }
  1682. }
  1683.  
  1684. // --------------------------------------------------------------------------------
  1685. // CustomCellSensor
  1686. // --------------------------------------------------------------------------------
  1687. struct CustomCellSensor: View {
  1688.     var body: some View {
  1689.         Text("L: 21")
  1690.             .frame(dynamicWidth: 174, dynamicHeight: 21, alignment: .trailing)
  1691.             .clipped()
  1692.             .font(.system(size: 15, weight: .regular))
  1693.             .multilineTextAlignment(.trailing)
  1694.             .offset(dynamicX: 162, dynamicY: 49)
  1695.             .opacity(0.6)
  1696.        
  1697.         Text("16 C°")
  1698.             .frame(dynamicWidth: 104, dynamicHeight: 42, alignment: .trailing)
  1699.             .clipped()
  1700.             .font(.system(size: 18, weight: .bold))
  1701.             .multilineTextAlignment(.trailing)
  1702.             .offset(dynamicX: 300, dynamicY: -3)
  1703.        
  1704.         Image("link3")
  1705.             .resizable()
  1706.             .frame(dynamicWidth: 15, dynamicHeight: 15)
  1707.             .offset(dynamicX: 48, dynamicY: 29)
  1708.        
  1709.         Text("var55")
  1710.             .frame(dynamicWidth: 186, dynamicHeight: 22, alignment: .leading)
  1711.             .clipped()
  1712.             .font(.system(size: 14, weight: .regular))
  1713.             .offset(dynamicX: 8, dynamicY: 48)
  1714.             .opacity(0.75)
  1715.        
  1716.         Text("Name")
  1717.             .frame(dynamicWidth: 249, dynamicHeight: 25, alignment: .leading)
  1718.             .clipped()
  1719.             .font(.system(size: 20, weight: .bold))
  1720.             .offset(dynamicX: 3, dynamicY: 5)
  1721.        
  1722.         Text("H: 28")
  1723.             .frame(dynamicWidth: 174, dynamicHeight: 21, alignment: .trailing)
  1724.             .clipped()
  1725.             .font(.system(size: 15, weight: .regular))
  1726.             .multilineTextAlignment(.trailing)
  1727.             .offset(dynamicX: 162, dynamicY: -1)
  1728.             .opacity(0.6)
  1729.        
  1730.         Image("rf_no_signal3")
  1731.             .resizable()
  1732.             .aspectRatio(contentMode: .fit)
  1733.             .frame(dynamicWidth: 15, dynamicHeight: 15)
  1734.             .offset(dynamicX: 5, dynamicY: 29)
  1735.        
  1736.         Image("5_battery_5_color_3d")
  1737.             .resizable()
  1738.             .aspectRatio(contentMode: .fit)
  1739.             .frame(dynamicWidth: 17, dynamicHeight: 17)
  1740.             .offset(dynamicX: 23, dynamicY: 29)
  1741.        
  1742.         Button(action: {
  1743.             GraphIconAction()
  1744.         }) {
  1745.             Image("graph5").layoutPriority(1.0)
  1746.                 .frame(dynamicWidth: 40, dynamicHeight: 40, alignment: .center)
  1747.         }
  1748.         .aspectRatio(contentMode: .fill)
  1749.         .foregroundColor(Color.white)
  1750.         .offset(dynamicX: 360, dynamicY: 30)
  1751.             .opacity(0.8)
  1752.        
  1753.         Stepper(value: $IncrementaLimite, in: -0.5...0.5, step: 0.5, label: {})
  1754.             .introspectStepper(customize: { stepper in
  1755.                 stepper.autorepeat = true
  1756.                 stepper.isContinuous = true
  1757.             })
  1758.             .frame(dynamicWidth: 96, dynamicHeight: 29)
  1759.             .offset(dynamicX: 205, dynamicY: 18)
  1760.             .labelsHidden()
  1761.             .opacity(0.75)
  1762.        
  1763.         Text("dig5")
  1764.             .frame(dynamicWidth: 43, dynamicHeight: 21, alignment: .leading)
  1765.             .clipped()
  1766.             .font(.system(size: 12, weight: .regular))
  1767.             .offset(dynamicX: 71, dynamicY: 9)
  1768.     }
  1769. }
  1770.  
  1771. // --------------------------------------------------------------------------------
  1772. // CustomCellPushButton
  1773. // --------------------------------------------------------------------------------
  1774. struct CustomCellPushButton: View {
  1775.     var body: some View {
  1776.         Text("Name")
  1777.             .frame(dynamicWidth: 218, dynamicHeight: 25, alignment: .leading)
  1778.             .clipped()
  1779.             .font(.system(size: 20, weight: .bold))
  1780.             .offset(dynamicX: 3, dynamicY: 5)
  1781.        
  1782.         Text("Label")
  1783.             .frame(dynamicWidth: 111, dynamicHeight: 23, alignment: .leading)
  1784.             .clipped()
  1785.             .font(.system(size: 14, weight: .regular))
  1786.             .offset(dynamicX: 8, dynamicY: 43)
  1787.             .opacity(0.75)
  1788.        
  1789.         Text("Low")
  1790.             .frame(dynamicWidth: 144, dynamicHeight: 40, alignment: .trailing)
  1791.             .clipped()
  1792.             .font(.system(size: 18, weight: .bold))
  1793.             .multilineTextAlignment(.trailing)
  1794.             .offset(dynamicX: 260, dynamicY: -4)
  1795.        
  1796.         // TODO: Unsupported element class: UIActivityindicatorView
  1797.        
  1798.         Text("11:50")
  1799.             .frame(dynamicWidth: 143, dynamicHeight: 24, alignment: .leading)
  1800.             .clipped()
  1801.             .font(.system(size: 15, weight: .regular))
  1802.             .offset(dynamicX: 122, dynamicY: 60)
  1803.        
  1804.         Image("clock")
  1805.             .resizable()
  1806.             .frame(dynamicWidth: 22, dynamicHeight: 22)
  1807.             .offset(dynamicX: 129, dynamicY: 28)
  1808.        
  1809.         Button(action: {
  1810.             PushButtonCellAction()
  1811.         }) {
  1812.             Image("P_pulsante3.png").foregroundColor(Color(red: 0.1352964, green: 1.0, blue: 0.024918795)).layoutPriority(1.0)
  1813.                 .frame(dynamicWidth: 44, dynamicHeight: 44, alignment: .center)
  1814.         }
  1815.         .aspectRatio(contentMode: .fill)
  1816.         .foregroundColor(Color.white)
  1817.         .offset(dynamicX: 307, dynamicY: 32)
  1818.     }
  1819. }
  1820.  
  1821. // --------------------------------------------------------------------------------
  1822. // CustomCellPwmSlider
  1823. // --------------------------------------------------------------------------------
  1824. struct CustomCellPwmSlider: View {
  1825.     var body: some View {
  1826.         Text("Name")
  1827.             .frame(dynamicWidth: 400, dynamicHeight: 25, alignment: .leading)
  1828.             .clipped()
  1829.             .font(.system(size: 20, weight: .bold))
  1830.             .offset(dynamicX: 3, dynamicY: 7)
  1831.        
  1832.         Text("Label")
  1833.             .frame(dynamicWidth: 172, dynamicHeight: 23, alignment: .leading)
  1834.             .clipped()
  1835.             .font(.system(size: 14, weight: .regular))
  1836.             .offset(dynamicX: 8, dynamicY: 64)
  1837.             .opacity(0.75)
  1838.        
  1839.         Text("10%")
  1840.             .frame(dynamicWidth: 144, dynamicHeight: 40, alignment: .trailing)
  1841.             .clipped()
  1842.             .font(.system(size: 18, weight: .bold))
  1843.             .multilineTextAlignment(.trailing)
  1844.             .offset(dynamicX: 260, dynamicY: -3)
  1845.        
  1846.         Slider(value: $Slider, in: 0.0...255, step: 2.55)
  1847.             .introspectSlider(customize: { slider in
  1848.                 slider.isContinuous = true
  1849.             })
  1850.             .frame(dynamicWidth: 346, dynamicHeight: 29)
  1851.             .offset(dynamicX: 54, dynamicY: 33)
  1852.        
  1853.         // TODO: Unsupported element class: UIActivityindicatorView
  1854.     }
  1855. }
  1856.  
  1857. // --------------------------------------------------------------------------------
  1858. // CustomCellTimer
  1859. // --------------------------------------------------------------------------------
  1860. struct CustomCellTimer: View {
  1861.     var body: some View {
  1862.         Text("Name")
  1863.             .frame(dynamicWidth: 301, dynamicHeight: 25, alignment: .leading)
  1864.             .clipped()
  1865.             .font(.system(size: 20, weight: .bold))
  1866.             .offset(dynamicX: 3, dynamicY: 5)
  1867.        
  1868.         Text("Label")
  1869.             .frame(dynamicWidth: 173, dynamicHeight: 23, alignment: .leading)
  1870.             .clipped()
  1871.             .font(.system(size: 14, weight: .regular))
  1872.             .offset(dynamicX: 8, dynamicY: 43)
  1873.             .opacity(0.75)
  1874.        
  1875.         Text("0")
  1876.             .frame(dynamicWidth: 130, dynamicHeight: 40, alignment: .trailing)
  1877.             .clipped()
  1878.             .font(.system(size: 18, weight: .bold))
  1879.             .multilineTextAlignment(.trailing)
  1880.             .offset(dynamicX: 274, dynamicY: -2)
  1881.        
  1882.         Text("Timer Lun Mart Merc Giov")
  1883.             .frame(dynamicWidth: 167, dynamicHeight: 24, alignment: .leading)
  1884.             .font(.system(size: 16, weight: .regular))
  1885.             .offset(dynamicX: 237, dynamicY: 58)
  1886.        
  1887.         Image("clock")
  1888.             .resizable()
  1889.             .frame(dynamicWidth: 44, dynamicHeight: 41)
  1890.             .offset(dynamicX: 307, dynamicY: 23)
  1891.     }
  1892. }
  1893.  
  1894. // --------------------------------------------------------------------------------
  1895. // CustomCellBlinds
  1896. // --------------------------------------------------------------------------------
  1897. struct CustomCellBlinds: View {
  1898.     var body: some View {
  1899.         Text("Name")
  1900.             .frame(dynamicWidth: 207, dynamicHeight: 25, alignment: .leading)
  1901.             .clipped()
  1902.             .font(.system(size: 20, weight: .bold))
  1903.             .offset(dynamicX: 3, dynamicY: 5)
  1904.        
  1905.         Text("Label")
  1906.             .frame(dynamicWidth: 172, dynamicHeight: 23, alignment: .leading)
  1907.             .clipped()
  1908.             .font(.system(size: 14, weight: .regular))
  1909.             .offset(dynamicX: 8, dynamicY: 60)
  1910.             .opacity(0.75)
  1911.        
  1912.         Text("0")
  1913.             .frame(dynamicWidth: 185, dynamicHeight: 26, alignment: .trailing)
  1914.             .clipped()
  1915.             .font(.system(size: 18, weight: .bold))
  1916.             .multilineTextAlignment(.trailing)
  1917.             .offset(dynamicX: 219, dynamicY: 60)
  1918.        
  1919.         Text("0")
  1920.             .frame(dynamicWidth: 185, dynamicHeight: 26, alignment: .trailing)
  1921.             .clipped()
  1922.             .font(.system(size: 18, weight: .bold))
  1923.             .multilineTextAlignment(.trailing)
  1924.             .offset(dynamicX: 219, dynamicY: 5)
  1925.        
  1926.         //Picker("", selection: $bindingVariable) {}
  1927.        
  1928.         // TODO: Unsupported element class: UIActivityindicatorView
  1929.     }
  1930. }
  1931.  
  1932. // --------------------------------------------------------------------------------
  1933. // DebugListCell
  1934. // --------------------------------------------------------------------------------
  1935. struct DebugListCell: View {
  1936.     var body: some View {
  1937.         Text("destra destra destra")
  1938.             .frame(dynamicWidth: 193, dynamicHeight: 21, alignment: .trailing)
  1939.             .font(.system(size: 17, weight: .regular))
  1940.             .multilineTextAlignment(.trailing)
  1941.             .offset(dynamicX: 205, dynamicY: 14)
  1942.        
  1943.         Text("Sinistra label")
  1944.             .frame(dynamicWidth: 348, dynamicHeight: 21, alignment: .leading)
  1945.             .font(.system(size: 17, weight: .regular))
  1946.             .offset(dynamicX: 11, dynamicY: 15)
  1947.        
  1948.         Toggle(isOn: $interruttore, label: {})
  1949.             .frame(dynamicWidth: 49, dynamicHeight: 31, alignment: .topLeading)
  1950.             .offset(dynamicX: 346, dynamicY: 9)
  1951.             .aspectRatio(contentMode: .fill)
  1952.             .labelsHidden()
  1953.     }
  1954. }
  1955.  
  1956. // --------------------------------------------------------------------------------
  1957. // LanguageCell
  1958. // --------------------------------------------------------------------------------
  1959. struct LanguageCell: View {
  1960.     var body: some View {
  1961.         Text("Label")
  1962.             .frame(dynamicWidth: 207, dynamicHeight: 21, alignment: .leading)
  1963.             .clipped()
  1964.             .font(.system(size: 17, weight: .regular))
  1965.             .offset(dynamicX: 53, dynamicY: 11)
  1966.        
  1967.         Image("En")
  1968.             .resizable()
  1969.             .frame(dynamicWidth: 33, dynamicHeight: 33)
  1970.             .offset(dynamicX: 9, dynamicY: 5)
  1971.     }
  1972. }
  1973.  
  1974. // --------------------------------------------------------------------------------
  1975. // NewSensorListCell
  1976. // --------------------------------------------------------------------------------
  1977. struct NewSensorListCell: View {
  1978.     var body: some View {
  1979.         Image("dht22")
  1980.             .resizable()
  1981.             .aspectRatio(contentMode: .fit)
  1982.             .frame(dynamicWidth: 60, dynamicHeight: 60)
  1983.             .offset(dynamicX: 8, dynamicY: 11)
  1984.        
  1985.         Text("Tipo_sensore")
  1986.             .frame(dynamicWidth: 302, dynamicHeight: 21, alignment: .leading)
  1987.             .font(.system(size: 17, weight: .regular))
  1988.             .offset(dynamicX: 76, dynamicY: 31)
  1989.        
  1990.         Text("Mode")
  1991.             .frame(dynamicWidth: 110, dynamicHeight: 21, alignment: .leading)
  1992.             .font(.system(size: 15, weight: .regular))
  1993.             .foregroundColor(Color(red: 1.0, green: 0.23137255, blue: 0.1882353))
  1994.             .offset(dynamicX: 90, dynamicY: 58)
  1995.        
  1996.         Text("Mode")
  1997.             .frame(dynamicWidth: 132, dynamicHeight: 21, alignment: .trailing)
  1998.             .font(.system(size: 15, weight: .regular))
  1999.             .multilineTextAlignment(.trailing)
  2000.             .foregroundColor(Color(red: 1.0, green: 0.58431375, blue: 0.0))
  2001.             .offset(dynamicX: 226, dynamicY: 58)
  2002.     }
  2003. }
  2004.  
  2005. // --------------------------------------------------------------------------------
  2006. // LoggerCell
  2007. // --------------------------------------------------------------------------------
  2008. struct LoggerCell: View {
  2009.     var body: some View {
  2010.         Text("Home ambient")
  2011.             .frame(dynamicWidth: 369, dynamicHeight: 24, alignment: .leading)
  2012.             .font(.system(size: 20, weight: .regular))
  2013.             .offset(dynamicX: 15, dynamicY: 8)
  2014.        
  2015.         Text("Label")
  2016.             .frame(dynamicWidth: 333, dynamicHeight: 21, alignment: .leading)
  2017.             .font(.system(size: 14, weight: .regular))
  2018.             .foregroundColor(Color(red: 1.0, green: 0.23137255, blue: 0.1882353))
  2019.             .offset(dynamicX: 23, dynamicY: 32)
  2020.        
  2021.         Text("Last connection:")
  2022.             .frame(dynamicWidth: 310, dynamicHeight: 21, alignment: .leading)
  2023.             .font(.system(size: 14, weight: .regular))
  2024.             .foregroundColor(Color(red: 1.0, green: 0.58431375, blue: 0.0))
  2025.             .offset(dynamicX: 23, dynamicY: 54)
  2026.        
  2027.         Text("Last connection:")
  2028.             .frame(dynamicWidth: 251, dynamicHeight: 21, alignment: .leading)
  2029.             .font(.system(size: 14, weight: .regular))
  2030.             .foregroundColor(Color(red: 1.0, green: 0.58431375, blue: 0.0))
  2031.             .offset(dynamicX: 188, dynamicY: 36)
  2032.             .hidden()
  2033.     }
  2034. }
  2035.  
  2036. // --------------------------------------------------------------------------------
  2037. // LoggerSensorCell
  2038. // --------------------------------------------------------------------------------
  2039. struct LoggerSensorCell: View {
  2040.     var body: some View {
  2041.         Text("Label")
  2042.             .frame(dynamicWidth: 373, dynamicHeight: 21, alignment: .leading)
  2043.             .font(.system(size: 17, weight: .regular))
  2044.             .offset(dynamicX: 15, dynamicY: 10)
  2045.        
  2046.         Image("arrow-back-512")
  2047.             .resizable()
  2048.             .frame(dynamicWidth: 20, dynamicHeight: 20)
  2049.             .offset(dynamicX: 15, dynamicY: 61)
  2050.        
  2051.         Text("Label")
  2052.             .frame(dynamicWidth: 307, dynamicHeight: 21, alignment: .leading)
  2053.             .font(.system(size: 13, weight: .regular))
  2054.             .foregroundColor(Color(red: 1.0, green: 0.58431375, blue: 0.0))
  2055.             .offset(dynamicX: 45, dynamicY: 60)
  2056.        
  2057.         Text("Label")
  2058.             .frame(dynamicWidth: 132, dynamicHeight: 21, alignment: .trailing)
  2059.             .font(.system(size: 17, weight: .regular))
  2060.             .multilineTextAlignment(.trailing)
  2061.             .foregroundColor(Color(red: 0.0, green: 0.47843137, blue: 1.0))
  2062.             .offset(dynamicX: 244, dynamicY: 33)
  2063.     }
  2064. }
  2065.  
  2066. // --------------------------------------------------------------------------------
  2067. // LanguageCell
  2068. // --------------------------------------------------------------------------------
  2069. struct LanguageCell: View {
  2070.     var body: some View {
  2071.         Text("Title")
  2072.             .frame(dynamicWidth: 342, dynamicHeight: 44, alignment: .leading)
  2073.             .clipped()
  2074.             .font(.system(size: 18, weight: .regular))
  2075.             .offset(dynamicX: 20, dynamicY: 0)
  2076.     }
  2077. }
  2078.  
  2079. // --------------------------------------------------------------------------------
  2080. // BoardListCell
  2081. // --------------------------------------------------------------------------------
  2082. struct BoardListCell: View {
  2083.     var body: some View {
  2084.         Text("Board name")
  2085.             .frame(dynamicWidth: 199, dynamicHeight: 24, alignment: .leading)
  2086.             .font(.system(size: 20, weight: .regular))
  2087.             .offset(dynamicX: 18, dynamicY: 3)
  2088.        
  2089.         Text("On-line")
  2090.             .frame(dynamicWidth: 307, dynamicHeight: 21, alignment: .leading)
  2091.             .font(.system(size: 14, weight: .regular))
  2092.             .foregroundColor(Color(red: 1.0, green: 0.23137255, blue: 0.1882353))
  2093.             .offset(dynamicX: 28, dynamicY: 27)
  2094.        
  2095.         Text("Last connection:")
  2096.             .frame(dynamicWidth: 279, dynamicHeight: 21, alignment: .leading)
  2097.             .font(.system(size: 14, weight: .regular))
  2098.             .offset(dynamicX: 48, dynamicY: 47)
  2099.        
  2100.         Text("Last connection:")
  2101.             .frame(dynamicWidth: 308, dynamicHeight: 21, alignment: .leading)
  2102.             .font(.system(size: 12, weight: .regular))
  2103.             .foregroundColor(Color(red: 1.0, green: 0.58431375, blue: 0.0))
  2104.             .offset(dynamicX: 48, dynamicY: 67)
  2105.        
  2106.         Text("Last connection:")
  2107.             .frame(dynamicWidth: 308, dynamicHeight: 21, alignment: .leading)
  2108.             .font(.system(size: 12, weight: .regular))
  2109.             .foregroundColor(Color(red: 1.0, green: 0.58431375, blue: 0.0))
  2110.             .offset(dynamicX: 48, dynamicY: 87)
  2111.        
  2112.         Image("wifi_strenght4")
  2113.             .resizable()
  2114.             .frame(dynamicWidth: 35, dynamicHeight: 29)
  2115.             .offset(dynamicX: 317, dynamicY: 3)
  2116.     }
  2117. }
  2118.  
  2119. // --------------------------------------------------------------------------------
  2120. // SensorListCell
  2121. // --------------------------------------------------------------------------------
  2122. struct SensorListCell: View {
  2123.     var body: some View {
  2124.         Text("Sensor name")
  2125.             .frame(dynamicWidth: 167, dynamicHeight: 21, alignment: .leading)
  2126.             .font(.system(size: 19, weight: .regular))
  2127.             .offset(dynamicX: 81, dynamicY: 34)
  2128.        
  2129.         Text("Sensor type")
  2130.             .frame(dynamicWidth: 170, dynamicHeight: 23, alignment: .leading)
  2131.             .font(.system(size: 14, weight: .regular))
  2132.             .foregroundColor(Color(red: 1.0, green: 0.58431375, blue: 0.0))
  2133.             .offset(dynamicX: 101, dynamicY: 56)
  2134.        
  2135.         Image("dht22")
  2136.             .resizable()
  2137.             .aspectRatio(contentMode: .fill)
  2138.             .frame(dynamicWidth: 57, dynamicHeight: 57)
  2139.             .offset(dynamicX: 16, dynamicY: 17)
  2140.        
  2141.         Text("board name")
  2142.             .frame(dynamicWidth: 255, dynamicHeight: 21, alignment: .leading)
  2143.             .font(.system(size: 17, weight: .regular))
  2144.             .foregroundColor(Color(red: 0.0, green: 0.47843137, blue: 1.0))
  2145.             .offset(dynamicX: 16, dynamicY: 68)
  2146.        
  2147.         Text("On-line")
  2148.             .frame(dynamicWidth: 96, dynamicHeight: 21, alignment: .trailing)
  2149.             .font(.system(size: 14, weight: .regular))
  2150.             .multilineTextAlignment(.trailing)
  2151.             .foregroundColor(Color(red: 1.0, green: 0.23137255, blue: 0.1882353))
  2152.             .offset(dynamicX: 256, dynamicY: 34)
  2153.     }
  2154. }
  2155.  
  2156. // --------------------------------------------------------------------------------
  2157. // SelectionModifier
  2158. // --------------------------------------------------------------------------------
  2159. struct SelectionModifier: ViewModifier {
  2160.     var checked: Bool = false
  2161.     func body(content: Content) -> some View {
  2162.         Group {
  2163.             if checked {
  2164.                 content
  2165.                     .background(Color(UIColor.systemGroupedBackground))
  2166.             } else {
  2167.                 content
  2168.             }
  2169.         }
  2170.     }
  2171. }
  2172.  
  2173. // --------------------------------------------------------------------------------
  2174. // Dynamic Size Helper
  2175. // --------------------------------------------------------------------------------
  2176. struct DynamicSize {
  2177.     static private let baseViewWidth: CGFloat = 414.0
  2178.     static private let baseViewHeight: CGFloat = 808.0
  2179.  
  2180.     static func getHeight(_ height: CGFloat) -> CGFloat {
  2181.         return (height / baseViewHeight) * UIScreen.main.bounds.height
  2182.     }
  2183.  
  2184.     static func getWidth(_ width: CGFloat) -> CGFloat {
  2185.         return (width / baseViewWidth) * UIScreen.main.bounds.width
  2186.     }
  2187.  
  2188.     static func getOffsetX(_ x: CGFloat) -> CGFloat {
  2189.         return (x / baseViewWidth) * UIScreen.main.bounds.width
  2190.     }
  2191.  
  2192.     static func getOffsetY(_ y: CGFloat) -> CGFloat {
  2193.         return (y / baseViewHeight) * UIScreen.main.bounds.height
  2194.     }
  2195. }
  2196.  
  2197. // --------------------------------------------------------------------------------
  2198. // Frame and Offset Helper
  2199. // --------------------------------------------------------------------------------
  2200. extension View {
  2201.     func frame(dynamicWidth: CGFloat? = nil, dynamicHeight: CGFloat? = nil, alignment: Alignment = .center) -> some View {
  2202.         self.frame(width: DynamicSize.getWidth(dynamicWidth ?? 0), height: DynamicSize.getHeight(dynamicHeight ?? 0), alignment: alignment)
  2203.     }
  2204.  
  2205.     func offset(dynamicX: CGFloat = 0, dynamicY: CGFloat = 0) -> some View {
  2206.         self.offset(x: DynamicSize.getOffsetX(dynamicX), y: DynamicSize.getOffsetY(dynamicY))
  2207.     }
  2208. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement