Advertisement
IbrahimHassan

Untitled

Jul 14th, 2021 (edited)
1,358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 21.72 KB | None | 0 0
  1. //  Converted by Storyboard to SwiftUI Converter - https://swiftify.com/converter/storyboard2swiftui
  2.  
  3. import SwiftUI
  4.  
  5. // --------------------------------------------------------------------------------
  6. // UINavigationController
  7. // --------------------------------------------------------------------------------
  8. NavigationView {
  9.     Spacer()    // TODO: replace with the actual content
  10. }
  11.  
  12. // --------------------------------------------------------------------------------
  13. // MJRootViewController
  14. // --------------------------------------------------------------------------------
  15. struct MJRootView: View {
  16.     var body: some View {
  17.         ZStack(alignment: .topLeading) {
  18.             GeometryReader { geometry in
  19.                 List {
  20.                     Spacer()    // TODO: replace with the actual content
  21.                 }
  22.             }
  23.         }
  24.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(808))
  25.         .background(Color(.white))
  26.         .edgesIgnoringSafeArea(.all)
  27.     }
  28. }
  29.  
  30. struct MJRootView_Previews: PreviewProvider {
  31.     static var previews: some View {
  32.         MJRootView()
  33.     }
  34. }
  35.  
  36. // --------------------------------------------------------------------------------
  37. // Colors
  38. // --------------------------------------------------------------------------------
  39. List {
  40.     Spacer()    // TODO: replace with the actual content
  41. }
  42.  
  43. // --------------------------------------------------------------------------------
  44. // MappaSensori
  45. // --------------------------------------------------------------------------------
  46. struct MappaSensoriView: View {
  47.     var body: some View {
  48.         ZStack(alignment: .topLeading) {
  49.             GeometryReader { geometry in
  50.                 ScrollView {
  51.                     Spacer()    // TODO: replace with the actual content
  52.                 }
  53.             }
  54.         }
  55.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(808))
  56.         .background(Color(.white))
  57.         .edgesIgnoringSafeArea(.all)
  58.     }
  59. }
  60.  
  61. struct MappaSensoriView_Previews: PreviewProvider {
  62.     static var previews: some View {
  63.         MappaSensoriView()
  64.     }
  65. }
  66.  
  67. // --------------------------------------------------------------------------------
  68. // NetworkConfig
  69. // --------------------------------------------------------------------------------
  70. List {
  71.     Spacer()    // TODO: replace with the actual content
  72. }
  73.  
  74. // --------------------------------------------------------------------------------
  75. // UIViewController
  76. // --------------------------------------------------------------------------------
  77. struct UIView: View {
  78.     var body: some View {
  79.         ZStack(alignment: .topLeading) {
  80.             GeometryReader { geometry in
  81.                 Image("P_pulsante2.png")
  82.                     .resizable()
  83.                     .aspectRatio(contentMode: .fit)
  84.                     .frame(width: DynamicSizeHelper.getWidth(240), height: DynamicSizeHelper.getHeight(128))
  85.                     .clipped()
  86.                     .offset(x: DynamicSizeHelper.getOffsetX(92), y: DynamicSizeHelper.getOffsetY(339))
  87.             }
  88.         }
  89.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(896))
  90.         .background(Color(.white))
  91.         .edgesIgnoringSafeArea(.all)
  92.     }
  93. }
  94.  
  95. struct UIView_Previews: PreviewProvider {
  96.     static var previews: some View {
  97.         UIView()
  98.     }
  99. }
  100.  
  101. // --------------------------------------------------------------------------------
  102. // ListaSensori
  103. // --------------------------------------------------------------------------------
  104. List {
  105.     Spacer()    // TODO: replace with the actual content
  106. }
  107.  
  108. // --------------------------------------------------------------------------------
  109. // UINavigationController
  110. // --------------------------------------------------------------------------------
  111. NavigationView {
  112.     Spacer()    // TODO: replace with the actual content
  113. }
  114.  
  115. // --------------------------------------------------------------------------------
  116. // Debug_json
  117. // --------------------------------------------------------------------------------
  118. List {
  119.     Spacer()    // TODO: replace with the actual content
  120. }
  121.  
  122. // --------------------------------------------------------------------------------
  123. // Language
  124. // --------------------------------------------------------------------------------
  125. List {
  126.     Spacer()    // TODO: replace with the actual content
  127. }
  128.  
  129. // --------------------------------------------------------------------------------
  130. // NewSensorListTableController
  131. // --------------------------------------------------------------------------------
  132. List {
  133.     Spacer()    // TODO: replace with the actual content
  134. }
  135.  
  136. // --------------------------------------------------------------------------------
  137. // AmbientiListTableController
  138. // --------------------------------------------------------------------------------
  139. struct AmbientiListTableView: View {
  140.     var body: some View {
  141.         ZStack(alignment: .topLeading) {
  142.             GeometryReader { geometry in
  143.                 List {
  144.                     Spacer()    // TODO: replace with the actual content
  145.                 }
  146.             }
  147.         }
  148.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(808))
  149.         .background(Color(.white))
  150.         .edgesIgnoringSafeArea(.all)
  151.     }
  152. }
  153.  
  154. struct AmbientiListTableView_Previews: PreviewProvider {
  155.     static var previews: some View {
  156.         AmbientiListTableView()
  157.     }
  158. }
  159.  
  160. // --------------------------------------------------------------------------------
  161. // AndruinoServerPhp
  162. // --------------------------------------------------------------------------------
  163. List {
  164.     Spacer()    // TODO: replace with the actual content
  165. }
  166.  
  167. // --------------------------------------------------------------------------------
  168. // Configuration
  169. // --------------------------------------------------------------------------------
  170. List {
  171.     Spacer()    // TODO: replace with the actual content
  172. }
  173.  
  174. // --------------------------------------------------------------------------------
  175. // LoggerTableController
  176. // --------------------------------------------------------------------------------
  177. List {
  178.     Spacer()    // TODO: replace with the actual content
  179. }
  180.  
  181. // --------------------------------------------------------------------------------
  182. // LoggerTableCtrlSensors
  183. // --------------------------------------------------------------------------------
  184. List {
  185.     Spacer()    // TODO: replace with the actual content
  186. }
  187.  
  188. // --------------------------------------------------------------------------------
  189. // UINavigationController
  190. // --------------------------------------------------------------------------------
  191. NavigationView {
  192.     Spacer()    // TODO: replace with the actual content
  193. }
  194.  
  195. // --------------------------------------------------------------------------------
  196. // FormulaSensore
  197. // --------------------------------------------------------------------------------
  198. List {
  199.     Spacer()    // TODO: replace with the actual content
  200. }
  201.  
  202. // --------------------------------------------------------------------------------
  203. // PreferenzeSensore
  204. // --------------------------------------------------------------------------------
  205. List {
  206.     Spacer()    // TODO: replace with the actual content
  207. }
  208.  
  209. // --------------------------------------------------------------------------------
  210. // SensorInfo
  211. // --------------------------------------------------------------------------------
  212. List {
  213.     Spacer()    // TODO: replace with the actual content
  214. }
  215.  
  216. // --------------------------------------------------------------------------------
  217. // SensorInfoZoomImage
  218. // --------------------------------------------------------------------------------
  219. struct SensorInfoZoomImageView: View {
  220.     var body: some View {
  221.         ZStack(alignment: .topLeading) {
  222.             GeometryReader { geometry in
  223.                 ScrollView {
  224.                     Spacer()    // TODO: replace with the actual content
  225.                 }
  226.             }
  227.         }
  228.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(896))
  229.         .edgesIgnoringSafeArea(.all)
  230.     }
  231. }
  232.  
  233. struct SensorInfoZoomImageView_Previews: PreviewProvider {
  234.     static var previews: some View {
  235.         SensorInfoZoomImageView()
  236.     }
  237. }
  238.  
  239. // --------------------------------------------------------------------------------
  240. // PickerDuration
  241. // --------------------------------------------------------------------------------
  242. struct PickerDurationView: View {
  243.     var body: some View {
  244.         ZStack(alignment: .topLeading) {
  245.             GeometryReader { geometry in
  246.                 //Picker("", selection: $bindingVariable) {}
  247.                
  248.                 Text("How long the output PIN will remain active").frame(width: DynamicSizeHelper.getWidth(320), height: DynamicSizeHelper.getHeight(60), alignment: .center)
  249.                     .clipped()
  250.                     .font(.system(size: 16, weight: .regular))
  251.                     .multilineTextAlignment(.center)
  252.                     .offset(x: DynamicSizeHelper.getOffsetX(47), y: DynamicSizeHelper.getOffsetY(114))
  253.                
  254.                 Image("square_pulse")
  255.                     .resizable()
  256.                     .frame(width: DynamicSizeHelper.getWidth(206), height: DynamicSizeHelper.getHeight(54))
  257.                     .offset(x: DynamicSizeHelper.getOffsetX(110), y: DynamicSizeHelper.getOffsetY(377))
  258.                
  259.                 Text("Label").frame(width: DynamicSizeHelper.getWidth(350), height: DynamicSizeHelper.getHeight(65), alignment: .center)
  260.                     .font(.system(size: 21, weight: .regular))
  261.                     .multilineTextAlignment(.center)
  262.                     .offset(x: DynamicSizeHelper.getOffsetX(32), y: DynamicSizeHelper.getOffsetY(214))
  263.             }
  264.         }
  265.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(808))
  266.         .background(Color(.white))
  267.         .edgesIgnoringSafeArea(.all)
  268.     }
  269. }
  270.  
  271. struct PickerDurationView_Previews: PreviewProvider {
  272.     static var previews: some View {
  273.         PickerDurationView()
  274.     }
  275. }
  276.  
  277. // --------------------------------------------------------------------------------
  278. // DatePicker
  279. // --------------------------------------------------------------------------------
  280. struct DatePickerView: View {
  281.     var body: some View {
  282.         ZStack(alignment: .topLeading) {
  283.             GeometryReader { geometry in
  284.                 //DatePicker(selection: $selectedDate, in: dateClosedRange, displayedComponents: .date, label: { Text("Due Date") })
  285.                
  286.                 Text("How long the output PIN will remain active").frame(width: DynamicSizeHelper.getWidth(320), height: DynamicSizeHelper.getHeight(60), alignment: .center)
  287.                     .clipped()
  288.                     .font(.system(size: 16, weight: .regular))
  289.                     .multilineTextAlignment(.center)
  290.                     .foregroundColor(Color(red: 0.0, green: 0.47843137, blue: 1.0))
  291.                     .offset(x: DynamicSizeHelper.getOffsetX(47), y: DynamicSizeHelper.getOffsetY(114))
  292.                
  293.                 Text("Duration: 12:00").frame(width: DynamicSizeHelper.getWidth(350), height: DynamicSizeHelper.getHeight(59), alignment: .center)
  294.                     .font(.system(size: 21, weight: .regular))
  295.                     .multilineTextAlignment(.center)
  296.                     .offset(x: DynamicSizeHelper.getOffsetX(32), y: DynamicSizeHelper.getOffsetY(214))
  297.                
  298.                 Image("square_pulse")
  299.                     .resizable()
  300.                     .frame(width: DynamicSizeHelper.getWidth(206), height: DynamicSizeHelper.getHeight(54))
  301.                     .offset(x: DynamicSizeHelper.getOffsetX(104), y: DynamicSizeHelper.getOffsetY(377))
  302.             }
  303.         }
  304.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(808))
  305.         .background(Color(.white))
  306.         .edgesIgnoringSafeArea(.all)
  307.     }
  308. }
  309.  
  310. struct DatePickerView_Previews: PreviewProvider {
  311.     static var previews: some View {
  312.         DatePickerView()
  313.     }
  314. }
  315.  
  316. // --------------------------------------------------------------------------------
  317. // SendMessage
  318. // --------------------------------------------------------------------------------
  319. struct SendMessageView: View {
  320.     var body: some View {
  321.         ZStack(alignment: .topLeading) {
  322.             GeometryReader { geometry in
  323.                 ScrollView {
  324.                     Spacer()    // TODO: replace with the actual content
  325.                 }
  326.             }
  327.         }
  328.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(808))
  329.         .background(Color(red: 1.0, green: 1.0, blue: 1.0))
  330.         .edgesIgnoringSafeArea(.all)
  331.     }
  332. }
  333.  
  334. struct SendMessageView_Previews: PreviewProvider {
  335.     static var previews: some View {
  336.         SendMessageView()
  337.     }
  338. }
  339.  
  340. // --------------------------------------------------------------------------------
  341. // SelettoreGenerico
  342. // --------------------------------------------------------------------------------
  343. struct SelettoreGenericoView: View {
  344.     var body: some View {
  345.         ZStack(alignment: .topLeading) {
  346.             GeometryReader { geometry in
  347.                 //Picker("", selection: $bindingVariable) {}
  348.                
  349.                 Text("Label").frame(width: DynamicSizeHelper.getWidth(320), height: DynamicSizeHelper.getHeight(81), alignment: .center)
  350.                     .clipped()
  351.                     .font(.system(size: 20, weight: .regular))
  352.                     .multilineTextAlignment(.center)
  353.                     .offset(x: DynamicSizeHelper.getOffsetX(46), y: DynamicSizeHelper.getOffsetY(125))
  354.                
  355.                 Text("Label").frame(width: DynamicSizeHelper.getWidth(320), height: DynamicSizeHelper.getHeight(186), alignment: .center)
  356.                     .clipped()
  357.                     .font(.system(size: 20, weight: .regular))
  358.                     .multilineTextAlignment(.center)
  359.                     .offset(x: DynamicSizeHelper.getOffsetX(46), y: DynamicSizeHelper.getOffsetY(0))
  360.             }
  361.         }
  362.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(808))
  363.         .background(Color(.white))
  364.         .edgesIgnoringSafeArea(.all)
  365.     }
  366. }
  367.  
  368. struct SelettoreGenericoView_Previews: PreviewProvider {
  369.     static var previews: some View {
  370.         SelettoreGenericoView()
  371.     }
  372. }
  373.  
  374. // --------------------------------------------------------------------------------
  375. // AvvioApp
  376. // --------------------------------------------------------------------------------
  377. struct AvvioAppView: View {
  378.     var body: some View {
  379.         ZStack(alignment: .topLeading) {
  380.             GeometryReader { geometry in
  381.                 ScrollView {
  382.                     Spacer()    // TODO: replace with the actual content
  383.                 }
  384.             }
  385.         }
  386.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(896))
  387.         .background(Color(.white))
  388.         .edgesIgnoringSafeArea(.all)
  389.     }
  390. }
  391.  
  392. struct AvvioAppView_Previews: PreviewProvider {
  393.     static var previews: some View {
  394.         AvvioAppView()
  395.     }
  396. }
  397.  
  398. // --------------------------------------------------------------------------------
  399. // TabBarController
  400. // --------------------------------------------------------------------------------
  401. TabView {
  402.     Spacer()    // TODO: replace with the actual content
  403. }
  404.  
  405. // --------------------------------------------------------------------------------
  406. // PolicyWeb
  407. // --------------------------------------------------------------------------------
  408. struct PolicyWebView: View {
  409.     var body: some View {
  410.         ZStack(content: {})
  411.             .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(896))
  412.             .background(Color(.white))
  413.             .edgesIgnoringSafeArea(.all)
  414.     }
  415. }
  416.  
  417. struct PolicyWebView_Previews: PreviewProvider {
  418.     static var previews: some View {
  419.         PolicyWebView()
  420.     }
  421. }
  422.  
  423. // --------------------------------------------------------------------------------
  424. // ListaGiorniSettamana
  425. // --------------------------------------------------------------------------------
  426. List {
  427.     Spacer()    // TODO: replace with the actual content
  428. }
  429.  
  430. // --------------------------------------------------------------------------------
  431. // GraphView_config
  432. // --------------------------------------------------------------------------------
  433. List {
  434.     Spacer()    // TODO: replace with the actual content
  435. }
  436.  
  437. // --------------------------------------------------------------------------------
  438. // GraphView
  439. // --------------------------------------------------------------------------------
  440. struct GraphView: View {
  441.     var body: some View {
  442.         ZStack(alignment: .topLeading) {
  443.             GeometryReader { geometry in
  444.                 //Picker("", selection: $bindingVariable) {}
  445.                
  446.                 ZStack(content: {})
  447.                     .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(726))
  448.             }
  449.         }
  450.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(764))
  451.         .background(Color(.white))
  452.         .edgesIgnoringSafeArea(.all)
  453.     }
  454. }
  455.  
  456. struct GraphView_Previews: PreviewProvider {
  457.     static var previews: some View {
  458.         GraphView()
  459.     }
  460. }
  461.  
  462. // --------------------------------------------------------------------------------
  463. // GraphTabBViewController
  464. // --------------------------------------------------------------------------------
  465. TabView {
  466.     Spacer()    // TODO: replace with the actual content
  467. }
  468.  
  469. // --------------------------------------------------------------------------------
  470. // ColorCollectionView
  471. // --------------------------------------------------------------------------------
  472. struct ColorCollectionView: View {
  473.     var body: some View {
  474.         ZStack(alignment: .topLeading) {
  475.             GeometryReader { geometry in
  476.                 List {
  477.                     Spacer()    // TODO: replace with the actual content
  478.                 }
  479.             }
  480.         }
  481.         .frame(width: DynamicSizeHelper.getWidth(414), height: DynamicSizeHelper.getHeight(808))
  482.         .background(Color(.white))
  483.         .edgesIgnoringSafeArea(.all)
  484.     }
  485. }
  486.  
  487. struct ColorCollectionView_Previews: PreviewProvider {
  488.     static var previews: some View {
  489.         ColorCollectionView()
  490.     }
  491. }
  492.  
  493. // --------------------------------------------------------------------------------
  494. // VariabileSlider
  495. // --------------------------------------------------------------------------------
  496. List {
  497.     Spacer()    // TODO: replace with the actual content
  498. }
  499.  
  500. // --------------------------------------------------------------------------------
  501. // SensoreDigitale
  502. // --------------------------------------------------------------------------------
  503. List {
  504.     Spacer()    // TODO: replace with the actual content
  505. }
  506.  
  507. // --------------------------------------------------------------------------------
  508. // AppConfig
  509. // --------------------------------------------------------------------------------
  510. List {
  511.     Spacer()    // TODO: replace with the actual content
  512. }
  513.  
  514. // --------------------------------------------------------------------------------
  515. // UINavigationController
  516. // --------------------------------------------------------------------------------
  517. NavigationView {
  518.     Spacer()    // TODO: replace with the actual content
  519. }
  520.  
  521. // --------------------------------------------------------------------------------
  522. // UINavigationController
  523. // --------------------------------------------------------------------------------
  524. NavigationView {
  525.     Spacer()    // TODO: replace with the actual content
  526. }
  527.  
  528. // --------------------------------------------------------------------------------
  529. // BoardListTableController
  530. // --------------------------------------------------------------------------------
  531. List {
  532.     Spacer()    // TODO: replace with the actual content
  533. }
  534.  
  535. // --------------------------------------------------------------------------------
  536. // SensorListTableController
  537. // --------------------------------------------------------------------------------
  538. List {
  539.     Spacer()    // TODO: replace with the actual content
  540. }
  541.  
  542. // --------------------------------------------------------------------------------
  543. // UINavigationController
  544. // --------------------------------------------------------------------------------
  545. NavigationView {
  546.     Spacer()    // TODO: replace with the actual content
  547. }
  548.  
  549. // --------------------------------------------------------------------------------
  550. // UINavigationController
  551. // --------------------------------------------------------------------------------
  552. NavigationView {
  553.     Spacer()    // TODO: replace with the actual content
  554. }
  555.  
  556. // --------------------------------------------------------------------------------
  557. // Dynamic Size Helper
  558. // --------------------------------------------------------------------------------
  559. struct DynamicSizeHelper {
  560.     static private let baseViewWidth: CGFloat = 414.0
  561.     static private let baseViewHeight: CGFloat = 808.0
  562.  
  563.     static func getHeight(_ height: CGFloat) -> CGFloat {
  564.         return (height / baseViewHeight) * UIScreen.main.bounds.height
  565.     }
  566.  
  567.     static func getWidth(_ width: CGFloat) -> CGFloat {
  568.         return (width / baseViewWidth) * UIScreen.main.bounds.width
  569.     }
  570.  
  571.     static func getOffsetX(_ x: CGFloat) -> CGFloat {
  572.         return (x / baseViewWidth) * UIScreen.main.bounds.width
  573.     }
  574.  
  575.     static func getOffsetY(_ y: CGFloat) -> CGFloat {
  576.         return (y / baseViewHeight) * UIScreen.main.bounds.height
  577.     }
  578. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement