Commit aa643673 authored by AValSharonov's avatar AValSharonov

Initial commit

parent 040cd6fb
...@@ -7,6 +7,16 @@ ...@@ -7,6 +7,16 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
D5057F9D27BA5E940015C0DC /* VKBookingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */; };
D5057F9E27BA5E940015C0DC /* VKBookingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */; };
D5057F9F27BA5E940015C0DC /* VKBookingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */; };
D514860727BB7FD7006830A3 /* ChatViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D514860627BB7FD7006830A3 /* ChatViewController.swift */; };
D514861427BBEB76006830A3 /* ElectricTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D514861327BBEB76006830A3 /* ElectricTableViewController.swift */; };
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 */; };
D558EA5C27BE4A6C003C4578 /* HandmanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D558EA5B27BE4A6C003C4578 /* HandmanViewController.swift */; };
D558EA6127BE4C65003C4578 /* EmerHandViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D558EA6027BE4C65003C4578 /* EmerHandViewController.swift */; };
D569AB6127B8E27A0013DCFE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6027B8E27A0013DCFE /* AppDelegate.swift */; }; D569AB6127B8E27A0013DCFE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6027B8E27A0013DCFE /* AppDelegate.swift */; };
D569AB6327B8E27A0013DCFE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */; }; D569AB6327B8E27A0013DCFE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */; };
D569AB6527B8E27A0013DCFE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6427B8E27A0013DCFE /* ViewController.swift */; }; D569AB6527B8E27A0013DCFE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6427B8E27A0013DCFE /* ViewController.swift */; };
...@@ -16,6 +26,15 @@ ...@@ -16,6 +26,15 @@
D569AB7027B8E27B0013DCFE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D569AB6E27B8E27B0013DCFE /* LaunchScreen.storyboard */; }; D569AB7027B8E27B0013DCFE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D569AB6E27B8E27B0013DCFE /* LaunchScreen.storyboard */; };
D569AB7B27B8E27B0013DCFE /* Em_callTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB7A27B8E27B0013DCFE /* Em_callTests.swift */; }; D569AB7B27B8E27B0013DCFE /* Em_callTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB7A27B8E27B0013DCFE /* Em_callTests.swift */; };
D569AB8627B8E27B0013DCFE /* Em_callUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB8527B8E27B0013DCFE /* Em_callUITests.swift */; }; D569AB8627B8E27B0013DCFE /* Em_callUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB8527B8E27B0013DCFE /* Em_callUITests.swift */; };
D56E5D6D27C26F2500D0E4B9 /* StartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56E5D6C27C26F2500D0E4B9 /* StartViewController.swift */; };
D56E5D7B27C2894300D0E4B9 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D56E5D7927C2893800D0E4B9 /* MapKit.framework */; };
D5B0201027C37BBE00C4BA4F /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0200F27C37BBE00C4BA4F /* MainViewController.swift */; };
D5B0201527C3826800C4BA4F /* ArtworkViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0201427C3826800C4BA4F /* ArtworkViews.swift */; };
D5B0201A27C382A600C4BA4F /* Artwork.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0201927C382A600C4BA4F /* Artwork.swift */; };
D5E31B2A27BCE16700F5B87D /* PlumViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B2927BCE16700F5B87D /* PlumViewController.swift */; };
D5E31B3227BCEC0900F5B87D /* CollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B3127BCEC0900F5B87D /* CollectionViewCell.swift */; };
D5E31B3727BD578F00F5B87D /* PlumbersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B3627BD578F00F5B87D /* PlumbersViewController.swift */; };
D5E31B3C27BD651C00F5B87D /* EmerElecricianViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B3B27BD651C00F5B87D /* EmerElecricianViewController.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
...@@ -36,6 +55,14 @@ ...@@ -36,6 +55,14 @@
/* End PBXContainerItemProxy section */ /* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VKBookingViewController.swift; sourceTree = "<group>"; };
D514860627BB7FD7006830A3 /* ChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatViewController.swift; sourceTree = "<group>"; };
D514861327BBEB76006830A3 /* ElectricTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElectricTableViewController.swift; sourceTree = "<group>"; };
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>"; };
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>"; };
D569AB5D27B8E27A0013DCFE /* Em-call.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Em-call.app"; sourceTree = BUILT_PRODUCTS_DIR; }; D569AB5D27B8E27A0013DCFE /* Em-call.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Em-call.app"; sourceTree = BUILT_PRODUCTS_DIR; };
D569AB6027B8E27A0013DCFE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; D569AB6027B8E27A0013DCFE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; }; D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
...@@ -51,6 +78,15 @@ ...@@ -51,6 +78,15 @@
D569AB8127B8E27B0013DCFE /* Em-callUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Em-callUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; D569AB8127B8E27B0013DCFE /* Em-callUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Em-callUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
D569AB8527B8E27B0013DCFE /* Em_callUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Em_callUITests.swift; sourceTree = "<group>"; }; D569AB8527B8E27B0013DCFE /* Em_callUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Em_callUITests.swift; sourceTree = "<group>"; };
D569AB8727B8E27B0013DCFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; D569AB8727B8E27B0013DCFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D56E5D6C27C26F2500D0E4B9 /* StartViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartViewController.swift; sourceTree = "<group>"; };
D56E5D7927C2893800D0E4B9 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
D5B0200F27C37BBE00C4BA4F /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
D5B0201427C3826800C4BA4F /* ArtworkViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtworkViews.swift; sourceTree = "<group>"; };
D5B0201927C382A600C4BA4F /* Artwork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Artwork.swift; sourceTree = "<group>"; };
D5E31B2927BCE16700F5B87D /* PlumViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlumViewController.swift; sourceTree = "<group>"; };
D5E31B3127BCEC0900F5B87D /* CollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionViewCell.swift; sourceTree = "<group>"; };
D5E31B3627BD578F00F5B87D /* PlumbersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlumbersViewController.swift; sourceTree = "<group>"; };
D5E31B3B27BD651C00F5B87D /* EmerElecricianViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmerElecricianViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -58,6 +94,7 @@ ...@@ -58,6 +94,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
D56E5D7B27C2894300D0E4B9 /* MapKit.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -78,6 +115,29 @@ ...@@ -78,6 +115,29 @@
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
D5057F9B27BA5E520015C0DC /* VC */ = {
isa = PBXGroup;
children = (
D514861827BBEFC8006830A3 /* Track.swift */,
D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */,
D514860627BB7FD7006830A3 /* ChatViewController.swift */,
D514861327BBEB76006830A3 /* ElectricTableViewController.swift */,
D5E31B2927BCE16700F5B87D /* PlumViewController.swift */,
D5E31B3127BCEC0900F5B87D /* CollectionViewCell.swift */,
D5E31B3627BD578F00F5B87D /* PlumbersViewController.swift */,
D5E31B3B27BD651C00F5B87D /* EmerElecricianViewController.swift */,
D558EA5B27BE4A6C003C4578 /* HandmanViewController.swift */,
D558EA6027BE4C65003C4578 /* EmerHandViewController.swift */,
D51D33FC27BF8836008D5065 /* MapViewController.swift */,
D51D340127BF98B9008D5065 /* CalendarViewController.swift */,
D56E5D6C27C26F2500D0E4B9 /* StartViewController.swift */,
D5B0200F27C37BBE00C4BA4F /* MainViewController.swift */,
D5B0201427C3826800C4BA4F /* ArtworkViews.swift */,
D5B0201927C382A600C4BA4F /* Artwork.swift */,
);
path = VC;
sourceTree = "<group>";
};
D569AB5427B8E27A0013DCFE = { D569AB5427B8E27A0013DCFE = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -85,6 +145,7 @@ ...@@ -85,6 +145,7 @@
D569AB7927B8E27B0013DCFE /* Em-callTests */, D569AB7927B8E27B0013DCFE /* Em-callTests */,
D569AB8427B8E27B0013DCFE /* Em-callUITests */, D569AB8427B8E27B0013DCFE /* Em-callUITests */,
D569AB5E27B8E27A0013DCFE /* Products */, D569AB5E27B8E27A0013DCFE /* Products */,
D56E5D7827C2893800D0E4B9 /* Frameworks */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
...@@ -101,6 +162,7 @@ ...@@ -101,6 +162,7 @@
D569AB5F27B8E27A0013DCFE /* Em-call */ = { D569AB5F27B8E27A0013DCFE /* Em-call */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
D5057F9B27BA5E520015C0DC /* VC */,
D569AB6027B8E27A0013DCFE /* AppDelegate.swift */, D569AB6027B8E27A0013DCFE /* AppDelegate.swift */,
D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */, D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */,
D569AB6427B8E27A0013DCFE /* ViewController.swift */, D569AB6427B8E27A0013DCFE /* ViewController.swift */,
...@@ -131,6 +193,14 @@ ...@@ -131,6 +193,14 @@
path = "Em-callUITests"; path = "Em-callUITests";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
D56E5D7827C2893800D0E4B9 /* Frameworks */ = {
isa = PBXGroup;
children = (
D56E5D7927C2893800D0E4B9 /* MapKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
...@@ -261,10 +331,26 @@ ...@@ -261,10 +331,26 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
D51D340227BF98B9008D5065 /* CalendarViewController.swift in Sources */,
D5E31B3C27BD651C00F5B87D /* EmerElecricianViewController.swift in Sources */,
D5E31B3227BCEC0900F5B87D /* CollectionViewCell.swift in Sources */,
D558EA5C27BE4A6C003C4578 /* HandmanViewController.swift in Sources */,
D569AB6527B8E27A0013DCFE /* ViewController.swift in Sources */, D569AB6527B8E27A0013DCFE /* ViewController.swift in Sources */,
D5E31B2A27BCE16700F5B87D /* PlumViewController.swift in Sources */,
D569AB6B27B8E27A0013DCFE /* Em_call.xcdatamodeld in Sources */, D569AB6B27B8E27A0013DCFE /* Em_call.xcdatamodeld in Sources */,
D569AB6127B8E27A0013DCFE /* AppDelegate.swift in Sources */, D569AB6127B8E27A0013DCFE /* AppDelegate.swift in Sources */,
D5E31B3727BD578F00F5B87D /* PlumbersViewController.swift in Sources */,
D514861927BBEFC8006830A3 /* Track.swift in Sources */,
D5B0201A27C382A600C4BA4F /* Artwork.swift in Sources */,
D56E5D6D27C26F2500D0E4B9 /* StartViewController.swift in Sources */,
D5057F9D27BA5E940015C0DC /* VKBookingViewController.swift in Sources */,
D558EA6127BE4C65003C4578 /* EmerHandViewController.swift in Sources */,
D514860727BB7FD7006830A3 /* ChatViewController.swift in Sources */,
D5B0201527C3826800C4BA4F /* ArtworkViews.swift in Sources */,
D569AB6327B8E27A0013DCFE /* SceneDelegate.swift in Sources */, D569AB6327B8E27A0013DCFE /* SceneDelegate.swift in Sources */,
D5B0201027C37BBE00C4BA4F /* MainViewController.swift in Sources */,
D51D33FD27BF8836008D5065 /* MapViewController.swift in Sources */,
D514861427BBEB76006830A3 /* ElectricTableViewController.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -273,6 +359,7 @@ ...@@ -273,6 +359,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
D569AB7B27B8E27B0013DCFE /* Em_callTests.swift in Sources */, D569AB7B27B8E27B0013DCFE /* Em_callTests.swift in Sources */,
D5057F9E27BA5E940015C0DC /* VKBookingViewController.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -281,6 +368,7 @@ ...@@ -281,6 +368,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
D569AB8627B8E27B0013DCFE /* Em_callUITests.swift in Sources */, D569AB8627B8E27B0013DCFE /* Em_callUITests.swift in Sources */,
D5057F9F27BA5E940015C0DC /* VKBookingViewController.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -441,8 +529,10 @@ ...@@ -441,8 +529,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "Em-call/Assets.xcassets";
DEVELOPMENT_TEAM = C56KLDVGK5; DEVELOPMENT_TEAM = C56KLDVGK5;
INFOPLIST_FILE = "Em-call/Info.plist"; INFOPLIST_FILE = "Em-call/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
...@@ -460,8 +550,10 @@ ...@@ -460,8 +550,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "Em-call/Assets.xcassets";
DEVELOPMENT_TEAM = C56KLDVGK5; DEVELOPMENT_TEAM = C56KLDVGK5;
INFOPLIST_FILE = "Em-call/Info.plist"; INFOPLIST_FILE = "Em-call/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
......
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "CA4ABE3D-9F08-46F9-89CF-2C05E16A010A"
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "3BDA6373-B83C-4B79-A092-AEC46F88CEC9"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/ElectricTableViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "56"
endingLineNumber = "56"
landmarkName = "tableView(_:cellForRowAt:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "DE2AFAAD-B9D3-43E1-BF08-FA18E9D2D734"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/ElectricTableViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "22"
endingLineNumber = "22"
landmarkName = "viewDidLoad()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "6138069B-EB37-4EED-BA4B-15794EDE29C5"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/PlumViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "32"
endingLineNumber = "32"
landmarkName = "PlumViewController"
landmarkType = "3">
<Locations>
<Location
uuid = "6138069B-EB37-4EED-BA4B-15794EDE29C5 - b302bfd359d2841f"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Em_call.PlumViewController.tableView.getter : Swift.Optional&lt;__C.UITableView&gt;"
moduleName = "Em-call"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/alexsh/Documents/GoldCode/Em-call/Em-call/VC/PlumViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "21"
endingLineNumber = "21"
offsetFromSymbolStart = "88">
</Location>
<Location
uuid = "6138069B-EB37-4EED-BA4B-15794EDE29C5 - e01d45379a93d02b"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Em_call.PlumViewController.tableView.setter : Swift.Optional&lt;__C.UITableView&gt;"
moduleName = "Em-call"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/alexsh/Documents/GoldCode/Em-call/Em-call/VC/PlumViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "21"
endingLineNumber = "21"
offsetFromSymbolStart = "155">
</Location>
<Location
uuid = "6138069B-EB37-4EED-BA4B-15794EDE29C5 - fd49b3f64dfff6c7"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Em_call.PlumViewController.tableView.modify : Swift.Optional&lt;__C.UITableView&gt;"
moduleName = "Em-call"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/alexsh/Documents/GoldCode/Em-call/Em-call/VC/PlumViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "0"
endingLineNumber = "0"
offsetFromSymbolStart = "59">
</Location>
<Location
uuid = "6138069B-EB37-4EED-BA4B-15794EDE29C5 - 2b885d5df605ddad"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Em_call.PlumViewController.tableView.modify : Swift.Optional&lt;__C.UITableView&gt; with unmangled suffix &quot;.resume.0&quot;"
moduleName = "Em-call"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/alexsh/Documents/GoldCode/Em-call/Em-call/VC/PlumViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "21"
endingLineNumber = "21"
offsetFromSymbolStart = "64">
</Location>
<Location
uuid = "6138069B-EB37-4EED-BA4B-15794EDE29C5 - 8317465dfdff0ca1"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Em_call.PlumViewController.init(nibName: Swift.Optional&lt;Swift.String&gt;, bundle: Swift.Optional&lt;__C.NSBundle&gt;) -&gt; Em_call.PlumViewController"
moduleName = "Em-call"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/alexsh/Documents/GoldCode/Em-call/Em-call/VC/PlumViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "21"
endingLineNumber = "21"
offsetFromSymbolStart = "272">
</Location>
<Location
uuid = "6138069B-EB37-4EED-BA4B-15794EDE29C5 - 7bbb02a726e603e4"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Em_call.PlumViewController.init(coder: __C.NSCoder) -&gt; Swift.Optional&lt;Em_call.PlumViewController&gt;"
moduleName = "Em-call"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/alexsh/Documents/GoldCode/Em-call/Em-call/VC/PlumViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "21"
endingLineNumber = "21"
offsetFromSymbolStart = "222">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "8234DF99-D52A-45ED-AF63-84E4617E7279"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/VC/PlumbersViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "54"
endingLineNumber = "54"
landmarkName = "tableView(_:didSelectRowAt:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "24EBE614-7B86-4194-BA48-8261576FDD92"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Em-call/AppDelegate.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "30"
endingLineNumber = "30"
landmarkName = "application(_:didFinishLaunchingWithOptions:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
...@@ -10,22 +10,51 @@ import CoreData ...@@ -10,22 +10,51 @@ import CoreData
@main @main
class AppDelegate: UIResponder, UIApplicationDelegate { class AppDelegate: UIResponder, UIApplicationDelegate {
/* - (ObjCBool)application:(_ application: UIApplication, didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
_window=[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
xScreen=[[UIScreen mainScreen] bounds].size.width;
yScreen=[[UIScreen mainScreen] bounds].size.height;
MainController = [[ViewController alloc]init];
_window.rootViewController = MainController;
navController=[[UINavigationController alloc] initWithRootViewController:MainController];
[self.window setRootViewController:navController];
}*/
var window:UIWindow?
// func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
/* window = UIWindow (frame:UIScreen.main.bounds);
window?.rootViewController = StartViewController() as? UIViewController
window?.rootViewController?.show(window.v, sender: nil)
*/
let storyboard: UIStoryboard
if #available(iOS 9, *, *) {
storyboard = UIStoryboard(name: "Main", bundle: nil)
} else {
storyboard = UIStoryboard(name: "MainOld", bundle: nil)
}
let mainViewController = storyboard.instantiateInitialViewController()
window?.rootViewController = mainViewController
window?.makeKeyAndVisible()
return true return true
} }
// MARK: UISceneSession Lifecycle // MARK: UISceneSession Lifecycle
@available(iOS 13.0, *)
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created. // Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with. // Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
} }
@available(iOS 13.0, *)
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session. // Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
...@@ -34,6 +63,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -34,6 +63,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// MARK: - Core Data stack // MARK: - Core Data stack
@available(iOS 10.0, *)
lazy var persistentContainer: NSPersistentContainer = { lazy var persistentContainer: NSPersistentContainer = {
/* /*
The persistent container for the application. This implementation The persistent container for the application. This implementation
...@@ -64,17 +94,22 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -64,17 +94,22 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// MARK: - Core Data Saving support // MARK: - Core Data Saving support
func saveContext () { func saveContext () {
let context = persistentContainer.viewContext if #available(iOS 10.0, *) {
if context.hasChanges { let context = persistentContainer.viewContext
do { if context.hasChanges {
try context.save() do {
} catch { try context.save()
// Replace this implementation with code to handle the error appropriately. } catch {
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. // Replace this implementation with code to handle the error appropriately.
let nserror = error as NSError // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
fatalError("Unresolved error \(nserror), \(nserror.userInfo)") let nserror = error as NSError
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
}
} }
} else {
// Fallback on earlier versions
} }
} }
} }
......
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "electric.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "electric_ico.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "electric_ico-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "electric_ico-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "electric_round.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "emerg_service.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "handman_round.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "handyman_ico.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "handyman_ico-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "handyman_ico-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "handynan.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "home_emcall.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "lock_up_round.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "microphon.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "plumb_ico.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "plumb_ico-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "plumb_ico-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "plumb_round.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "plumbing.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
This diff is collapsed.
...@@ -52,8 +52,7 @@ ...@@ -52,8 +52,7 @@
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>UISupportedInterfaceOrientations~ipad</key> <key>UISupportedInterfaceOrientations~ipad</key>
<array> <array>
......
...@@ -12,6 +12,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { ...@@ -12,6 +12,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow? var window: UIWindow?
@available(iOS 13.0, *)
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
...@@ -19,6 +20,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { ...@@ -19,6 +20,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
guard let _ = (scene as? UIWindowScene) else { return } guard let _ = (scene as? UIWindowScene) else { return }
} }
@available(iOS 13.0, *)
func sceneDidDisconnect(_ scene: UIScene) { func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system. // Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded. // This occurs shortly after the scene enters the background, or when its session is discarded.
...@@ -26,21 +28,25 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { ...@@ -26,21 +28,25 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
} }
@available(iOS 13.0, *)
func sceneDidBecomeActive(_ scene: UIScene) { func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state. // Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
} }
@available(iOS 13.0, *)
func sceneWillResignActive(_ scene: UIScene) { func sceneWillResignActive(_ scene: UIScene) {
// Called when the scene will move from an active state to an inactive state. // Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call). // This may occur due to temporary interruptions (ex. an incoming phone call).
} }
@available(iOS 13.0, *)
func sceneWillEnterForeground(_ scene: UIScene) { func sceneWillEnterForeground(_ scene: UIScene) {
// Called as the scene transitions from the background to the foreground. // Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background. // Use this method to undo the changes made on entering the background.
} }
@available(iOS 13.0, *)
func sceneDidEnterBackground(_ scene: UIScene) { func sceneDidEnterBackground(_ scene: UIScene) {
// Called as the scene transitions from the foreground to the background. // Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information // Use this method to save data, release shared resources, and store enough scene-specific state information
......
//
// Artwork.swift
// Em-call
//
// Created by Alex Sh on 21.02.2022.
//
import Foundation
import MapKit
import Contacts
class Artwork: NSObject, MKAnnotation {
let title: String?
let locationName: String?
let discipline: String?
let coordinate: CLLocationCoordinate2D
init(
title: String?,
locationName: String?,
discipline: String?,
coordinate: CLLocationCoordinate2D
) {
self.title = title
self.locationName = locationName
self.discipline = discipline
self.coordinate = coordinate
super.init()
}
@available(iOS 13.0, *)
init?(feature: MKGeoJSONFeature) {
// 1
guard
let point = feature.geometry.first as? MKPointAnnotation,
// 2
let propertiesData = feature.properties,
let json = try? JSONSerialization.jsonObject(with: propertiesData),
let properties = json as? [String: Any]
else {
return nil
}
// 3
title = properties["title"] as? String
locationName = properties["location"] as? String
discipline = properties["discipline"] as? String
coordinate = point.coordinate
super.init()
}
var subtitle: String? {
return locationName
}
var mapItem: MKMapItem? {
guard let location = locationName else {
return nil
}
let addressDict = [CNPostalAddressStreetKey: location]
let placemark = MKPlacemark(
coordinate: coordinate,
addressDictionary: addressDict)
let mapItem = MKMapItem(placemark: placemark)
mapItem.name = title
return mapItem
}
var markerTintColor: UIColor {
switch discipline {
case "Monument":
return .red
case "Mural":
return .cyan
case "Plaque":
return .blue
case "Sculpture":
return .purple
default:
return .green
}
}
var image: UIImage {
guard let name = discipline else { return #imageLiteral(resourceName: "Flag") }
switch name {
case "Monument":
return #imageLiteral(resourceName: "Monument")
case "Sculpture":
return #imageLiteral(resourceName: "Sculpture")
case "Plaque":
return #imageLiteral(resourceName: "Plaque")
case "Mural":
return #imageLiteral(resourceName: "Mural")
default:
return #imageLiteral(resourceName: "Flag")
}
}
}
//
// ArtworkViews.swift
// Em-call
//
// Created by Alex Sh on 21.02.2022.
//
import Foundation
import MapKit
class ArtworkMarkerView: MKMarkerAnnotationView {
override var annotation: MKAnnotation? {
willSet {
// 1
guard let artwork = newValue as? Artwork else {
return
}
canShowCallout = true
calloutOffset = CGPoint(x: -5, y: 5)
rightCalloutAccessoryView = UIButton(type: .detailDisclosure)
// 2
markerTintColor = artwork.markerTintColor
glyphImage = artwork.image
}
}
}
class ArtworkView: MKAnnotationView {
override var annotation: MKAnnotation? {
willSet {
guard let artwork = newValue as? Artwork else {
return
}
canShowCallout = true
calloutOffset = CGPoint(x: -5, y: 5)
let mapsButton = UIButton(frame: CGRect(origin: CGPoint.zero, size: CGSize(width: 48, height: 48)))
mapsButton.setBackgroundImage(#imageLiteral(resourceName: "Map"), for: .normal)
rightCalloutAccessoryView = mapsButton
image = artwork.image
let detailLabel = UILabel()
detailLabel.numberOfLines = 0
detailLabel.font = detailLabel.font.withSize(12)
detailLabel.text = artwork.subtitle
detailCalloutAccessoryView = detailLabel
}
}
}
//
// CalendarViewController.swift
// Em-call
//
// Created by Alex Sh on 18.02.2022.
//
import UIKit
class CalendarViewController: 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.
}
*/
}
//
// ChatViewController.swift
// Em-call
//
// Created by Alex Sh on 15.02.2022.
//
import UIKit
class ChatViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "but_left"), style: .done, target: self, action: #selector(call_Method))
// Для Tab bar
self.tabBarController?.navigationItem.rightBarButtonItems = [rightBarButtonItem]
// Для NavigationController
self.navigationController?.navigationItem.rightBarButtonItems = [rightBarButtonItem]
// Обязательно! добавить @objc
}
@objc func call_Method () {
print("Click")
}
/*
// 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.
}
*/
}
//
// CollectionViewCell.swift
// Em-call
//
// Created by Alex Sh on 16.02.2022.
//
import UIKit
class TableViewCell:UITableViewCell {
lazy var titleLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.text = "Title"
return label
}()
lazy var descriptionLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.text = "Description"
label.textColor = .gray
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
contentView.addSubview(titleLabel)
contentView.addSubview(descriptionLabel)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
//
// ElectricTableViewController.swift
// Em-call
//
// Created by Alex Sh on 15.02.2022.
//
import UIKit
class ElectricTableViewController:UIViewController,UITableViewDataSource, UITableViewDelegate
{
let trackList = Track.getTrackList()
let cellReuseIdentifier = "cell"
// var storyboard = UIStoryboard(name: "Main", bundle: nil)
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
// Register the table view cell class and its reuse id
self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.rowHeight = 65
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem
tableView.delegate = self
tableView.dataSource = self
}
@IBAction func BookNowClick(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc:UIViewController
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "BookingVK") as! VKBookingViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
navigationController?.pushViewController(vc, animated: true)
}
// MARK: - Table view data source
/*
override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 1
}
*/
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return trackList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
// create a new cell if needed or reuse an old one
// let cell:UITableViewCell = tableView.dequeueReusableCell(withIdentifier: //cellReuseIdentifier) as UITableViewCell? ?? default nil
// guard cell != nil
let cell:UITableViewCell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier, for: indexPath)
let track = trackList[indexPath.row]
cell.textLabel?.text = track.song
cell.detailTextLabel?.text = track.artist
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
// content.image = UIImage(named: track.title)
// content.imageProperties.cornerRadius = tableView.rowHeight / 2
return cell
}
// method to run when table view cell is tapped
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("You tapped cell number \(indexPath.row).")
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let nameXibName = ["Map","Calendar"]
var indexPath = tableView.indexPathForSelectedRow!
let vc:UIViewController
switch indexPath.row //if indexPath.row == 0
{
case 0:
/* let vc = storyboard.instantiateViewController(identifier: "Map") as! MapViewController*/
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! MapViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[indexPath.row])
}
// let mapController:MapViewController! = MapViewController()
navigationController?.pushViewController(vc, animated: true)
case 1:
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[indexPath.row])
}
navigationController?.pushViewController(vc, animated: true)
case 2: if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1])
}
navigationController?.pushViewController(vc, animated: true)
case 3: if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1])
}
navigationController?.pushViewController(vc, animated: true)
default:
return
}
}
// MARK: - Navigation
/*
// In a storyboard-based application, you will often want to do a little preparation before navigation
func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)
{
// Проверяем что сработал segue с нужным идентификатором
// Это тот идентификатор, который мы указали в сториборде
if segue.identifier == "MapViewController"
{
// Здесь объектом sender является ячейка, на которую нажимает юзер
// Получаем indexPath выбранной ячейки с помощью метода indexPathForCell:
let indexPath = self.tableView.indexPath((sender as! UITableViewCell))
// Получаем объект Product под нужным индексом
let product = self.allData[indexPath!.row]
// Получаем контроллер, на который юзер попадёт с этим segue
let detailVC: DetailVC = segue.destinationViewController as! DetailVC
// Задаём атрибут Product в DetailVC
detailVC.product = product
}
}*/
/*
// Override to support conditional editing of the table view.
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the specified item to be editable.
return true
}
*/
/*
// Override to support editing the table view.
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
// Delete the row from the data source
tableView.deleteRows(at: [indexPath], with: .fade)
} else if editingStyle == .insert {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
*/
/*
// Override to support rearranging the table view.
override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
}
*/
/*
// Override to support conditional rearranging of the table view.
override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the item to be re-orderable.
return 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.
}
*/
}
//
// EmerElecricianViewController.swift
// Em-call
//
// Created by Alex Sh on 16.02.2022.
//
import UIKit
class EmerElecricianViewController: UIViewController, UITableViewDataSource,
UITableViewDelegate
{
@IBOutlet weak var tableView: UITableView!
let trackList = Track.getTrackList()
let cellReuseIdentifier = "cell"
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.rowHeight = 65
tableView.delegate = self
tableView.dataSource = self
}
@IBAction func BOOK__Click(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc:UIViewController
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "BookingVK") as! VKBookingViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
navigationController?.pushViewController(vc, animated: true)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return trackList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier, for: indexPath)
let track = trackList[indexPath.row]
cell.textLabel?.text = track.song
cell.detailTextLabel?.text = track.artist
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
return cell
}
// method to run when table view cell is tapped
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("You tapped cell number \(indexPath.row).")
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let nameXibName = ["Map","Calendar"]
let vc:UIViewController
// var indexPath = tableView.indexPathForSelectedRow!
// var vc:UIViewController
switch indexPath.row //if indexPath.row == 0
{
case 0:
/* let vc = storyboard.instantiateViewController(identifier: "Map") as! MapViewController*/
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! MapViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[indexPath.row])
// Fallback on earlier versions
}
// let mapController:MapViewController! = MapViewController()
navigationController?.pushViewController(vc, animated: true)
case 1:
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[indexPath.row])
}
navigationController?.pushViewController(vc, animated: true)
case 2: if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1])
}
navigationController?.pushViewController(vc, animated: true)
case 3: if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1])
}
navigationController?.pushViewController(vc, animated: true)
default:
return
}
}
/*
// 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.
}
*/
}
//
// EmerHandViewController.swift
// Em-call
//
// Created by Alex Sh on 17.02.2022.
//
import UIKit
class EmerHandViewController: UIViewController, UITableViewDataSource,
UITableViewDelegate
{
@IBOutlet weak var tableView: UITableView!
let trackList = Track.getTrackList()
let cellReuseIdentifier = "cell"
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.rowHeight = 65
tableView.delegate = self
tableView.dataSource = self
}
@IBAction func BOOK_Click(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc:UIViewController
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "BookingVK") as! VKBookingViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
navigationController?.pushViewController(vc, animated: true)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return trackList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier, for: indexPath)
let track = trackList[indexPath.row]
cell.textLabel?.text = track.song
cell.detailTextLabel?.text = track.artist
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
return cell
}
// method to run when table view cell is tapped
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("You tapped cell number \(indexPath.row).")
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let nameXibName = ["Map","Calendar"]
// var indexPath = tableView.indexPathForSelectedRow!
let vc:UIViewController
switch indexPath.row //if indexPath.row == 0
{
case 0:
/* let vc = storyboard.instantiateViewController(identifier: "Map") as! MapViewController*/
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! MapViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
// let mapController:MapViewController! = MapViewController()
navigationController?.pushViewController(vc, animated: true)
case 1:
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
navigationController?.pushViewController(vc, animated: true)
case 2: if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1])
}
navigationController?.pushViewController(vc, animated: true)
case 3: if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1])
}
navigationController?.pushViewController(vc, animated: true)
default:
return
}
}
/*
// 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.
}
*/
}
//
// HandmanViewController.swift
// Em-call
//
// Created by Alex Sh on 17.02.2022.
//
import UIKit
class HandmanViewController: UIViewController, UITableViewDataSource,
UITableViewDelegate
{
@IBOutlet weak var tableView: UITableView!
let trackList = Track.getTrackList()
let cellReuseIdentifier = "cell"
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.rowHeight = 65
// collectView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: cellCollectReuseIdentifier)
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem
tableView.delegate = self
tableView.dataSource = self
// Do any additional setup after loading the view.
}
@IBAction func BOOK_NOW_Click(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc:UIViewController
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "BookingVK") as! VKBookingViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
navigationController?.pushViewController(vc, animated: true)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return trackList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier, for: indexPath)
let track = trackList[indexPath.row]
cell.textLabel?.text = track.song
cell.detailTextLabel?.text = track.artist
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
return cell
}
// method to run when table view cell is tapped
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("You tapped cell number \(indexPath.row).")
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let nameXibName = ["Map","Calendar"]
let vc:UIViewController
// var vc:UIViewController
switch indexPath.row //if indexPath.row == 0
{
case 0: /* let vc = storyboard.instantiateViewController(identifier: "Map") as! MapViewController*/
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! MapViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[indexPath.row])
} // let mapController:MapViewController! = MapViewController()
navigationController?.pushViewController(vc, animated: true)
case 1:
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[indexPath.row])
}
navigationController?.pushViewController(vc, animated: true)
case 2: if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1])
}
navigationController?.pushViewController(vc, animated: true)
case 3: if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1])
}
navigationController?.pushViewController(vc, animated: true)
default:
return
}
}
/*
// 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.
}
*/
}
//
// MainViewController.swift
// Em-call
//
// Created by Alex Sh on 21.02.2022.
//
import UIKit
import MapKit
class MainViewController: UIViewController, CLLocationManagerDelegate {
@IBOutlet weak var mapView: MKMapView!
let locationManager = CLLocationManager()
override func viewDidLoad() {
super.viewDidLoad()
// Set initial location in Honolulu
let initialLocation = CLLocation(latitude: 51.509865, longitude: -0.118092)
mapView.centerToLocation(initialLocation)
/*
mapView.show(apiKey: "Your API key") { _ in
let marker = Marker(coordinates: CLLocationCoordinate2D(latitude: 55.7516, longitude: 37.6179))
map.add(marker)
}*/
// checkLocationEnable()
let annotations = MKPointAnnotation()
annotations.title = "Set my location"
annotations.coordinate = CLLocationCoordinate2D(latitude:
51.509865, longitude: -0.118092)
mapView.addAnnotation(annotations)
}
override func viewDidAppear(_ animated:Bool) {
super.viewDidAppear(animated)
checkLocationEnable()
}
func checkLocationEnable() {
if CLLocationManager.locationServicesEnabled() {
// continue to implement here
setupManager()
checkAuthorization()
} else {
// Do something to let users know why they need to turn it on.
showAlertLocation(title:"Location service turned off",
message:"Turn on?",url:URL(string: "App-Prefs:root=LOCATION_SERVICES"))
}
}
func setupManager() {
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyBest
}
func checkAuthorization() {
switch CLLocationManager.authorizationStatus() {
case .authorizedWhenInUse:
mapView.showsUserLocation = true
locationManager.startUpdatingLocation()
break
case .denied:
showAlertLocation(title:"You have blocked location viewing",
message:"Do you want to change it?",
url:URL(string: UIApplication.openSettingsURLString))
break
case .notDetermined:
locationManager.requestWhenInUseAuthorization()
mapView.showsUserLocation = true
break
case .restricted: break
case .authorizedAlways: break
}
}
func showAlertLocation(title:String,message:String?,url:URL?) {
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
let cancelAction = UIAlertAction(title: "Cancel", style: .default,handler:nil)
let settingsAction = UIAlertAction(title: "Options", style: .default) { (alert) -> Void in
if let url = url {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
alert.addAction(cancelAction)
alert.addAction(settingsAction)
self.present(alert, animated: true, completion: nil)
}
/* let oahuCenter = CLLocation(latitude: 51.509865, longitude: -0.118092)
let region = MKCoordinateRegion(
center: oahuCenter.coordinate,
latitudinalMeters: 50000,
longitudinalMeters: 60000)
if #available(iOS 13.0, *) {
mapView.setCameraBoundary(
MKMapView.CameraBoundary(coordinateRegion: region),
animated: true)
} else {
/* mapView.setCameraBoundary( MKMapView.CameraBoundary(coordinateRegion: region),
animated: true)*/
}
if #available(iOS 13.0, *) {
let zoomRange = MKMapView.CameraZoomRange(maxCenterCoordinateDistance: 200000)
mapView.setCameraZoomRange(zoomRange, animated: true)
} else {
// Fallback on earlier versions
}
// mapView.setCameraZoomRange(zoomRange, animated: 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 MainViewController {
// 2
func locationManager(manager: CLLocationManager, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
// 3
if status == .authorizedWhenInUse {
// 4
locationManager.startUpdatingLocation()
//5
// mapView.myLocationEnabled = true
// mapView.settings.myLocationButton = true
}
}
// 6
func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
if let location = locations.last?.coordinate {
let region = MKCoordinateRegion(center:location, latitudinalMeters:5000, longitudinalMeters:5000)
mapView.setRegion(region, animated: true)
// 7
// mapView.camera = GMSCameraPosition(target: location.coordinate, zoom: 15, bearing: 0, viewingAngle: 0)
// 8
locationManager.stopUpdatingLocation()
}
}
}
private extension MKMapView {
func centerToLocation(
_ location: CLLocation,
regionRadius: CLLocationDistance = 1000
) {
let coordinateRegion = MKCoordinateRegion(
center: location.coordinate,
latitudinalMeters: regionRadius,
longitudinalMeters: regionRadius)
setRegion(coordinateRegion, animated: true)
}
}
//
// MapViewController.swift
// Em-call
//
// Created by Alex Sh on 18.02.2022.
//
import UIKit
class MapViewController: 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.
}
*/
}
//
// PlumViewController.swift
// Em-call
//
// Created by Alex Sh on 16.02.2022.
//
import UIKit
class PlumViewController: UIViewController, UITableViewDataSource,
UITableViewDelegate
{
let trackList = Track.getTrackList()
let cellReuseIdentifier = "cell"
//let cellCollectReuseIdentifier = "cellCollect"
/* lazy var titleLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.text = "Title"
return label
}()
lazy var descriptionLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.text = "Description"
label.textColor = .gray
return label
}()*/
// @IBOutlet weak var collectView: UICollectionView!
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.rowHeight = 65
// collectView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: cellCollectReuseIdentifier)
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem
tableView.delegate = self
tableView.dataSource = self
// collectView.delegate = self
// collectView.dataSource = self
// Do any additional setup after loading the view.
}
@IBAction func BOOK_Click(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc:UIViewController
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "BookingVK") as! VKBookingViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
// vc = self.find(by: (storyboard, "BookingVK"))
// instantiateViewController(withIdentifier identifier: String)
// Fallback on earlier versions
}
navigationController?.pushViewController(vc, animated: true)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return trackList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier, for: indexPath)
// as! TableViewCell
let track = trackList[indexPath.row]
/*if #available(iOS 14.0, *) {
var content = cell.defaultContentConfiguration()
content.text = track.song
content.secondaryText = track.artist
// content.image = UIImage(named: track.title)
// content.imageProperties.cornerRadius = tableView.rowHeight / 2
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
cell.contentConfiguration = content
} else {*/
// cell.titleLabel.text = track.song
// cell.descriptionLabel.text = track.artist
cell.textLabel?.text = track.song
cell.detailTextLabel?.text = track.artist
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
// }
return cell
}
// method to run when table view cell is tapped
// @available(iOS 13.0, *)
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("You tapped cell number \(indexPath.row).")
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let nameXibName = ["Map","Calendar"]
// var indexPath = tableView.indexPathForSelectedRow!
let vc:UIViewController
switch indexPath.row //if indexPath.row == 0
{
case 0:
/* let vc = storyboard.instantiateViewController(identifier: "Map") as! MapViewController*/
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! MapViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: nameXibName[indexPath.row])
// Fallback on earlier versions
}
// let mapController:MapViewController! = MapViewController()
navigationController?.pushViewController(vc, animated: true)
case 1:
let vc = storyboard.instantiateViewController(withIdentifier: nameXibName[indexPath.row]) as! CalendarViewController
navigationController?.pushViewController(vc, animated: true)
case 2: let vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1]) as! CalendarViewController
navigationController?.pushViewController(vc, animated: true)
case 3: let vc = storyboard.instantiateViewController(withIdentifier: nameXibName[1]) as! CalendarViewController
navigationController?.pushViewController(vc, animated: true)
default:
return
}
}
/*
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 4
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectView.dequeueReusableCell(withReuseIdentifier: cellReuseIdentifier, for: indexPath) as! CollectionViewCell
let track = trackList[indexPath.row]
// cell.singleLabel.text = String(track.song)
cell.singleLabel.text = String(indexPath.row)
//var content = cell.defaultContentConfiguration()
// content.text = track.song
// content.secondaryText = track.artist
// content.image = UIImage(named: track.title)
// content.imageProperties.cornerRadius = tableView.rowHeight / 2
// cell.contentConfiguration = content
return cell
}*/
/*
// 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.
}
*/
}
//
// PlumbersViewController.swift
// Em-call
//
// Created by Alex Sh on 16.02.2022.
//
import UIKit
class PlumbersViewController: UIViewController,UITableViewDataSource, UITableViewDelegate {
let trackList = Track.getTrackList()
let cellReuseIdentifier = "cell"
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.rowHeight = 65
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem
tableView.delegate = self
tableView.dataSource = self
}
@IBAction func BOOK_NOW_Click(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc:UIViewController
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "BookingVK") as! VKBookingViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
navigationController?.pushViewController(vc, animated: true)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return trackList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier, for: indexPath)
let track = trackList[indexPath.row]
cell.textLabel?.text = track.song
cell.detailTextLabel?.text = track.artist
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
return cell
}
// method to run when table view cell is tapped
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("You tapped cell number \(indexPath.row).")
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let nameXibName = ["Map","Calendar"]
var indexPath = tableView.indexPathForSelectedRow!
let vc:UIViewController // var vc:UIViewController
switch indexPath.row //if indexPath.row == 0
{
case 0:
/* let vc = storyboard.instantiateViewController(identifier: "Map") as! MapViewController*/
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! MapViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
} // let mapController:MapViewController! = MapViewController()
navigationController?.pushViewController(vc, animated: true)
case 1:
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[indexPath.row]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
navigationController?.pushViewController(vc, animated: true)
case 2:
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
navigationController?.pushViewController(vc, animated: true)
case 3:
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
navigationController?.pushViewController(vc, animated: true)
default:
return
}
}
/*
// 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.
}
*/
}
//
// StartViewController.swift
// Em-call
//
// Created by Alex Sh on 20.02.2022.
//
import UIKit
class StartViewController: 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.
}
*/
}
//
// Track.swift
// TrackListApp
//
//
//
struct Track {
let artist: String
let song: String
var title: String {
"\(artist) - \(song)"
}
}
extension Track {
static func getTrackList() -> [Track] {
[
Track(artist: "Work location", song: "2 Dortland ave, Manchester"),
Track(artist: "Date and time", song: "Select Date and time"),
Track(artist: "Your contacts", song: "+1 234 567 89 00"),
Track(artist: "Payment", song: "**** 1234")
]
}
}
//
// VKBookingViewController.swift
// Em-call
//
// Created by Alex Sh on 14.02.2022.
//
import UIKit
class VKBookingViewController: UIViewController,UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var emergency: UILabel!
@IBOutlet weak var worker: UILabel!
@IBOutlet weak var workLocation: UILabel!
@IBOutlet weak var date_time: UILabel!
@IBOutlet weak var cost: UILabel!
@IBOutlet weak var costType: UILabel!
@IBOutlet weak var tableViewWork: UITableView!
@IBOutlet weak var segmentControl: UISegmentedControl!
let cellReuseIdentifier = "cell"
override func viewDidLoad() {
super.viewDidLoad()
segmentControl.addTarget(self, action: #selector(segmentAction(_:)), for: .valueChanged)
self.tableViewWork.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableViewWork.rowHeight = 60
tableViewWork.delegate = self
tableViewWork.dataSource = self
tableViewWork.isHidden = true
// self.title = "Booking"
}
@objc func segmentAction(_ segmentedControl: UISegmentedControl) {
switch (segmentedControl.selectedSegmentIndex) {
case 0:
tableViewWork.isHidden = true
workLocation.text = "22 Dorlan ave, Manchester"
date_time.text = "As soon as possible"
cost.text = "100"
costType.text = "Approximate price"
break // Uno
case 1:
tableViewWork.isHidden = false
workLocation.text = "22 Dorlan ave"
date_time.text = "18 feb, 18:00"
cost.text = "200"
costType.text = "Total price"
break // Dos
default:
break
}
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: cellReuseIdentifier, for: indexPath)
// let track = trackList[indexPath.row]
/* var content = cell.defaultContentConfiguration()
content.text = "Work"
content.secondaryText = "___________"
cell.contentConfiguration = content
*/
cell.textLabel?.text = "Work"
cell.detailTextLabel?.text = "___________"
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
return cell
}
/*
// 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.
}
*/
}
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