20_03_2022

20_03_2022
parent 27f01c03
File added
......@@ -16,6 +16,10 @@
D514861927BBEFC8006830A3 /* Track.swift in Sources */ = {isa = PBXBuildFile; fileRef = D514861827BBEFC8006830A3 /* Track.swift */; };
D51D33FD27BF8836008D5065 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51D33FC27BF8836008D5065 /* MapViewController.swift */; };
D51D340227BF98B9008D5065 /* CalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51D340127BF98B9008D5065 /* CalendarViewController.swift */; };
D53F55FB27E5D12700C18B2A /* SwipeableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F55F927E5D12700C18B2A /* SwipeableView.swift */; };
D53F55FC27E5D12700C18B2A /* SwipeableItems.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F55FA27E5D12700C18B2A /* SwipeableItems.swift */; };
D53F560B27E62D7600C18B2A /* SmallListWorkVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F560927E62D7600C18B2A /* SmallListWorkVC.swift */; };
D53F560C27E62D7600C18B2A /* SmallListWorkVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = D53F560A27E62D7600C18B2A /* SmallListWorkVC.xib */; };
D558EA5C27BE4A6C003C4578 /* HandmanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D558EA5B27BE4A6C003C4578 /* HandmanViewController.swift */; };
D558EA6127BE4C65003C4578 /* EmerHandViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D558EA6027BE4C65003C4578 /* EmerHandViewController.swift */; };
D55E88F327DE124B00DB59E7 /* GlidingCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55E88E727DE124A00DB59E7 /* GlidingCollection.swift */; };
......@@ -44,6 +48,8 @@
D5B0201A27C382A600C4BA4F /* Artwork.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0201927C382A600C4BA4F /* Artwork.swift */; };
D5C001D027DA60CB0045F6BE /* StartNavigationVCViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5C001CF27DA60CB0045F6BE /* StartNavigationVCViewController.swift */; };
D5C59AF127CFD1810013EFBB /* netwok.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5C59AF027CFD1810013EFBB /* netwok.swift */; };
D5CF729E27DFB3500026392B /* ListWorkViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5CF729D27DFB3500026392B /* ListWorkViewController.swift */; };
D5D6F1A627E77D4A008106EE /* DoubleElectricVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D6F1A527E77D4A008106EE /* DoubleElectricVC.swift */; };
D5D82C8D27D21B070068A5B9 /* SettingsLauncher.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D82C8C27D21B070068A5B9 /* SettingsLauncher.swift */; };
D5E2042427CE2DD90063A514 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E2042327CE2DD90063A514 /* ProfileViewController.swift */; };
D5E2042927CE30E20063A514 /* DataProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E2042827CE30E20063A514 /* DataProfileViewController.swift */; };
......@@ -84,6 +90,10 @@
D514861827BBEFC8006830A3 /* Track.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Track.swift; sourceTree = "<group>"; };
D51D33FC27BF8836008D5065 /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = "<group>"; };
D51D340127BF98B9008D5065 /* CalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarViewController.swift; sourceTree = "<group>"; };
D53F55F927E5D12700C18B2A /* SwipeableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwipeableView.swift; path = "../../../../GoldCode/MaterialsColdCode/SwipeableView-master/SwipeableView/SwipeableView/SwipeableView.swift"; sourceTree = "<group>"; };
D53F55FA27E5D12700C18B2A /* SwipeableItems.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwipeableItems.swift; path = "../../../../GoldCode/MaterialsColdCode/SwipeableView-master/SwipeableView/SwipeableView/SwipeableItems.swift"; sourceTree = "<group>"; };
D53F560927E62D7600C18B2A /* SmallListWorkVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallListWorkVC.swift; sourceTree = "<group>"; };
D53F560A27E62D7600C18B2A /* SmallListWorkVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SmallListWorkVC.xib; sourceTree = "<group>"; };
D558EA5B27BE4A6C003C4578 /* HandmanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandmanViewController.swift; sourceTree = "<group>"; };
D558EA6027BE4C65003C4578 /* EmerHandViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmerHandViewController.swift; sourceTree = "<group>"; };
D55E88E727DE124A00DB59E7 /* GlidingCollection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlidingCollection.swift; sourceTree = "<group>"; };
......@@ -118,6 +128,8 @@
D5B0201927C382A600C4BA4F /* Artwork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Artwork.swift; sourceTree = "<group>"; };
D5C001CF27DA60CB0045F6BE /* StartNavigationVCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartNavigationVCViewController.swift; sourceTree = "<group>"; };
D5C59AF027CFD1810013EFBB /* netwok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = netwok.swift; sourceTree = "<group>"; };
D5CF729D27DFB3500026392B /* ListWorkViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListWorkViewController.swift; sourceTree = "<group>"; };
D5D6F1A527E77D4A008106EE /* DoubleElectricVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoubleElectricVC.swift; sourceTree = "<group>"; };
D5D82C8C27D21B070068A5B9 /* SettingsLauncher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsLauncher.swift; sourceTree = "<group>"; };
D5E2042327CE2DD90063A514 /* ProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = "<group>"; };
D5E2042827CE30E20063A514 /* DataProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataProfileViewController.swift; sourceTree = "<group>"; };
......@@ -186,10 +198,20 @@
D5E2042327CE2DD90063A514 /* ProfileViewController.swift */,
D5E2042827CE30E20063A514 /* DataProfileViewController.swift */,
D5C001CF27DA60CB0045F6BE /* StartNavigationVCViewController.swift */,
D5D6F1A527E77D4A008106EE /* DoubleElectricVC.swift */,
);
path = VC;
sourceTree = "<group>";
};
D53F55F827E5D0F600C18B2A /* SwipeAble */ = {
isa = PBXGroup;
children = (
D53F55FA27E5D12700C18B2A /* SwipeableItems.swift */,
D53F55F927E5D12700C18B2A /* SwipeableView.swift */,
);
path = SwipeAble;
sourceTree = "<group>";
};
D55E88E827DE124A00DB59E7 /* CollectionCell */ = {
isa = PBXGroup;
children = (
......@@ -242,19 +264,17 @@
D569AB5F27B8E27A0013DCFE /* Em-call */ = {
isa = PBXGroup;
children = (
D53F560927E62D7600C18B2A /* SmallListWorkVC.swift */,
D53F560A27E62D7600C18B2A /* SmallListWorkVC.xib */,
D53F55F827E5D0F600C18B2A /* SwipeAble */,
D5A9FBFA27DB92CB00AAB5EA /* Addition */,
D5CF729927DFB2A90026392B /* Glide */,
D5F0237627C4DB76008F4146 /* Data */,
D5F0236027C4DA8E008F4146 /* EnterVC */,
D5057F9B27BA5E520015C0DC /* VC */,
D569AB6027B8E27A0013DCFE /* AppDelegate.swift */,
D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */,
D569AB6627B8E27A0013DCFE /* Main.storyboard */,
D55E88E827DE124A00DB59E7 /* CollectionCell */,
D55E88F027DE124B00DB59E7 /* Extensions */,
D55E88E727DE124A00DB59E7 /* GlidingCollection.swift */,
D55E88EF27DE124B00DB59E7 /* GlidingConfig.swift */,
D55E88EB27DE124B00DB59E7 /* GlidingLayout.swift */,
D55E88EC27DE124B00DB59E7 /* Protocols */,
D569AB6C27B8E27B0013DCFE /* Assets.xcassets */,
D569AB6E27B8E27B0013DCFE /* LaunchScreen.storyboard */,
D569AB7127B8E27B0013DCFE /* Info.plist */,
......@@ -293,10 +313,24 @@
D5A9FBFA27DB92CB00AAB5EA /* Addition */ = {
isa = PBXGroup;
children = (
D5CF729D27DFB3500026392B /* ListWorkViewController.swift */,
);
path = Addition;
sourceTree = "<group>";
};
D5CF729927DFB2A90026392B /* Glide */ = {
isa = PBXGroup;
children = (
D55E88E727DE124A00DB59E7 /* GlidingCollection.swift */,
D55E88EF27DE124B00DB59E7 /* GlidingConfig.swift */,
D55E88EB27DE124B00DB59E7 /* GlidingLayout.swift */,
D55E88EC27DE124B00DB59E7 /* Protocols */,
D55E88F027DE124B00DB59E7 /* Extensions */,
D55E88E827DE124A00DB59E7 /* CollectionCell */,
);
path = Glide;
sourceTree = "<group>";
};
D5F0236027C4DA8E008F4146 /* EnterVC */ = {
isa = PBXGroup;
children = (
......@@ -431,6 +465,7 @@
D569AB7027B8E27B0013DCFE /* LaunchScreen.storyboard in Resources */,
D569AB6D27B8E27B0013DCFE /* Assets.xcassets in Resources */,
D569AB6827B8E27A0013DCFE /* Main.storyboard in Resources */,
D53F560C27E62D7600C18B2A /* SmallListWorkVC.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -503,6 +538,8 @@
D5F0238827C4E2AA008F4146 /* ShowAlert.swift in Sources */,
D5E31B3227BCEC0900F5B87D /* CollectionViewCell.swift in Sources */,
D558EA5C27BE4A6C003C4578 /* HandmanViewController.swift in Sources */,
D53F55FC27E5D12700C18B2A /* SwipeableItems.swift in Sources */,
D5CF729E27DFB3500026392B /* ListWorkViewController.swift in Sources */,
D55E88FA27DE124B00DB59E7 /* Collection.swift in Sources */,
D5E2042427CE2DD90063A514 /* ProfileViewController.swift in Sources */,
D55E88F327DE124B00DB59E7 /* GlidingCollection.swift in Sources */,
......@@ -510,6 +547,7 @@
D55E88F627DE124B00DB59E7 /* GlidingLayout.swift in Sources */,
D569AB6B27B8E27A0013DCFE /* Em_call.xcdatamodeld in Sources */,
D569AB6127B8E27A0013DCFE /* AppDelegate.swift in Sources */,
D53F560B27E62D7600C18B2A /* SmallListWorkVC.swift in Sources */,
D55E88F827DE124B00DB59E7 /* GlidingCollectionDelegate.swift in Sources */,
D55E88F427DE124B00DB59E7 /* CollectionCell.swift in Sources */,
D55E88FB27DE124B00DB59E7 /* FileManager.swift in Sources */,
......@@ -531,8 +569,10 @@
D569AB6327B8E27A0013DCFE /* SceneDelegate.swift in Sources */,
D5B0201027C37BBE00C4BA4F /* MainViewController.swift in Sources */,
D59E3CE527D3B37B008A7E0C /* Extensions.swift in Sources */,
D5D6F1A627E77D4A008106EE /* DoubleElectricVC.swift in Sources */,
D51D33FD27BF8836008D5065 /* MapViewController.swift in Sources */,
D5C59AF127CFD1810013EFBB /* netwok.swift in Sources */,
D53F55FB27E5D12700C18B2A /* SwipeableView.swift in Sources */,
D5E2042927CE30E20063A514 /* DataProfileViewController.swift in Sources */,
D514861427BBEB76006830A3 /* ElectricTableViewController.swift in Sources */,
);
......
......@@ -14,8 +14,8 @@
filePath = "Em-call/VC/ElectricTableViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "39"
endingLineNumber = "39"
startingLineNumber = "42"
endingLineNumber = "42"
landmarkName = "viewDidLoad()"
landmarkType = "7">
</BreakpointContent>
......@@ -46,24 +46,8 @@
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "176"
endingLineNumber = "176"
landmarkName = "coordinateToAdress(_:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "795D045A-BBDB-4A91-A943-821B1A16C690"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "198"
endingLineNumber = "198"
startingLineNumber = "227"
endingLineNumber = "227"
landmarkName = "coordinateToAdress(_:)"
landmarkType = "7">
</BreakpointContent>
......@@ -206,8 +190,8 @@
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "94"
endingLineNumber = "94"
startingLineNumber = "107"
endingLineNumber = "107"
landmarkName = "viewDidLoad()"
landmarkType = "7">
</BreakpointContent>
......@@ -222,22 +206,6 @@
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "114"
endingLineNumber = "114"
landmarkName = "viewDidAppear(_:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "D29E76F2-FB27-445B-A035-7B215E517371"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "126"
endingLineNumber = "126"
landmarkName = "viewDidAppear(_:)"
......@@ -334,8 +302,8 @@
filePath = "Em-call/VC/ElectricTableViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "173"
endingLineNumber = "173"
startingLineNumber = "191"
endingLineNumber = "191"
landmarkName = "delegateClick(text:)"
landmarkType = "7">
</BreakpointContent>
......
......@@ -142,8 +142,8 @@
filePath = "Em-call/Data/SettingsLauncher.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "96"
endingLineNumber = "96"
startingLineNumber = "191"
endingLineNumber = "191"
landmarkName = "imagePickerController(_:didFinishPickingMediaWithInfo:)"
landmarkType = "7">
</BreakpointContent>
......@@ -158,8 +158,8 @@
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "86"
endingLineNumber = "86"
startingLineNumber = "99"
endingLineNumber = "99"
landmarkName = "viewDidLoad()"
landmarkType = "7">
</BreakpointContent>
......@@ -174,8 +174,8 @@
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "132"
endingLineNumber = "132"
startingLineNumber = "142"
endingLineNumber = "142"
landmarkName = "viewWillAppear(_:)"
landmarkType = "7">
</BreakpointContent>
......@@ -247,32 +247,127 @@
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "FC5A3F9B-B53A-48E6-B53D-ADCF39677E27"
uuid = "297FB017-CBEC-4B34-9F11-FB71AC7A44EB"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/ElectricTableViewController.swift"
filePath = "Em-call/Data/LocationMng.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "198"
endingLineNumber = "198"
landmarkName = "settingsDelegateClick(img:)"
startingLineNumber = "42"
endingLineNumber = "42"
landmarkName = "checkAuthorization()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "16148796-3411-4F8E-9120-7BFCFD6FFF7B"
uuid = "8BFACC74-74E9-44BC-A527-6EBCA717F70E"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/HandmanViewController.swift"
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "151"
endingLineNumber = "151"
landmarkName = "viewWillDisappear(_:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "1D277C88-21DD-4FDF-8A59-20D31F1943AE"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/Addition/ListWorkViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "97"
endingLineNumber = "97"
landmarkName = "ListWorkViewController"
landmarkType = "3">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "01B8D3CA-59D2-4306-A206-96990A93A494"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "27"
endingLineNumber = "27"
landmarkName = "MainViewController"
landmarkType = "3">
<Locations>
<Location
uuid = "01B8D3CA-59D2-4306-A206-96990A93A494 - 487273fd74c401e5"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Em_call.MainViewController.locationManager.getter : Em_call.LocationMng"
moduleName = "Em-call"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/alexsh/Documents/GitHub/Em-call/Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "27"
endingLineNumber = "27"
offsetFromSymbolStart = "56">
</Location>
<Location
uuid = "01B8D3CA-59D2-4306-A206-96990A93A494 - a5f75be4f7611e4c"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Em_call.MainViewController.init(nibName: Swift.Optional&lt;Swift.String&gt;, bundle: Swift.Optional&lt;__C.NSBundle&gt;) -&gt; Em_call.MainViewController"
moduleName = "Em-call"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/alexsh/Documents/GitHub/Em-call/Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "27"
endingLineNumber = "27"
offsetFromSymbolStart = "1249">
</Location>
<Location
uuid = "01B8D3CA-59D2-4306-A206-96990A93A494 - fb416bcacc6445ed"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Em_call.MainViewController.init(coder: __C.NSCoder) -&gt; Swift.Optional&lt;Em_call.MainViewController&gt;"
moduleName = "Em-call"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/alexsh/Documents/GitHub/Em-call/Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "27"
endingLineNumber = "27"
offsetFromSymbolStart = "1184">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "7A60F594-021F-4282-BC47-4BC335086B4A"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "240"
endingLineNumber = "240"
landmarkName = "settingsDelegateClick(img:)"
startingLineNumber = "133"
endingLineNumber = "133"
landmarkName = "viewDidAppear(_:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
......
//
// ListWorkViewController.swift
// Em-call
//
// Created by Alex Sh on 14.03.2022.
//
import UIKit
import CoreGraphics
protocol ListWorkViewControllerProtocol:class {
/// Called when one of the supported character categories did change
/// - Parameters:
/// - race: the acutal race character
/// - weapon: the actual weapon character
/// - coa: the actual coat of arms character
func charactersDidChange(race:Character, weapon:Character, coa:Character)
}
class ListWorkViewController: UIViewController {
// var settingsLauncher:SettingsLauncher = SettingsLauncher()
var debug = 0
/// Any delegate for this view
weak var delegate: ListWorkViewControllerProtocol?
let fullView: CGFloat = 100
var partialView: CGFloat {
// return UIScreen.main.bounds.height - (400 + UIApplication.shared.statusBarFrame.height)
return UIScreen.main.bounds.height - 200
}
// var partialView: CGFloat { return UIScreen.main.bounds.height - 400 }
override func viewDidLoad() {
super.viewDidLoad()
// let gesture = UIPanGestureRecognizer.init(target: self, action: #selector(ListWorkViewController.panGesture))
//gesture.delegate = self
// view.addGestureRecognizer(gesture)
roundViews()
}
/*
@objc func panGesture(_ recognizer: UIPanGestureRecognizer) {
let translation = recognizer.translation(in: self.view)
let velocity = recognizer.velocity(in: self.view)
let y = self.view.frame.minY
if (y + translation.y >= fullView) && (y + translation.y <= partialView) {
self.view.frame = CGRect(x: 0, y: y + translation.y, width: view.frame.width, height: view.frame.height)
recognizer.setTranslation(CGPoint.zero, in: self.view)
}
if recognizer.state == .ended {
var duration = velocity.y < 0 ? Double((y - fullView) / -velocity.y) : Double((partialView - y) / velocity.y )
duration = duration > 1.3 ? 1 : duration
UIView.animate(withDuration: duration, delay: 0.0, options: [.allowUserInteraction], animations: {
if velocity.y >= 0 {
self.view.frame = CGRect(x: 0, y: self.partialView, width: self.view.frame.width, height: self.view.frame.height)
} else {
self.view.frame = CGRect(x: 0, y: self.fullView, width: self.view.frame.width, height: self.view.frame.height)
}
}, completion: { [weak self] _ in
if ( velocity.y < 0 ) {
self?.debug = 1
}
})
}
}
func prepareBackgroundView(){
let blurEffect = UIBlurEffect.init(style: .dark)
let visualEffect = UIVisualEffectView.init(effect: blurEffect)
let bluredView = UIVisualEffectView.init(effect: blurEffect)
bluredView.contentView.addSubview(visualEffect)
visualEffect.frame = UIScreen.main.bounds
bluredView.frame = UIScreen.main.bounds
view.insertSubview(bluredView, at: 0)
}
*/
func roundViews() {
view.layer.cornerRadius = 5
/* holdView.layer.cornerRadius = 3
left.layer.cornerRadius = 10
right.layer.cornerRadius = 10
// left.layer.borderColor = UIColor(colorLiteralRed: 0, green: 148/255, blue: 247.0/255.0, alpha: 1).cgColor
left.layer.borderWidth = 1*/
view.clipsToBounds = true
}
/*
func panGesture(recognizer: UIPanGestureRecognizer) {
let translation = recognizer.translation(in: self.view)
let y = self.view.frame.minY
self.view.frame = CGRect(x: 0, y: y + translation.y, width: view.frame.width, height: view.frame.height)
// recognizer.setTranslation(CoreGraphics.CGPointZero, in: self.view)
recognizer.setTranslation(CGPoint(x: 0, y: 0), in: self.view)
// CGRect(x: 0, y: y + translation.y, width: view.frame.width, height: view.frame.height)
}
*/
override func viewDidAppear(_ animated: Bool) {
/*
UIView.animate(withDuration: 0.6, animations: { [weak self] in
let frame = self?.view.frame
let yComponent = self?.partialView
self?.view.frame = CGRect(x: 0, y: yComponent!, width: frame!.width, height: frame!.height - 100)
})*/
}
//MARK: Private
func setup(){
//self.view.backgroundColor = UIColor.Showcase8.colorB2
//self.loadData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// prepareBackgroundView()
}
}
extension ListWorkViewController: UIGestureRecognizerDelegate {
// Solution
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
let gesture = (gestureRecognizer as! UIPanGestureRecognizer)
let direction = gesture.velocity(in: view).y
let y = view.frame.minY
// if (y == fullView && tableView.contentOffset.y == 0 && direction > 0) || (y == partialView) {
if (y == fullView && direction > 0) || (y == partialView) {
// tableView.isScrollEnabled = false
} else {
// tableView.isScrollEnabled = true
}
return false
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "electricico.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "handmanico.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "lockico.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "plumberico.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
This diff is collapsed.
......@@ -18,7 +18,7 @@ class Setting: NSObject {
}
protocol SettingsLauncherDelegate:class {
func settingsDelegateClick(img: UIImage?)
func settingsDelegateClick(img: UIImage?,selRow:Int)
}
class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataSource, UIImagePickerControllerDelegate, UINavigationControllerDelegate
......@@ -26,18 +26,28 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
let imagePickerController = UIImagePickerController()
var imgs: [UIImage]? = nil
let blackView = UIView()
let textLocation:UITextField = UITextField()
let whatDoYou:UITextField = UITextField()
let micro = UIImageView()
let doIt:UIButton = UIButton()
let back = UIView()
weak var delegate:SettingsLauncherDelegate?
var dispatcher:Int = 0
var tableView = UITableView()
var navController:UINavigationController? = nil
let frazes:[String] = ["Select source", "Camera", "Photogalery","Cancel",
"Electrician Emergency Departure",
"Entering electricity into the house",
"Dismantling the electric heated towel rail",
"Dismantling the electric meter"]
let cellId = "cellId"
let cellHeight: CGFloat = 50
var imgArray:[UIImage]? = []
func showSettings(navigVC:UINavigationController) {
func showSettings(navigVC:UINavigationController,dispatcher:Int) {
// func showSettings(navigVC:UINavigationController) {
//show menu
tableView.delegate = self
tableView.dataSource = self
......@@ -46,45 +56,130 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
imagePickerController.allowsEditing = true
tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellId)
navController = navigVC
if let window = UIApplication.shared.keyWindow {
blackView.backgroundColor = UIColor(white: 0, alpha: 0.5)
blackView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleDismiss)))
window.addSubview(blackView)
self.tableView.layer.cornerRadius = 10
window.addSubview(tableView)
// let height: CGFloat = CGFloat(settings.count) * cellHeight
let height: CGFloat = 200
let yw = window.frame.height - height
tableView.frame = CGRect(x: 10, y: window.frame.height, width: window.frame.width-10, height: height)
blackView.frame = window.frame
blackView.alpha = 0
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
self.blackView.alpha = 1
self.tableView.frame = CGRect(x:10, y: yw, width: self.tableView.frame.width-10, height: self.tableView.frame.height)
self.tableView.layer.cornerRadius = 10
}, completion: nil)
}
self.dispatcher = dispatcher
if dispatcher == 0 {
selectPhoto()
}
else {
selectWork()
}
}
func selectPhoto() {
if let window = UIApplication.shared.keyWindow {
blackView.backgroundColor = UIColor(white: 0, alpha: 0.5)
blackView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleDismiss)))
window.addSubview(blackView)
self.tableView.layer.cornerRadius = 10
window.addSubview(tableView)
// let height: CGFloat = CGFloat(settings.count) * cellHeight
let height: CGFloat = 200
let yw = window.frame.height - height
tableView.frame = CGRect(x: 10, y: window.frame.height, width: window.frame.width-10, height: height)
blackView.frame = window.frame
blackView.alpha = 0
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
self.blackView.alpha = 1
self.tableView.frame = CGRect(x:10, y: yw, width: self.tableView.frame.width-10, height: self.tableView.frame.height)
self.tableView.layer.cornerRadius = 10
}, completion: nil)
}
}
func selectWork() {
if let window = UIApplication.shared.keyWindow {
blackView.backgroundColor = UIColor(white: 0, alpha: 0.5)
blackView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleDismiss)))
window.addSubview(blackView)
self.back.layer.cornerRadius = 10
// self.tableView.layer.cornerRadius = 10
// window.addSubview(tableView)
window.addSubview(back)
let height: CGFloat = 370.0
back.frame = CGRect(x: 10, y: window.frame.height-160.0, width: window.frame.width-10, height: height)
back.translatesAutoresizingMaskIntoConstraints = false
back.centerXAnchor.constraint(equalTo: window.centerXAnchor).isActive = true
back.widthAnchor.constraint(equalToConstant: (window.frame.width-10)).isActive = true
var margins = window.layoutMarginsGuide
// back.leadingAnchor.constraint(equalTo: margins.leadingAnchor, constant: 20).isActive = true
// back.trailingAnchor.constraint(equalTo: margins.trailingAnchor, constant: 20).isActive = true
//topAnchor
back.topAnchor.constraint(equalTo: margins.topAnchor, constant: (window.frame.height - 85)).isActive = true
// back.bottomAnchor.constraint(equalTo: margins.bottomAnchor, constant: 20).isActive = true
// back.widthAnchor.constraint(equalToConstant:(window.frame.width-10)).isActive = true
back.heightAnchor.constraint(equalToConstant: height).isActive = true
let yw = window.frame.height - height - 120
// let yw = window.frame.height - height - 85
// back.frame = CGRect(x: 10, y: window.frame.height-160.0, width: window.frame.width-10, height: height)
// blackView.frame = window.frame
back.backgroundColor = UIColor(white: 1.0, alpha: 1.0)
// let height: CGFloat = CGFloat(settings.count) * cellHeight
//let height: CGFloat = 200
// let yw = window.frame.height - height - 160
// tableView.frame = CGRect(x: 10, y: window.frame.height-160, width: window.frame.width-10, height: height)
/* textLocation.frame = CGRect(x: 20, y: window.frame.height-150.0, width: window.frame.width-60, height: 55)*/
back.addSubview(textLocation)
textLocation.translatesAutoresizingMaskIntoConstraints = false
textLocation.centerXAnchor.constraint(equalTo: back.centerXAnchor).isActive = true
textLocation.widthAnchor.constraint(equalToConstant: (window.frame.width-60)).isActive = true
var margin = back.layoutMarginsGuide
textLocation.topAnchor.constraint(equalTo: margin.topAnchor, constant: (window.frame.height - height - 85)).isActive = true
textLocation.heightAnchor.constraint(equalToConstant: 55).isActive = true
textLocation.text = "Unknow address"
// textLocation.backgroundColor = UIColor(white: 0, alpha: 1.0)
// textLocation.backgroundColor = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0)
// textLocation.textColor = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0)
tableView.frame = CGRect(x: 10, y: window.frame.height-240.0, width: window.frame.width-10, height: height - 200)
// back.addSubview(tableView)
blackView.frame = window.frame
blackView.alpha = 0
//ANIMATION
UIView.animate(withDuration: 0.7, delay: 0.0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
self.blackView.alpha = 1
// self.tableView.frame = CGRect(x:10, y: yw, width:
//self.tableView.frame.width-10, height: self.tableView.frame.height)
// self.back.frame = CGRect(x:10, y: yw, width:
// self.back.frame.width-10, height: self.back.frame.height)
self.back.translatesAutoresizingMaskIntoConstraints = false
self.back.centerXAnchor.constraint(equalTo: window.centerXAnchor).isActive = true
self.back.widthAnchor.constraint(equalToConstant: (window.frame.width-20)).isActive = true
margins = window.layoutMarginsGuide
self.back.topAnchor.constraint(equalTo: margins.topAnchor, constant: yw).isActive = true
self.back.heightAnchor.constraint(equalToConstant: self.back.frame.height).isActive = true
// window.addSubview(self.back)
// self.textLocation.frame = CGRect(x: 20, y: yw - 425, width: window.frame.width-60, height: self.textLocation.frame.height)
self.textLocation.translatesAutoresizingMaskIntoConstraints = false
self.textLocation.centerXAnchor.constraint(equalTo: self.back.centerXAnchor).isActive = true
self.textLocation.widthAnchor.constraint(equalToConstant: (window.frame.width-60)).isActive = true
margin = self.back.layoutMarginsGuide
self.textLocation.topAnchor.constraint(equalTo: margin.topAnchor, constant: 10).isActive = true
self.textLocation.heightAnchor.constraint(equalToConstant: 55).isActive = true
self.tableView.frame = CGRect(x:10, y: yw - 300, width:
self.tableView.frame.width-20, height: self.tableView.frame.height)
self.tableView.layer.cornerRadius = 10
self.back.layer.cornerRadius = 10
}, completion: nil)
}
}
@objc func handleDismiss() {
UIView.animate(withDuration: 0.5) {
self.blackView.alpha = 0
if self.dispatcher == 0 {
if let window = UIApplication.shared.keyWindow {
self.tableView.frame = CGRect(x: 10, y: window.frame.height, width: self.tableView.frame.width-10, height: self.tableView.frame.height)
}
} else {
if let window = UIApplication.shared.keyWindow {
self.back.frame = CGRect(x: 10, y: window.frame.height, width: self.back.frame.width-10, height: self.back.frame.height)
self.textLocation.frame = CGRect(x: 20, y:window.frame.height+10, width: window.frame.width-20, height: 55)
self.tableView.frame = CGRect(x: 10, y: window.frame.height, width: self.tableView.frame.width-10, height: self.tableView.frame.height)
}
}
}
}
//The delegate UIImagePickerController
......@@ -93,7 +188,7 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
else {
return }
self.delegate?.settingsDelegateClick(img: image)
self.delegate?.settingsDelegateClick(img: image,selRow: 0)
self.navController?.dismiss(animated: true)
}
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
......@@ -115,13 +210,19 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath)
let row = indexPath.row
switch row {
case 0: cell.textLabel?.text = "Select source"
if dispatcher == 0 {
cell.textLabel?.text = frazes[row]
} else {
cell.textLabel?.text = frazes[row+4]
}
/* switch row {
case 0:
cell.textLabel?.text = frazes[row]
case 1: cell.textLabel?.text = "Camera"
case 2: cell.textLabel?.text = "Photogalery"
case 3: cell.textLabel?.text = "Cancel"
default: break
}
}*/
// cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
// cell.text.textAlignment = .center
cell.textLabel?.textAlignment = .center
......@@ -135,7 +236,9 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
(vc as! DataProfileViewController).delegate = self
*/
let row = indexPath.row
self.delegate?.settingsDelegateClick(img:nil,selRow: row)
// navigationController?.pushViewController(vc, animated: true)
if dispatcher == 0 {
switch row //if indexPath.row == 0
{
case 0:
......@@ -153,6 +256,15 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
return
default: return
}
}
else {
handleDismiss()
let storyboard = UIStoryboard(name: "Main", bundle: nil)
var vc:UIViewController
vc = storyboard.instantiateViewController(withIdentifier: "Electric")
// (vc as! ElectricTableViewController).delegate = self
navController?.pushViewController(vc, animated: true)
}
}
......
......@@ -101,11 +101,12 @@ extension GlidingCollection: UIGestureRecognizerDelegate {
animateBottomButtons()
let topOverylayHeight = collectionView.frame.minY
// topOverlayGradient.frame = CGRect(x: 0, y: 0, width: bounds.width, height: topOverylayHeight)
topOverlayGradient.frame = CGRect(x: 0, y: bounds.height/2, width: bounds.width, height: topOverylayHeight/2)
// topOverlayGradient.frame = CGRect(x: 0, y: 0, width: bounds.width, height: topOverylayHeight)
topOverlayGradient.frame = CGRect(x: 0, y: bounds.height/2 - cardSize.height/2, width: bounds.width, height: 0)
let bottomOverylayHeight = bounds.height - collectionView.frame.maxY
bottomOverlayGradient.frame = CGRect(x: 0, y: collectionView.frame.maxY, width: bounds.width, height: bottomOverylayHeight)
// let bottomOverylayHeight = bounds.height - collectionView.frame.maxY
let bottomOverylayHeight = 0
bottomOverlayGradient.frame = CGRect(x: 0, y: collectionView.frame.maxY, width: bounds.width, height: CGFloat(bottomOverylayHeight))
}
/// :nodoc:
......
//
// GlidingCollection.swift
// GlidingCollection
// GlidingConfig.swift
// GlidingConfig
//
......@@ -22,7 +22,8 @@ public struct GlidingConfig {
/// Scale factor of inactive sections buttons.
public var buttonsScaleFactor: CGFloat = 0.65
/// Active section button color.
public var activeButtonColor: UIColor = .darkGray
// public var activeButtonColor: UIColor = .darkGray
public var activeButtonColor: UIColor = .lightGray
/// Inactive sections buttons color.
public var inactiveButtonsColor: UIColor = .lightGray
/// Space between collectionView's cells.
......
//
// GlidingCollection.swift
// GlidingCollection
// GlidingLayout.swift
//
......
//
// SmallListWorkVC.swift
// Em-call
//
// Created by Alex Sh on 19.03.2022.
//
import UIKit
class SmallListWorkVC: UIViewController {
let fullView: CGFloat = 100
var partialView: CGFloat {
return UIScreen.main.bounds.height - (400 + UIApplication.shared.statusBarFrame.height)
// return UIScreen.main.bounds.height - 200
}
override func viewDidLoad() {
super.viewDidLoad()
let gesture = UIPanGestureRecognizer.init(target: self, action: #selector(panGesture))
//gesture.delegate = self
view.addGestureRecognizer(gesture)
roundViews()
// Do any additional setup after loading the view.
}
override func viewDidAppear(_ animated: Bool) {
UIView.animate(withDuration: 0.6, animations: { [weak self] in
let frame = self?.view.frame
let yComponent = self?.partialView
self?.view.frame = CGRect(x: 0, y: yComponent!, width: frame!.width, height: frame!.height - 100)
})
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// prepareBackgroundView()
}
@IBAction func pressWorkType(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc:UIViewController
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "Electric") as! ElectricTableViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "Electric")
}
navigationController?.pushViewController(vc, animated: true)
}
@objc func panGesture(_ recognizer: UIPanGestureRecognizer) {
let translation = recognizer.translation(in: self.view)
let velocity = recognizer.velocity(in: self.view)
let y = self.view.frame.minY
if (y + translation.y >= fullView) && (y + translation.y <= partialView) {
self.view.frame = CGRect(x: 0, y: y + translation.y, width: view.frame.width, height: view.frame.height)
recognizer.setTranslation(CGPoint.zero, in: self.view)
}
if recognizer.state == .ended {
var duration = velocity.y < 0 ? Double((y - fullView) / -velocity.y) : Double((partialView - y) / velocity.y )
duration = duration > 1.3 ? 1 : duration
UIView.animate(withDuration: duration, delay: 0.0, options: [.allowUserInteraction], animations: {
if velocity.y >= 0 {
self.view.frame = CGRect(x: 0, y: self.partialView, width: self.view.frame.width, height: self.view.frame.height)
} else {
self.view.frame = CGRect(x: 0, y: self.fullView, width: self.view.frame.width, height: self.view.frame.height)
}
}, completion: { [weak self] _ in
if ( velocity.y < 0 ) {
}
})
}
}
func prepareBackgroundView(){
let blurEffect = UIBlurEffect.init(style: .dark)
let visualEffect = UIVisualEffectView.init(effect: blurEffect)
let bluredView = UIVisualEffectView.init(effect: blurEffect)
bluredView.contentView.addSubview(visualEffect)
visualEffect.frame = UIScreen.main.bounds
bluredView.frame = UIScreen.main.bounds
view.insertSubview(bluredView, at: 0)
}
func roundViews() {
view.layer.cornerRadius = 5
/* holdView.layer.cornerRadius = 3
left.layer.cornerRadius = 10
right.layer.cornerRadius = 10
// left.layer.borderColor = UIColor(colorLiteralRed: 0, green: 148/255, blue: 247.0/255.0, alpha: 1).cgColor
left.layer.borderWidth = 1*/
view.clipsToBounds = true
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
extension SmallListWorkVC: UIGestureRecognizerDelegate {
// Solution
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
let gesture = (gestureRecognizer as! UIPanGestureRecognizer)
let direction = gesture.velocity(in: view).y
let y = view.frame.minY
// if (y == fullView && tableView.contentOffset.y == 0 && direction > 0) || (y == partialView) {
if (y == fullView && direction > 0) || (y == partialView) {
// tableView.isScrollEnabled = false
} else {
// tableView.isScrollEnabled = true
}
return false
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SmallListWorkVC" customModule="Em_call" customModuleProvider="target">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="nqP-jn-KuZ">
<rect key="frame" x="20" y="169" width="374" height="181"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Electrician Emergency Departure" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="fr2-pg-bHP">
<rect key="frame" x="0.0" y="0.0" width="374" height="34"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="pressWorkType:" destination="-1" eventType="editingDidEnd" id="3vk-8Q-bDe"/>
</connections>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Entering electricity into the house" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Z63-Ea-CPs">
<rect key="frame" x="0.0" y="49" width="374" height="34"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Dismantling the electric heated towel rail" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Gg2-Ve-Pf1">
<rect key="frame" x="0.0" y="98" width="374" height="34"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Dismantling the electric meter" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dRM-xy-rte">
<rect key="frame" x="0.0" y="147" width="374" height="34"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
</subviews>
</stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="B9M-8S-4PD">
<rect key="frame" x="21" y="367" width="372" height="36"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="Loh-aF-Qb1"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="DO IT!">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="What do you want to do?" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="31i-Py-j20">
<rect key="frame" x="21" y="113" width="324" height="34"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="324" id="Kci-qW-DmA"/>
</constraints>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<textField opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Undefined address" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="VWO-IA-oF7">
<rect key="frame" x="21" y="60" width="372" height="34"/>
<color key="backgroundColor" systemColor="systemGroupedBackgroundColor"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="microphon" translatesAutoresizingMaskIntoConstraints="NO" id="Sc0-cO-Rk1">
<rect key="frame" x="353" y="111" width="38" height="38"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemGroupedBackgroundColor"/>
<constraints>
<constraint firstItem="nqP-jn-KuZ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="3NQ-iu-OjB"/>
<constraint firstItem="Sc0-cO-Rk1" firstAttribute="top" secondItem="VWO-IA-oF7" secondAttribute="bottom" constant="17" id="LrC-f6-dlh"/>
<constraint firstItem="nqP-jn-KuZ" firstAttribute="top" secondItem="Sc0-cO-Rk1" secondAttribute="bottom" constant="20" id="QEO-iQ-tg0"/>
<constraint firstItem="Sc0-cO-Rk1" firstAttribute="centerY" secondItem="31i-Py-j20" secondAttribute="centerY" id="TDb-ta-TUf"/>
<constraint firstItem="B9M-8S-4PD" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="21" id="TGQ-gf-5CR"/>
<constraint firstItem="31i-Py-j20" firstAttribute="leading" secondItem="B9M-8S-4PD" secondAttribute="leading" id="V8m-uy-Afk"/>
<constraint firstItem="nqP-jn-KuZ" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="169" id="Vd6-l6-D0K"/>
<constraint firstItem="nqP-jn-KuZ" firstAttribute="top" secondItem="31i-Py-j20" secondAttribute="bottom" constant="22" id="b8j-fB-CM9"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Sc0-cO-Rk1" secondAttribute="trailing" constant="23" id="cTk-wz-Zap"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="nqP-jn-KuZ" secondAttribute="trailing" constant="20" id="jyh-hc-rAZ"/>
<constraint firstItem="Sc0-cO-Rk1" firstAttribute="leading" secondItem="31i-Py-j20" secondAttribute="trailing" constant="8" symbolic="YES" id="lT3-Dz-ylw"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="B9M-8S-4PD" secondAttribute="trailing" constant="21" id="mUT-4H-oJU"/>
<constraint firstItem="B9M-8S-4PD" firstAttribute="top" secondItem="nqP-jn-KuZ" secondAttribute="bottom" constant="17" id="nOE-qq-NJe"/>
</constraints>
<point key="canvasLocation" x="140.57971014492756" y="87.723214285714278"/>
</view>
</objects>
<resources>
<image name="microphon" width="22" height="21.5"/>
<systemColor name="systemGroupedBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
Showing Recent Messages
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99.
Value for SWIFT_VERSION cannot be empty.
//
// DoubleElectricVC.swift
// Em-call
//
// Created by Alex Sh on 20.03.2022.
//
import UIKit
class DoubleElectricVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
......@@ -9,14 +9,17 @@ import UIKit
class ElectricTableViewController:UIViewController,UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, UITextViewDelegate
{
//@IBOutlet weak var addPhotoTopConstraint: NSLayoutConstraint!
@IBOutlet weak var addPhotoTopConstraint: NSLayoutConstraint!
var settingsLauncher:SettingsLauncher = SettingsLauncher()
@IBOutlet weak var glidingView: GlidingCollection!
fileprivate var collectionView: UICollectionView!
@IBOutlet weak var descTextView: UITextView!
var selRow:Int = 0
let cellReuseIdentifier = "cell"
var address = "Unknow address"
var dateAndTime = "2022/02/23"
......@@ -37,12 +40,14 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
settingsLauncher.delegate = self
// Register the table view cell class and its reuse id
self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.rowHeight = 65
tableView.rowHeight = 45
tableView.delegate = self
tableView.dataSource = self
descTextView.delegate = self
setup()
glidingView.isHidden = true
// addPhotoTopConstraint.constant = 78
}
override func viewWillAppear(_ animated: Bool) {
......@@ -66,13 +71,14 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
@IBAction func pressAddPhoto(_ sender: Any) {
guard let navVC = self.navigationController
else { return }
settingsLauncher.showSettings(navigVC: navVC)
settingsLauncher.showSettings(navigVC: navVC,dispatcher:0)
glidingView.isHidden = false
addPhotoTopConstraint.constant = 98
}
func loadImages() {
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
descTextView.resignFirstResponder()
......@@ -93,6 +99,18 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
return 4
}
func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
// Создаём константу, именна через неё мы будем обращаться к свойствам и изменять их
let header = view as! UITableViewHeaderFooterView
// Установить цвет текста в label
header.textLabel?.textColor = .darkGray
// Установить цвет фона для секции
header.tintColor = UIColor.white
// Установить шрифт и размер шрифта для label
header.textLabel?.font = UIFont(name: "Helvetica-Regular", size: 15)
}
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
switch section {
......@@ -194,11 +212,14 @@ extension ElectricTableViewController:CalendarViewControllerDelegate {
}
extension ElectricTableViewController:SettingsLauncherDelegate {
func settingsDelegateClick(img: UIImage?) {
func settingsDelegateClick(img: UIImage?,selRow:Int) {
if img != nil {
images.append(img!)
}
collectionView.reloadData()
collectionView.reloadData()
}
else {
self.selRow = selRow
}
}
}
// MARK: - CollectionView 🎛
......
......@@ -47,13 +47,27 @@ class EmerElecricianViewController: UIViewController, UITableViewDataSource, UIT
return 1
}
func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
// Создаём константу, именнo через неё мы будем обращаться к свойствам и изменять их
let header = view as! UITableViewHeaderFooterView
// Установить цвет текста в label
header.textLabel?.textColor = .black
// Установить цвет фона для секции
header.tintColor = UIColor.white
// Установить шрифт и размер шрифта для label
header.textLabel?.font = UIFont(name: "Helvetica-Regular", size: 10)
}
// Вызовите метод titleForHeaderInSection в TableViewController классе и добавьте в него текст
func numberOfSections(in tableView: UITableView) -> Int {
return 4
}// Default is 1 if not implemented
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
switch section {
case 0: return ("Work location")
case 0:
return ("Work location")
case 1: return ("Date and Time")
case 2: return ("Your contacts")
case 3: return ("Payment")
......@@ -67,6 +81,11 @@ class EmerElecricianViewController: UIViewController, UITableViewDataSource, UIT
let section = indexPath.section
switch section {
case 0: cell.textLabel?.text = address
//// cell.setSelected(true, animated: false)
// cell.textLabel?.textColor = UIColor.darkGray
// cell.textLabel?.font.pointSize = 10
// = UIFont(name: "Helvetica-Regular", size: 10)
//// cell.setSelected(false, animated: false)
case 1: cell.textLabel?.text = dateAndTime
case 2: cell.textLabel?.text = contact
case 3: cell.textLabel?.text = card
......
......@@ -27,7 +27,7 @@ class HandmanViewController: UIViewController, UITableViewDataSource,
// fileprivate var images = [UIImage(named: "plus")!]
fileprivate var images: [UIImage?] = []
let cellReuseIdentifier = "cell"
var selRow:Int = 0
var address = "Unknow address"
var dateAndTime = "2022/02/23"
......@@ -57,7 +57,7 @@ class HandmanViewController: UIViewController, UITableViewDataSource,
@IBAction func pressAddPhoto(_ sender: Any) {
guard let navVC = self.navigationController
else { return }
settingsLauncher.showSettings(navigVC: navVC)
settingsLauncher.showSettings(navigVC: navVC,dispatcher:0)
}
@IBAction func BOOK_NOW_Click(_ sender: Any) {
......@@ -235,10 +235,13 @@ extension HandmanViewController:CalendarViewControllerDelegate {
}
extension HandmanViewController:SettingsLauncherDelegate {
func settingsDelegateClick(img: UIImage?) {
func settingsDelegateClick(img: UIImage?,selRow:Int) {
if img != nil {
images.append(img!)
collectionView.reloadData()
}
else {
self.selRow = selRow
}
collectionView.reloadData()
}
}
......@@ -13,6 +13,14 @@ class MainViewController: UIViewController, UITextFieldDelegate //, CLLocationM
{
@IBOutlet weak var text_Location: UITextField!
var count:Int = 0
// var settingsLauncher:SettingsLauncher = SettingsLauncher()
var bottomSheetVC:UIViewController? = nil
var selRow:Int = 0
@IBOutlet weak var bottomView: UIView!
// @IBOutlet weak var swipeableView: SwipeableView!
// @IBOutlet weak var swipeableView: MKMapView!
var showAlert:ShowAlert = ShowAlert()
@IBOutlet weak var mapView: MKMapView!
//let locationManager = LocationMng(mainView:self)
......@@ -31,6 +39,7 @@ class MainViewController: UIViewController, UITextFieldDelegate //, CLLocationM
}
@IBAction func pressEmerElectric(_ sender: Any) {
}
@IBAction func pressEmergency(_ sender: Any) {
buttonLockUp.isHidden = false
buttonEmerElectric.isHidden = false
......@@ -45,21 +54,8 @@ class MainViewController: UIViewController, UITextFieldDelegate //, CLLocationM
} else {
self.view.alpha = 1.0
}
/* let detailsWidth: CGFloat = view.bounds.width
let detailsHeight: CGFloat = view.bounds.height - 100
let detailsViewFrame: CGRect = CGRect(x: 0,
y: 0,
width: detailsWidth, height: detailsHeight)
}
detailsController = storyboard?.instantiateViewController(withIdentifier: "ChildMainVC") as? MainChildViewController
// detailsController.descriptionText = "I'm a text that was passed from the MainViewController"
if detailsController != nil {
self.addChild(detailsController! )
detailsController?.view.frame = detailsViewFrame
view.addSubview(detailsController!.view)
}*/
}
@IBAction func longPress(_ sender: Any) {
let pressPoint = (sender as AnyObject).location(in:mapView)
// let pressCoordinate = mapView.convert(pressPoint, to: mapView)
......@@ -78,19 +74,36 @@ class MainViewController: UIViewController, UITextFieldDelegate //, CLLocationM
coordinateToAdress(locationTouch)
}
/*
private func setupSwipeable() {
self.swipeableView.isPanGestureInverted = true
self.swipeableView.flexibleLayout = .init(with: flexLayout, end: view.frame.height / 2)
self.swipeableView.childViewInteractionOnExpandedOnly = false
self.swipeableView.indicatorColors = (UIColor.Showcase8.colorB4,UIColor.Showcase8.colorB1)
}
private func setupChildview() {
if let characterPickerView = self.storyboard?.instantiateViewController(withIdentifier:"child_Id8") as? ShowcaseChildViewController_8 {
self.characterPickerView = characterPickerView
// plug the child view into the swipeable view
self.swipeableView.setChildView(childVC: characterPickerView, parentVC: self)
// plug the character picker delegate
characterPickerView.delegate = self
}
}
*/
override func viewDidLoad() {
super.viewDidLoad()
// setupBackButton()
// self.navigationItem.titleView?.isHidden = false
self.title = "LOGO"
/* self.title = "LOGO"
self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor : UIColor.white]
self.navigationController?.navigationBar.barTintColor = UIColor.black
self.navigationItem.title = "LOGO"
//London coordinates
self.navigationController?.navigationBar.topItem?.title = "Logo"
self.navigationController?.navigationItem.title = "Logo"
self.navigationController?.navigationItem.title = "Logo"*/
//London coordinates
let initialLocation = CLLocation(latitude: 51.509865, longitude: -0.118092)
mapView.centerToLocation(initialLocation)
buttonEmergency.isHidden = false
......@@ -100,13 +113,12 @@ class MainViewController: UIViewController, UITextFieldDelegate //, CLLocationM
buttonEmerHandman.isHidden = true
text_Location.delegate = self
/*
let annotations = MKPointAnnotation()
let annotations = MKPointAnnotation()
annotations.title = "Set my location"
annotations.coordinate = CLLocationCoordinate2D(latitude:
51.509865, longitude: -0.118092)
annotations.coordinate = CLLocationCoordinate2D(latitude: 51.509865, longitude: -0.118092)
mapView.addAnnotation(annotations)*/
// settingsLauncher.delegate = self
}
override func viewDidAppear(_ animated:Bool) {
......@@ -117,22 +129,22 @@ class MainViewController: UIViewController, UITextFieldDelegate //, CLLocationM
buttonEmerElectric.isHidden = true
buttonEmerPlumber.isHidden = true
buttonEmerHandman.isHidden = true
// let detailsController:MainChildViewController
/* if detailsController != nil {
self.detailsController!.removeFromParent()
// self.navigationController?.setNavigationBarHidden(true, animated: animated)
if bottomSheetVC != nil {
//sendSubviewToBack(_ view: UIView)
self.view.sendSubviewToBack(bottomSheetVC!.view)
// self.view.willRemoveSubview(bottomSheetVC!.view)
bottomSheetVC!.removeFromParent()
}
else {
// if detailsController != nil {
return
}*/
}
override func viewWillAppear(_ animated: Bool) {
self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor : UIColor.white]
/* self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor : UIColor.white]
self.navigationController?.navigationBar.barTintColor = UIColor.black
self.navigationController?.navigationBar.topItem?.title = "LOGO"
self.navigationController?.navigationItem.title = "LOGO"
self.navigationController?.navigationItem.title = "LOGO"*/
// self.view.removeFromSuperview()
self.navigationController?.setNavigationBarHidden(true, animated: animated)
}
override func viewWillDisappear(_ animated: Bool) {
......@@ -140,9 +152,48 @@ class MainViewController: UIViewController, UITextFieldDelegate //, CLLocationM
count = 0
}
@IBAction func pressWhatDo(_ sender: Any) {
addBottomSheetView()
}
func addBottomSheetView() {
// 1- Init bottomSheetVC
bottomSheetVC = SmallListWorkVC()
// mapView.isHidden = true
// bottomView.isHidden = true
// 2- Add bottomSheetVC as a child view
if bottomSheetVC != nil {
self.addChild(bottomSheetVC!)
self.view.addSubview(bottomSheetVC!.view)
bottomSheetVC!.didMove(toParent: self)
// 3- Adjust bottomSheet frame and initial position.
let height = view.frame.height
let width = view.frame.width
bottomSheetVC!.view.frame = CGRect(x: 0, y: self.view.frame.maxY, width: width, height: height)
}
// bottomSheetVC.view.frame = CGRect(x: 0, y: 0, width: width, height: height)
}
/*
@IBAction func pressRowSelect(_ sender: Any) {
// guard let navVC = self.navigationController
// else { return }
// settingsLauncher.showSettings(navigVC: navVC,dispatcher:1)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc:UIViewController
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "ListWork") as! ListWorkViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "ListWork")
}
navigationController?.pushViewController(vc, animated: true)
}*/
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
let item = UIBarButtonItem(title: "LOGO", style: .plain, target: nil, action: nil)
viewController.navigationItem.backBarButtonItem = item
/* let item = UIBarButtonItem(title: "LOGO", style: .plain, target: nil, action: nil)
viewController.navigationItem.backBarButtonItem = item*/
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
......@@ -174,77 +225,46 @@ class MainViewController: UIViewController, UITextFieldDelegate //, CLLocationM
CLGeocoder().reverseGeocodeLocation(locations /*.last!*/) { (placemarks, error) in
// Детализированная информация по точке
var placemark: CLPlacemark!
if let placemarks = placemarks {
if let placemarks = placemarks {
placemark = placemarks[0]
}
// Словарь адресов // print(placemark.addressDictionary!)
// Вытаскиваем атрибуты адреса
guard let country = placemark.addressDictionary!["Country"] as?
String
} /* guard let country = placemark.addressDictionary!["Country"] as? String
else { // print("Country name \(country)")
return
}
guard let city:String = (placemark.addressDictionary!["City"] as? String)
else { //print("City name \(city)")
return
}
// Street address
/* if let street = placemark.addressDictionary!["Thoroughfare"] as? NSString { print(street) }*/
guard let street = placemark.addressDictionary!["Street"] as? String
return } guard let city:String = (placemark.addressDictionary!["City"] as? String)
else { //print("City name \(city)") return }*/
guard let street = placemark.addressDictionary!["Street"] as? String
else {
return// print(street)
}
/* if let numHome = placemark.addressDictionary!["SubThoroughfare"] as? NSString { print(numHome) }*/
/* if let name = placemark.addressDictionary!["Name"] as? NSString { print(name) }*/
/* if let locality = placemark.addressDictionary!["Locality"] as? NSString {
print(locality) }*/
guard let subLocality = placemark.addressDictionary!["SubLocality"] as? String
guard let subLocality = placemark.addressDictionary!["SubLocality"] as? String
else {
return// print(subLocality)
}
self.text_Location.text = city + " , " + street + " , " + subLocality
//return address
// address dictionary properties
/* open var name: String? { get } // eg. Apple Inc.
open var thoroughfare: String? { get } // street name, eg. Infinite Loop
open var subThoroughfare: String? { get } // eg. 1
open var locality: String? { get } // city, eg. Cupertino
open var subLocality: String? { get } // neighborhood, common name, eg. Mission District
open var administrativeArea: String? { get } // state, eg. CA
open var subAdministrativeArea: String? { get } // county, eg. Santa Clara
open var postalCode: String? { get } // zip code, eg. 95014
open var isoCountryCode: String? { get } // eg. US
open var country: String? { get } // eg. United States
open var inlandWater: String? { get } // eg. Lake Tahoe
open var ocean: String? { get } // eg. Pacific Ocean
open var areasOfInterest: [String]? { get } // eg. Golden Gate Park
*/
/* self.delay(15, closure: {
self.showAlertLocation()
}*/
//)
self.text_Location.text = street + " , " + subLocality
}
}
}
/*
extension UIViewController {
func setupBackButton() {
let customBackButton = UIBarButtonItem(title: " ", style: .plain, target: nil, action: nil)
navigationItem.backBarButtonItem = customBackButton
}}
*/
private extension MKMapView {
func centerToLocation(
_ location: CLLocation,
regionRadius: CLLocationDistance = 1000
) {
let coordinateRegion = MKCoordinateRegion(
center: location.coordinate,
latitudinalMeters: regionRadius,
longitudinalMeters: regionRadius)
let coordinateRegion = MKCoordinateRegion( center: location.coordinate,
latitudinalMeters: regionRadius, longitudinalMeters: regionRadius)
setRegion(coordinateRegion, animated: true)
}
}
extension MainViewController:SettingsLauncherDelegate {
func settingsDelegateClick(img: UIImage?,selRow:Int) {
if img != nil {
// images.append(img!)
// collectionView.reloadData()
}
else {
self.selRow = selRow
}
}
}
......@@ -16,7 +16,7 @@ class PlumbersViewController: UIViewController,UITableViewDataSource, UITableVie
@IBOutlet weak var glidingView: GlidingCollection!
fileprivate var collectionView: UICollectionView!
var selRow:Int = 0
// let imagePickerController = UIImagePickerController()
let cellReuseIdentifier = "cell"
......@@ -40,13 +40,14 @@ class PlumbersViewController: UIViewController,UITableViewDataSource, UITableVie
tableView.dataSource = self
textViewDesc.delegate = self
settingsLauncher.delegate = self
//glide setup
setup()
}
@IBAction func pressAddPhoto(_ sender: Any) {
guard let navVC = self.navigationController
else { return }
settingsLauncher.showSettings(navigVC: navVC)
settingsLauncher.showSettings(navigVC: navVC,dispatcher:0)
}
@IBAction func BOOK_NOW_Click(_ sender: Any) {
......@@ -148,11 +149,15 @@ extension PlumbersViewController:CalendarViewControllerDelegate {
}
//
extension PlumbersViewController:SettingsLauncherDelegate {
func settingsDelegateClick(img: UIImage?) {
func settingsDelegateClick(img: UIImage?,selRow:Int) {
if img != nil {
images.append(img!)
collectionView.reloadData()
}
else {
self.selRow = selRow
}
collectionView.reloadData()
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment