Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
em_call
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Дмитрий Гребенников
em_call
Commits
04d75659
Commit
04d75659
authored
Feb 27, 2022
by
Дмитрий Гребенников
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2702
2702_2022
parent
aa643673
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
1966 additions
and
1022 deletions
+1966
-1022
project.pbxproj
Em-call.xcodeproj/project.pbxproj
+37
-9
Breakpoints_v2.xcbkptlist
...a/alexsh.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+337
-62
Contents.json
Em-call/Assets.xcassets/ico_handyman.imageset/Contents.json
+21
-0
ico_handyman.png
...ll/Assets.xcassets/ico_handyman.imageset/ico_handyman.png
+0
-0
Contents.json
Em-call/Assets.xcassets/ico_lampa.imageset/Contents.json
+21
-0
ico_lampa.png
Em-call/Assets.xcassets/ico_lampa.imageset/ico_lampa.png
+0
-0
Contents.json
Em-call/Assets.xcassets/ico_loc_up.imageset/Contents.json
+21
-0
ico_loc_up.png
Em-call/Assets.xcassets/ico_loc_up.imageset/ico_loc_up.png
+0
-0
Contents.json
Em-call/Assets.xcassets/ico_plumber.imageset/Contents.json
+21
-0
ico_plumber.png
Em-call/Assets.xcassets/ico_plumber.imageset/ico_plumber.png
+0
-0
Main.storyboard
Em-call/Base.lproj/Main.storyboard
+661
-595
Artwork.swift
Em-call/Data/Artwork.swift
+0
-0
ArtworkViews.swift
Em-call/Data/ArtworkViews.swift
+2
-2
LocationMng.swift
Em-call/Data/LocationMng.swift
+72
-0
ShowAlert.swift
Em-call/Data/ShowAlert.swift
+58
-0
Track.swift
Em-call/Data/Track.swift
+0
-0
ChangePswViewController.swift
Em-call/EnterVC/ChangePswViewController.swift
+29
-0
RegistrationViewController.swift
Em-call/EnterVC/RegistrationViewController.swift
+29
-0
CalendarViewController.swift
Em-call/VC/CalendarViewController.swift
+90
-1
ElectricTableViewController.swift
Em-call/VC/ElectricTableViewController.swift
+83
-52
EmerElecricianViewController.swift
Em-call/VC/EmerElecricianViewController.swift
+3
-0
EmerHandViewController.swift
Em-call/VC/EmerHandViewController.swift
+17
-0
HandmanViewController.swift
Em-call/VC/HandmanViewController.swift
+111
-49
MainViewController.swift
Em-call/VC/MainViewController.swift
+169
-116
MapViewController.swift
Em-call/VC/MapViewController.swift
+111
-2
PlumViewController.swift
Em-call/VC/PlumViewController.swift
+4
-63
PlumbersViewController.swift
Em-call/VC/PlumbersViewController.swift
+69
-52
ViewController.swift
Em-call/ViewController.swift
+0
-19
No files found.
Em-call.xcodeproj/project.pbxproj
View file @
04d75659
...
...
@@ -19,7 +19,6 @@
D558EA6127BE4C65003C4578
/* EmerHandViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D558EA6027BE4C65003C4578
/* EmerHandViewController.swift */
;
};
D569AB6127B8E27A0013DCFE
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D569AB6027B8E27A0013DCFE
/* AppDelegate.swift */
;
};
D569AB6327B8E27A0013DCFE
/* SceneDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D569AB6227B8E27A0013DCFE
/* SceneDelegate.swift */
;
};
D569AB6527B8E27A0013DCFE
/* ViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D569AB6427B8E27A0013DCFE
/* ViewController.swift */
;
};
D569AB6827B8E27A0013DCFE
/* Main.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D569AB6627B8E27A0013DCFE
/* Main.storyboard */
;
};
D569AB6B27B8E27A0013DCFE
/* Em_call.xcdatamodeld in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D569AB6927B8E27A0013DCFE
/* Em_call.xcdatamodeld */
;
};
D569AB6D27B8E27B0013DCFE
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D569AB6C27B8E27B0013DCFE
/* Assets.xcassets */
;
};
...
...
@@ -35,6 +34,10 @@
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 */
;
};
D5F0236A27C4DAC2008F4146
/* RegistrationViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5F0236927C4DAC2008F4146
/* RegistrationViewController.swift */
;
};
D5F0236F27C4DAD8008F4146
/* ChangePswViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5F0236E27C4DAD8008F4146
/* ChangePswViewController.swift */
;
};
D5F0237B27C4DEC4008F4146
/* LocationMng.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5F0237A27C4DEC4008F4146
/* LocationMng.swift */
;
};
D5F0238827C4E2AA008F4146
/* ShowAlert.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D5F0238727C4E2AA008F4146
/* ShowAlert.swift */
;
};
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
...
...
@@ -66,7 +69,6 @@
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>"
;
};
D569AB6227B8E27A0013DCFE
/* SceneDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SceneDelegate.swift
;
sourceTree
=
"<group>"
;
};
D569AB6427B8E27A0013DCFE
/* ViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ViewController.swift
;
sourceTree
=
"<group>"
;
};
D569AB6727B8E27A0013DCFE
/* Base */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.storyboard
;
name
=
Base
;
path
=
Base.lproj/Main.storyboard
;
sourceTree
=
"<group>"
;
};
D569AB6A27B8E27A0013DCFE
/* Em_call.xcdatamodel */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.xcdatamodel
;
path
=
Em_call.xcdatamodel
;
sourceTree
=
"<group>"
;
};
D569AB6C27B8E27B0013DCFE
/* Assets.xcassets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder.assetcatalog
;
path
=
Assets.xcassets
;
sourceTree
=
"<group>"
;
};
...
...
@@ -87,6 +89,10 @@
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>"
;
};
D5F0236927C4DAC2008F4146
/* RegistrationViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RegistrationViewController.swift
;
sourceTree
=
"<group>"
;
};
D5F0236E27C4DAD8008F4146
/* ChangePswViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ChangePswViewController.swift
;
sourceTree
=
"<group>"
;
};
D5F0237A27C4DEC4008F4146
/* LocationMng.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
LocationMng.swift
;
sourceTree
=
"<group>"
;
};
D5F0238727C4E2AA008F4146
/* ShowAlert.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ShowAlert.swift
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -118,7 +124,6 @@
D5057F9B27BA5E520015C0DC
/* VC */
=
{
isa
=
PBXGroup
;
children
=
(
D514861827BBEFC8006830A3
/* Track.swift */
,
D5057F9C27BA5E940015C0DC
/* VKBookingViewController.swift */
,
D514860627BB7FD7006830A3
/* ChatViewController.swift */
,
D514861327BBEB76006830A3
/* ElectricTableViewController.swift */
,
...
...
@@ -132,8 +137,6 @@
D51D340127BF98B9008D5065
/* CalendarViewController.swift */
,
D56E5D6C27C26F2500D0E4B9
/* StartViewController.swift */
,
D5B0200F27C37BBE00C4BA4F
/* MainViewController.swift */
,
D5B0201427C3826800C4BA4F
/* ArtworkViews.swift */
,
D5B0201927C382A600C4BA4F
/* Artwork.swift */
,
);
path
=
VC
;
sourceTree
=
"<group>"
;
...
...
@@ -162,10 +165,11 @@
D569AB5F27B8E27A0013DCFE
/* Em-call */
=
{
isa
=
PBXGroup
;
children
=
(
D5F0237627C4DB76008F4146
/* Data */
,
D5F0236027C4DA8E008F4146
/* EnterVC */
,
D5057F9B27BA5E520015C0DC
/* VC */
,
D569AB6027B8E27A0013DCFE
/* AppDelegate.swift */
,
D569AB6227B8E27A0013DCFE
/* SceneDelegate.swift */
,
D569AB6427B8E27A0013DCFE
/* ViewController.swift */
,
D569AB6627B8E27A0013DCFE
/* Main.storyboard */
,
D569AB6C27B8E27B0013DCFE
/* Assets.xcassets */
,
D569AB6E27B8E27B0013DCFE
/* LaunchScreen.storyboard */
,
...
...
@@ -201,6 +205,27 @@
name
=
Frameworks
;
sourceTree
=
"<group>"
;
};
D5F0236027C4DA8E008F4146
/* EnterVC */
=
{
isa
=
PBXGroup
;
children
=
(
D5F0236927C4DAC2008F4146
/* RegistrationViewController.swift */
,
D5F0236E27C4DAD8008F4146
/* ChangePswViewController.swift */
,
);
path
=
EnterVC
;
sourceTree
=
"<group>"
;
};
D5F0237627C4DB76008F4146
/* Data */
=
{
isa
=
PBXGroup
;
children
=
(
D514861827BBEFC8006830A3
/* Track.swift */
,
D5B0201427C3826800C4BA4F
/* ArtworkViews.swift */
,
D5B0201927C382A600C4BA4F
/* Artwork.swift */
,
D5F0237A27C4DEC4008F4146
/* LocationMng.swift */
,
D5F0238727C4E2AA008F4146
/* ShowAlert.swift */
,
);
path
=
Data
;
sourceTree
=
"<group>"
;
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
...
...
@@ -332,10 +357,11 @@
buildActionMask
=
2147483647
;
files
=
(
D51D340227BF98B9008D5065
/* CalendarViewController.swift in Sources */
,
D5F0237B27C4DEC4008F4146
/* LocationMng.swift in Sources */
,
D5E31B3C27BD651C00F5B87D
/* EmerElecricianViewController.swift in Sources */
,
D5F0238827C4E2AA008F4146
/* ShowAlert.swift in Sources */
,
D5E31B3227BCEC0900F5B87D
/* CollectionViewCell.swift in Sources */
,
D558EA5C27BE4A6C003C4578
/* HandmanViewController.swift in Sources */
,
D569AB6527B8E27A0013DCFE
/* ViewController.swift in Sources */
,
D5E31B2A27BCE16700F5B87D
/* PlumViewController.swift in Sources */
,
D569AB6B27B8E27A0013DCFE
/* Em_call.xcdatamodeld in Sources */
,
D569AB6127B8E27A0013DCFE
/* AppDelegate.swift in Sources */
,
...
...
@@ -343,7 +369,9 @@
D514861927BBEFC8006830A3
/* Track.swift in Sources */
,
D5B0201A27C382A600C4BA4F
/* Artwork.swift in Sources */
,
D56E5D6D27C26F2500D0E4B9
/* StartViewController.swift in Sources */
,
D5F0236F27C4DAD8008F4146
/* ChangePswViewController.swift in Sources */
,
D5057F9D27BA5E940015C0DC
/* VKBookingViewController.swift in Sources */
,
D5F0236A27C4DAC2008F4146
/* RegistrationViewController.swift in Sources */
,
D558EA6127BE4C65003C4578
/* EmerHandViewController.swift in Sources */
,
D514860727BB7FD7006830A3
/* ChatViewController.swift in Sources */
,
D5B0201527C3826800C4BA4F
/* ArtworkViews.swift in Sources */
,
...
...
@@ -532,7 +560,7 @@
DEVELOPMENT_ASSET_PATHS
=
"Em-call/Assets.xcassets"
;
DEVELOPMENT_TEAM
=
C56KLDVGK5
;
INFOPLIST_FILE
=
"Em-call/Info.plist"
;
IPHONEOS_DEPLOYMENT_TARGET
=
11.
3
;
IPHONEOS_DEPLOYMENT_TARGET
=
11.
4
;
LD_RUNPATH_SEARCH_PATHS
=
(
"$(inherited)"
,
"@executable_path/Frameworks"
,
...
...
@@ -553,7 +581,7 @@
DEVELOPMENT_ASSET_PATHS
=
"Em-call/Assets.xcassets"
;
DEVELOPMENT_TEAM
=
C56KLDVGK5
;
INFOPLIST_FILE
=
"Em-call/Info.plist"
;
IPHONEOS_DEPLOYMENT_TARGET
=
11.
3
;
IPHONEOS_DEPLOYMENT_TARGET
=
11.
4
;
LD_RUNPATH_SEARCH_PATHS
=
(
"$(inherited)"
,
"@executable_path/Frameworks"
,
...
...
Em-call.xcodeproj/xcuserdata/alexsh.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
04d75659
...
...
@@ -7,139 +7,414 @@
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"
3BDA6373-B83C-4B79-A092-AEC46F88CEC9
"
uuid =
"
DE2AFAAD-B9D3-43E1-BF08-FA18E9D2D734
"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/ElectricTableViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"
56
"
endingLineNumber =
"
56
"
landmarkName =
"
tableView(_:cellForRowAt:
)"
startingLineNumber =
"
24
"
endingLineNumber =
"
24
"
landmarkName =
"
viewDidLoad(
)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"
DE2AFAAD-B9D3-43E1-BF08-FA18E9D2D734
"
uuid =
"
24EBE614-7B86-4194-BA48-8261576FDD92
"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/
VC/ElectricTableViewController
.swift"
filePath =
"Em-call/
AppDelegate
.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"22"
endingLineNumber =
"22"
landmarkName =
"viewDidLoad()"
startingLineNumber =
"30"
endingLineNumber =
"30"
landmarkName =
"application(_:didFinishLaunchingWithOptions:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"D80C42C7-0F51-43AB-AF3A-11A1D596034F"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/MainViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"143"
endingLineNumber =
"143"
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 =
"165"
endingLineNumber =
"165"
landmarkName =
"coordinateToAdress(_:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"6138069B-EB37-4EED-BA4B-15794EDE29C5"
uuid =
"5D072DE7-DD86-48B1-B43C-36FBA7A4B2E2"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/HandmanViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"142"
endingLineNumber =
"142"
landmarkName =
"unknown"
landmarkType =
"0"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"2F0178FD-D17C-404D-A048-86C57E9CA753"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/
Plum
ViewController.swift"
filePath =
"Em-call/VC/
Map
ViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"32"
endingLineNumber =
"32"
landmarkName =
"PlumViewController"
landmarkType =
"3"
>
startingLineNumber =
"20"
endingLineNumber =
"20"
landmarkName =
"pressSavePosition(_:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"EC91741F-175A-4117-8483-DAB78A259AF1"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/MapViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"19"
endingLineNumber =
"19"
landmarkName =
"pressSavePosition(_:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"0A60EE08-9D08-458E-B85C-B49126BC8FC4"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/CalendarViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"41"
endingLineNumber =
"41"
landmarkName =
"saveDateTime(_:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"AACB7B3C-62D0-4162-BD80-251366E5D3D4"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/HandmanViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"152"
endingLineNumber =
"152"
landmarkName =
"HandmanViewController"
landmarkType =
"21"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"2E2A0951-BCEB-45FD-9EA4-AE80301936F1"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/HandmanViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"150"
endingLineNumber =
"150"
landmarkName =
"delegateClick(text:)"
landmarkType =
"7"
>
<Locations>
<Location
uuid =
"
6138069B-EB37-4EED-BA4B-15794EDE29C5 - b302bfd359d2841f
"
uuid =
"
2E2A0951-BCEB-45FD-9EA4-AE80301936F1 - 3f212e95e80c2359
"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"Em_call.
PlumViewController.tableView.getter : Swift.Optional<__C.UITableView>
"
symbolName =
"Em_call.
HandmanViewController.calendarDelegateClick(text: Swift.String, flagData: Swift.Int) -> ()
"
moduleName =
"Em-call"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/alexsh/Documents/G
oldCode/Em-call/Em-call/VC/Plum
ViewController.swift"
urlString =
"file:///Users/alexsh/Documents/G
itHub/Em-call/Em-call/VC/Handman
ViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"
21
"
endingLineNumber =
"
21
"
offsetFromSymbolStart =
"
88
"
>
startingLineNumber =
"
169
"
endingLineNumber =
"
169
"
offsetFromSymbolStart =
"
147
"
>
</Location>
<Location
uuid =
"
6138069B-EB37-4EED-BA4B-15794EDE29C5 - e01d45379a93d02b
"
uuid =
"
2E2A0951-BCEB-45FD-9EA4-AE80301936F1 - 3f212e95e80c2359
"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"Em_call.
PlumViewController.tableView.setter : Swift.Optional<__C.UITableView>
"
symbolName =
"Em_call.
HandmanViewController.calendarDelegateClick(text: Swift.String, flagData: Swift.Int) -> ()
"
moduleName =
"Em-call"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/alexsh/Documents/G
oldCode/Em-call/Em-call/VC/Plum
ViewController.swift"
urlString =
"file:///Users/alexsh/Documents/G
itHub/Em-call/Em-call/VC/Handman
ViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"
21
"
endingLineNumber =
"
21
"
offsetFromSymbolStart =
"
155
"
>
startingLineNumber =
"
169
"
endingLineNumber =
"
169
"
offsetFromSymbolStart =
"
216
"
>
</Location>
<Location
uuid =
"6138069B-EB37-4EED-BA4B-15794EDE29C5 - fd49b3f64dfff6c7"
uuid =
"2E2A0951-BCEB-45FD-9EA4-AE80301936F1 - 3f212e95e80c2359"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"Em_call.HandmanViewController.calendarDelegateClick(text: Swift.String, flagData: Swift.Int) -> ()"
moduleName =
"Em-call"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/alexsh/Documents/GitHub/Em-call/Em-call/VC/HandmanViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"169"
endingLineNumber =
"169"
offsetFromSymbolStart =
"291"
>
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"0AA18DE8-E6FC-46E1-9805-07D43ED116E1"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/Data/ShowAlert.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"37"
endingLineNumber =
"37"
landmarkName =
"showAlertSample(title:message:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"F29ACB5B-523A-4BDA-BE9B-2C2047FC7606"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/CalendarViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"60"
endingLineNumber =
"60"
landmarkName =
"saveContact(_:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"A576548B-C000-4B36-9DF3-7C3DD253F8E7"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/CalendarViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"71"
endingLineNumber =
"71"
landmarkName =
"saveContact(_:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"36772985-98A4-4D97-85BE-319C036E9661"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/CalendarViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"51"
endingLineNumber =
"51"
landmarkName =
"saveContact(_:)"
landmarkType =
"7"
>
<Locations>
<Location
uuid =
"36772985-98A4-4D97-85BE-319C036E9661 - 5e922c4f06104f01"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"Em_call.
PlumViewController.tableView.modify : Swift.Optional<__C.UITableView>
"
symbolName =
"Em_call.
CalendarViewController.saveContact(Any) -> ()
"
moduleName =
"Em-call"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/alexsh/Documents/G
oldCode/Em-call/Em-call/VC/Plum
ViewController.swift"
urlString =
"file:///Users/alexsh/Documents/G
itHub/Em-call/Em-call/VC/Calendar
ViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"
0
"
endingLineNumber =
"
0
"
offsetFromSymbolStart =
"
5
9"
>
startingLineNumber =
"
48
"
endingLineNumber =
"
48
"
offsetFromSymbolStart =
"
136
9"
>
</Location>
<Location
uuid =
"
6138069B-EB37-4EED-BA4B-15794EDE29C5 - 2b885d5df605ddad
"
uuid =
"
36772985-98A4-4D97-85BE-319C036E9661 - d7d39e2ff37fa334
"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"
Em_call.PlumViewController.tableView.modify : Swift.Optional<__C.UITableView> with unmangled suffix ".resume.0"
"
symbolName =
"
closure #1 () -> () in Em_call.CalendarViewController.saveContact(Any) -> ()
"
moduleName =
"Em-call"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/alexsh/Documents/G
oldCode/Em-call/Em-call/VC/Plum
ViewController.swift"
urlString =
"file:///Users/alexsh/Documents/G
itHub/Em-call/Em-call/VC/Calendar
ViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"
21
"
endingLineNumber =
"
21
"
offsetFromSymbolStart =
"
64
"
>
startingLineNumber =
"
49
"
endingLineNumber =
"
49
"
offsetFromSymbolStart =
"
38
"
>
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"05ED9425-8429-42D9-B62E-7BDF0B14420F"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/MainViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"81"
endingLineNumber =
"81"
landmarkName =
"viewDidLoad()"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"ADED9680-7BD4-486F-8512-0505745E5D4E"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/MainViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"101"
endingLineNumber =
"101"
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 =
"113"
endingLineNumber =
"113"
landmarkName =
"viewDidAppear(_:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"84092168-0D03-4CD3-865F-420694B485CD"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/MainChildViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"26"
endingLineNumber =
"26"
landmarkName =
"viewDidAppear(_:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"7D596546-9E29-49CC-A86D-1C803D0B6909"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/VC/CalendarViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"78"
endingLineNumber =
"78"
landmarkName =
"saveCard(_:)"
landmarkType =
"7"
>
<Locations>
<Location
uuid =
"
6138069B-EB37-4EED-BA4B-15794EDE29C5 - 8317465dfdff0ca1
"
uuid =
"
7D596546-9E29-49CC-A86D-1C803D0B6909 - c889388771569a52
"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"Em_call.
PlumViewController.init(nibName: Swift.Optional<Swift.String>, bundle: Swift.Optional<__C.NSBundle>) -> Em_call.PlumViewController
"
symbolName =
"Em_call.
CalendarViewController.saveCard(Any) -> ()
"
moduleName =
"Em-call"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/alexsh/Documents/G
oldCode/Em-call/Em-call/VC/Plum
ViewController.swift"
urlString =
"file:///Users/alexsh/Documents/G
itHub/Em-call/Em-call/VC/Calendar
ViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"
21
"
endingLineNumber =
"
21
"
offsetFromSymbolStart =
"
272
"
>
startingLineNumber =
"
78
"
endingLineNumber =
"
78
"
offsetFromSymbolStart =
"
1369
"
>
</Location>
<Location
uuid =
"
6138069B-EB37-4EED-BA4B-15794EDE29C5 - 7bbb02a726e603e4
"
uuid =
"
7D596546-9E29-49CC-A86D-1C803D0B6909 - c899398dce4961bf
"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"
Em_call.PlumViewController.init(coder: __C.NSCoder) -> Swift.Optional<Em_call.PlumViewController>
"
symbolName =
"
closure #1 () -> () in Em_call.CalendarViewController.saveCard(Any) -> ()
"
moduleName =
"Em-call"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/alexsh/Documents/G
oldCode/Em-call/Em-call/VC/Plum
ViewController.swift"
urlString =
"file:///Users/alexsh/Documents/G
itHub/Em-call/Em-call/VC/Calendar
ViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"
21
"
endingLineNumber =
"
21
"
offsetFromSymbolStart =
"
222
"
>
startingLineNumber =
"
79
"
endingLineNumber =
"
79
"
offsetFromSymbolStart =
"
38
"
>
</Location>
</Locations>
</BreakpointContent>
...
...
@@ -147,32 +422,32 @@
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"
8234DF99-D52A-45ED-AF63-84E4617E7279
"
shouldBeEnabled =
"
No
"
uuid =
"
408F81E7-5258-4A23-AD32-02D8F54A261A
"
shouldBeEnabled =
"
Yes
"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/
VC/Plumbers
ViewController.swift"
filePath =
"Em-call/
Data/MainTable
ViewController.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"
54
"
endingLineNumber =
"
54
"
landmarkName =
"
tableView(_:didSelectRowA
t:)"
startingLineNumber =
"
189
"
endingLineNumber =
"
189
"
landmarkName =
"
delegateClick(tex
t:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"
24EBE614-7B86-4194-BA48-8261576FDD92
"
uuid =
"
A07C4963-FDE3-4348-A454-D738B78EFA8C
"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Em-call/
AppDelegate
.swift"
filePath =
"Em-call/
VC/ElectricTableViewController
.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"
30
"
endingLineNumber =
"
30
"
landmarkName =
"
application(_:didFinishLaunchingWithOptions
:)"
startingLineNumber =
"
118
"
endingLineNumber =
"
118
"
landmarkName =
"
delegateClick(text
:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
...
...
Em-call/Assets.xcassets/ico_handyman.imageset/Contents.json
0 → 100644
View file @
04d75659
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"ico_handyman.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Em-call/Assets.xcassets/ico_handyman.imageset/ico_handyman.png
0 → 100644
View file @
04d75659
2.17 KB
Em-call/Assets.xcassets/ico_lampa.imageset/Contents.json
0 → 100644
View file @
04d75659
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"ico_lampa.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Em-call/Assets.xcassets/ico_lampa.imageset/ico_lampa.png
0 → 100644
View file @
04d75659
2.32 KB
Em-call/Assets.xcassets/ico_loc_up.imageset/Contents.json
0 → 100644
View file @
04d75659
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"ico_loc_up.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Em-call/Assets.xcassets/ico_loc_up.imageset/ico_loc_up.png
0 → 100644
View file @
04d75659
1.94 KB
Em-call/Assets.xcassets/ico_plumber.imageset/Contents.json
0 → 100644
View file @
04d75659
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"ico_plumber.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Em-call/Assets.xcassets/ico_plumber.imageset/ico_plumber.png
0 → 100644
View file @
04d75659
2.25 KB
Em-call/Base.lproj/Main.storyboard
View file @
04d75659
This diff is collapsed.
Click to expand it.
Em-call/
VC
/Artwork.swift
→
Em-call/
Data
/Artwork.swift
View file @
04d75659
File moved
Em-call/
VC
/ArtworkViews.swift
→
Em-call/
Data
/ArtworkViews.swift
View file @
04d75659
...
...
@@ -8,7 +8,8 @@
import
Foundation
import
MapKit
class
ArtworkMarkerView
:
MKMarkerAnnotationView
{
class
ArtworkMarkerView
:
MKMarkerAnnotationView
{
override
var
annotation
:
MKAnnotation
?
{
willSet
{
// 1
...
...
@@ -18,7 +19,6 @@ class ArtworkMarkerView: MKMarkerAnnotationView {
canShowCallout
=
true
calloutOffset
=
CGPoint
(
x
:
-
5
,
y
:
5
)
rightCalloutAccessoryView
=
UIButton
(
type
:
.
detailDisclosure
)
// 2
markerTintColor
=
artwork
.
markerTintColor
glyphImage
=
artwork
.
image
...
...
Em-call/Data/LocationMng.swift
0 → 100644
View file @
04d75659
//
// LocationMng.swift
// Em-call
//
// Created by Alex Sh on 22.02.2022.
//
import
Foundation
import
UIKit
import
MapKit
class
LocationMng
:
NSObject
,
CLLocationManagerDelegate
{
// var mapView: MKMapView? = nil
// synthesized mapView
var
showAlert
:
ShowAlert
=
ShowAlert
()
let
locationManager
=
CLLocationManager
()
/*convenience init( map_View: MKMapView) {
self.init()
mapView = map_View
}*/
/* convenience init() {
self.init()
// mapView = mainView.mapView
}*/
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.
showAlert
.
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
:
showAlert
.
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
@unknown
default
:
print
(
"Error authorizationStatus"
)
}
}
private
func
locationManager
(
manager
:
CLLocationManager
,
didChangeAuthorizationStatus
status
:
CLAuthorizationStatus
)
{
// 3
if
status
==
.
authorizedWhenInUse
{
// 4
locationManager
.
startUpdatingLocation
()
//5
// mapView.myLocationEnabled = true // mapView.settings.myLocationButton = true
}
}
}
Em-call/Data/ShowAlert.swift
0 → 100644
View file @
04d75659
//
// ShowAlert.swift
// Em-call
//
// Created by Alex Sh on 22.02.2022.
//
import
Foundation
import
UIKit
class
ShowAlert
:
UIViewController
{
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
{
// if #available(iOS 10.0, *) {
UIApplication
.
shared
.
open
(
url
,
options
:
[:],
completionHandler
:
nil
)
/* } else {
// Fallback on earlier versions
}*/
}
}
alert
.
addAction
(
cancelAction
)
alert
.
addAction
(
settingsAction
)
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
}
func
showAlertSample
(
title
:
String
,
message
:
String
?)
{
DispatchQueue
.
main
.
async
{
// self.showAlert.showAlertSample(title: "Warning",message: "Enter new contact does not match Retry new contact")
let
alert
=
UIAlertController
(
title
:
title
,
message
:
message
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
nil
))
self
.
present
(
alert
,
animated
:
true
)
}
// let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
/* alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in
switch action.style{
case .default:
print("default")
case .cancel:
print("cancel")
case .destructive:
print("destructive")
@unknown default:
fatalError("Fatal error")
}
}))*/
// let okAction = UIAlertAction(title: "OK", style: .default,handler:nil)
// alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))
// alert.addAction(okAction)
// self.present(alert, animated: true, completion: nil)
}
}
Em-call/
VC
/Track.swift
→
Em-call/
Data
/Track.swift
View file @
04d75659
File moved
Em-call/EnterVC/ChangePswViewController.swift
0 → 100644
View file @
04d75659
//
// ChangePswViewController.swift
// Em-call
//
// Created by Alex Sh on 22.02.2022.
//
import
UIKit
class
ChangePswViewController
:
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.
}
*/
}
Em-call/EnterVC/RegistrationViewController.swift
0 → 100644
View file @
04d75659
//
// RegistrationViewController.swift
// Em-call
//
// Created by Alex Sh on 22.02.2022.
//
import
UIKit
class
RegistrationViewController
:
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.
}
*/
}
Em-call/VC/CalendarViewController.swift
View file @
04d75659
...
...
@@ -7,8 +7,97 @@
import
UIKit
class
CalendarViewController
:
UIViewController
{
protocol
CalendarViewControllerDelegate
:
class
{
func
calendarDelegateClick
(
text
:
String
,
flagData
:
Int
)
}
class
CalendarViewController
:
UIViewController
{
var
showAlert
:
ShowAlert
=
ShowAlert
()
@IBOutlet
weak
var
dateAndTimePicker
:
UIDatePicker
!
@IBOutlet
weak
var
retryNewContact
:
UITextField
!
weak
var
delegate
:
CalendarViewControllerDelegate
?
@IBOutlet
weak
var
retryNewCard
:
UITextField
!
@IBOutlet
weak
var
enterNewCard
:
UITextField
!
@IBOutlet
weak
var
enterNewContact
:
UITextField
!
@IBAction
func
saveDateTime
(
_
sender
:
Any
)
{
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
dateStyle
=
DateFormatter
.
Style
.
short
dateFormatter
.
timeStyle
=
DateFormatter
.
Style
.
short
let
strDate
=
dateFormatter
.
string
(
from
:
dateAndTimePicker
.
date
)
// dateLabel.text = strDate
/* let components = dateAndTimePicker.calendar.dateComponents([.month, .day, .year, .hour, .minute], from: selectedDate)
let day = components.day let month = components.month
let year = components.year let hour = components.hour
let minute = components.minute
let textDateTime:String = String(describing:year) + "/" +
String(describing:month) + "/" + String(describing:day) + " " +
String(describing:hour) + ":" + String(describing:minute) */
// self.delegate?.calendarDelegateClick(text: textDateTime,flagData:0)
self
.
delegate
?
.
calendarDelegateClick
(
text
:
strDate
,
flagData
:
0
)
_
=
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
@IBAction
func
saveContact
(
_
sender
:
Any
)
{
//var contact:String
if
retryNewContact
.
text
==
""
||
enterNewContact
.
text
==
""
{
DispatchQueue
.
main
.
async
{
let
alert
=
UIAlertController
(
title
:
"Warning"
,
message
:
"<Enter new contact> or <Retry new contact> is empty"
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
nil
))
self
.
present
(
alert
,
animated
:
true
)
}
_
=
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
return
}
if
retryNewContact
.
text
==
enterNewContact
.
text
{
let
contact
=
enterNewContact
.
text
??
" "
self
.
delegate
?
.
calendarDelegateClick
(
text
:
contact
,
flagData
:
1
)
_
=
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
else
{
DispatchQueue
.
main
.
async
{
// self.showAlert.showAlertSample(title: "Warning",message: "Enter new contact does not match Retry new contact")
let
alert
=
UIAlertController
(
title
:
"Warning"
,
message
:
"<Enter new contact> does not match <Retry new contact>"
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
nil
))
self
.
present
(
alert
,
animated
:
true
)
}
// self.showAlert.showAlertSample(title: "Warning",message: "Enter new contact does not match Retry new contact")
}
}
@IBAction
func
saveCard
(
_
sender
:
Any
)
{
if
retryNewCard
.
text
==
""
||
enterNewCard
.
text
==
""
{
DispatchQueue
.
main
.
async
{
let
alert
=
UIAlertController
(
title
:
"Warning"
,
message
:
"<Enter new card> or <Retry new card> is empty"
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
nil
))
self
.
present
(
alert
,
animated
:
true
)
}
_
=
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
return
}
if
retryNewCard
.
text
==
enterNewCard
.
text
{
let
card
=
enterNewCard
.
text
??
" "
self
.
delegate
?
.
calendarDelegateClick
(
text
:
card
,
flagData
:
2
)
_
=
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
else
{
DispatchQueue
.
main
.
async
{
let
alert
=
UIAlertController
(
title
:
"Warning"
,
message
:
"<Enter new card> does not match <Retry new card>"
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
nil
))
self
.
present
(
alert
,
animated
:
true
)
}
}
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
Em-call/VC/ElectricTableViewController.swift
View file @
04d75659
...
...
@@ -11,19 +11,19 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
{
let
trackList
=
Track
.
getTrackList
()
let
cellReuseIdentifier
=
"cell"
var
address
=
"Unknow address"
var
dateAndTime
=
"2022/02/23"
var
contact
=
"+1 123 112 11 22"
var
card
=
"**** **** **** 1234"
// 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
// 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
.
delegate
=
self
tableView
.
dataSource
=
self
}
...
...
@@ -45,23 +45,44 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
}
*/
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
// #warning Incomplete implementation, return the number of rows
return
trackList
.
count
switch
section
{
case
0
:
return
1
case
1
:
return
1
case
2
:
return
1
case
3
:
return
1
default
:
return
1
}
}
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
4
}
func
tableView
(
_
tableView
:
UITableView
,
titleForHeaderInSection
section
:
Int
)
->
String
?
{
// let rets:String? = mainTable.tableView(tableView, titleForHeaderInSection: section)
// return rets!
switch
section
{
case
0
:
return
(
"Work location"
)
case
1
:
return
(
"Date and Time"
)
case
2
:
return
(
"Your contacts"
)
case
3
:
return
(
"Payment"
)
default
:
return
(
"Work location"
)
}
// return ("Work location")
}
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
]
c
ell
.
textLabel
?
.
text
=
track
.
song
cell
.
detailTextLabel
?
.
text
=
track
.
artis
t
c
ell
.
accessoryType
=
UITableViewCell
.
AccessoryType
.
disclosureIndicator
// content.image = UIImage(named: track.title)
// content.imageProperties.cornerRadius = tableView.rowHeight / 2
return
cell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
cellReuseIdentifier
,
for
:
indexPath
)
//let track = trackList[indexPath.row]
let
section
=
indexPath
.
section
switch
section
{
case
0
:
cell
.
textLabel
?
.
text
=
address
c
ase
1
:
cell
.
textLabel
?
.
text
=
dateAndTime
case
2
:
cell
.
textLabel
?
.
text
=
contac
t
c
ase
3
:
cell
.
textLabel
?
.
text
=
card
default
:
break
}
cell
.
accessoryType
=
UITableViewCell
.
AccessoryType
.
disclosureIndicator
return
cell
}
// method to run when table view cell is tapped
...
...
@@ -69,43 +90,53 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
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
let
section
=
indexPath
.
section
var
vc
:
UIViewController
switch
section
//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
])
}
case
0
:
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
0
])
(
vc
as!
MapViewController
)
.
delegate
=
self
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
1
:
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
1
])
(
vc
as!
CalendarViewController
)
.
delegate
=
self
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
])
}
return
case
2
:
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
1
])
(
vc
as!
CalendarViewController
)
.
delegate
=
self
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
])
}
case
3
:
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
1
])
(
vc
as!
CalendarViewController
)
.
delegate
=
self
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
default
:
return
}
}
}
extension
ElectricTableViewController
:
MapViewControllerDelegate
{
func
delegateClick
(
text
:
String
)
{
address
=
text
// NotificationCenter.default.post(name: NSNotification.Name(rawValue: "delegateClick"), object: nil)
tableView
.
reloadData
()
}
}
extension
ElectricTableViewController
:
CalendarViewControllerDelegate
{
func
calendarDelegateClick
(
text
:
String
,
flagData
:
Int
)
{
switch
flagData
{
case
0
:
dateAndTime
=
text
case
1
:
contact
=
text
case
2
:
card
=
text
default
:
return
break
}
}
tableView
.
reloadData
()
}
}
// MARK: - Navigation
/*
// In a storyboard-based application, you will often want to do a little preparation before navigation
...
...
@@ -145,7 +176,7 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
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
}
}
}
*/
...
...
@@ -174,4 +205,4 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
}
*/
}
Em-call/VC/EmerElecricianViewController.swift
View file @
04d75659
...
...
@@ -11,6 +11,9 @@ class EmerElecricianViewController: UIViewController, UITableViewDataSource,
UITableViewDelegate
{
@IBAction
func
butBackClick
(
_
sender
:
Any
)
{
_
=
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
@IBOutlet
weak
var
tableView
:
UITableView
!
let
trackList
=
Track
.
getTrackList
()
...
...
Em-call/VC/EmerHandViewController.swift
View file @
04d75659
...
...
@@ -31,8 +31,25 @@ class EmerHandViewController: UIViewController, UITableViewDataSource,
}
else
{
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"BookingVK"
)
}
// navigationController?.isNavigationBarHidden = true
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
//
@IBAction
func
butBackClick
(
_
sender
:
Any
)
{
_
=
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
/* let storyboard = UIStoryboard(name: "Main", bundle: nil)
weak var vc:UIViewController?
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "ChildMainVC") as! VKBookingViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "ChildMainVC")
// if vc != nil {
// }
navigationController?.pushViewController(vc!, animated: true)
}*/
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
trackList
.
count
...
...
Em-call/VC/HandmanViewController.swift
View file @
04d75659
...
...
@@ -7,24 +7,32 @@
import
UIKit
class
HandmanViewController
:
UIViewController
,
UITableViewDataSource
,
UITableViewDelegate
UITableViewDelegate
//, MapViewControllerDelegate, CalendarViewControllerDelegate
{
@IBOutlet
weak
var
tableView
:
UITableView
!
let
trackList
=
Track
.
getTrackList
()
@IBOutlet
weak
var
addr
:
UILabel
!
//let trackList = Track.getTrackList()
let
cellReuseIdentifier
=
"cell"
var
address
=
"Unknow address"
var
dateAndTime
=
"2022/02/23"
var
contact
=
"+1 123 112 11 22"
var
card
=
"**** **** **** 1234"
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
...
...
@@ -35,67 +43,121 @@ class HandmanViewController: UIViewController, UITableViewDataSource,
}
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
trackList
.
count
return
1
}
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
1
:
return
(
"Date and Time"
)
case
2
:
return
(
"Your contacts"
)
case
3
:
return
(
"Payment"
)
default
:
return
(
"Work location"
)
}
// return ("Work location")
}
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
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
cellReuseIdentifier
,
for
:
indexPath
)
//let track = trackList[indexPath.row]
let
section
=
indexPath
.
section
switch
section
{
case
0
:
cell
.
textLabel
?
.
text
=
address
case
1
:
cell
.
textLabel
?
.
text
=
dateAndTime
case
2
:
cell
.
textLabel
?
.
text
=
contact
case
3
:
cell
.
textLabel
?
.
text
=
card
default
:
break
}
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
let
section
=
indexPath
.
section
var
vc
:
UIViewController
switch
section
//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
)
/* if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[0]) as! MapViewController
} else {*/
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
0
])
// } // (vc as! MapViewController).delegate = self
// if vc != nil {
(
vc
as!
MapViewController
)
.
delegate
=
self
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
// }
return
case
1
:
if
#available(iOS 13.0, *)
{
vc
=
storyboard
.
instantiateViewController
(
identifier
:
nameXibName
[
indexPath
.
row
])
as!
CalendarViewController
}
else
{
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
indexPath
.
row
])
}
/* if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {*/
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
1
])
// }
(
vc
as!
CalendarViewController
)
.
delegate
=
self
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
])
}
return
case
2
:
/* if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {*/
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
1
])
// }
(
vc
as!
CalendarViewController
)
.
delegate
=
self
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
])
}
case
3
:
/* if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: nameXibName[1]) as! CalendarViewController
} else {*/
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
1
])
// }
(
vc
as!
CalendarViewController
)
.
delegate
=
self
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
default
:
return
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.
}
*/
}
/*
// 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
HandmanViewController
:
MapViewControllerDelegate
{
func
delegateClick
(
text
:
String
)
{
address
=
text
// NotificationCenter.default.post(name: NSNotification.Name(rawValue: "delegateClick"), object: nil)
tableView
.
reloadData
()
}
}
extension
HandmanViewController
:
CalendarViewControllerDelegate
{
func
calendarDelegateClick
(
text
:
String
,
flagData
:
Int
)
{
switch
flagData
{
case
0
:
dateAndTime
=
text
case
1
:
contact
=
text
case
2
:
card
=
text
default
:
break
}
tableView
.
reloadData
()
}
}
Em-call/VC/MainViewController.swift
View file @
04d75659
...
...
@@ -9,142 +9,193 @@ import UIKit
import
MapKit
class
MainViewController
:
UIViewController
,
CLLocationManagerDelegate
{
class
MainViewController
:
UIViewController
,
UITextFieldDelegate
//, CLLocationManagerDelegate
{
@IBOutlet
weak
var
text_Location
:
UITextField
!
var
showAlert
:
ShowAlert
=
ShowAlert
()
@IBOutlet
weak
var
mapView
:
MKMapView
!
let
locationManager
=
CLLocationManager
()
//let locationManager = LocationMng(mainView:self)
let
locationManager
=
LocationMng
()
// var detailsController:MainChildViewController?
@IBOutlet
weak
var
buttonEmerElectric
:
UIButton
!
@IBOutlet
weak
var
buttonLockUp
:
UIButton
!
@IBOutlet
weak
var
buttonEmergency
:
UIButton
!
@IBOutlet
weak
var
buttonEmerHandman
:
UIButton
!
@IBOutlet
weak
var
buttonEmerPlumber
:
UIButton
!
@IBAction
func
pressEmerHandman
(
_
sender
:
Any
)
{
}
@IBAction
func
pressEmerPlumber
(
_
sender
:
Any
)
{
}
@IBAction
func
pressEmerElectric
(
_
sender
:
Any
)
{
}
@IBAction
func
pressEmergency
(
_
sender
:
Any
)
{
buttonLockUp
.
isHidden
=
false
buttonEmerElectric
.
isHidden
=
false
buttonEmerPlumber
.
isHidden
=
false
buttonEmerHandman
.
isHidden
=
false
buttonEmergency
.
isHidden
=
false
//self.View = UIView()
self
.
view
.
isOpaque
=
false
// сообщаем системе что myView будет иметь полупрозрачные нарисованные элементы
self
.
view
.
alpha
=
0.7
// прозрачность всего UIView
/* 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)
let
pressCoordinate
=
mapView
.
convert
(
pressPoint
,
toCoordinateFrom
:
mapView
)
let
myposannot
=
MKPointAnnotation
()
myposannot
.
coordinate
=
pressCoordinate
myposannot
.
title
=
"My place"
myposannot
.
subtitle
=
"I am here!"
mapView
.
addAnnotation
(
myposannot
)
let
getLat
:
CLLocationDegrees
=
pressCoordinate
.
latitude
let
getLon
:
CLLocationDegrees
=
pressCoordinate
.
longitude
let
locationTouch
:
CLLocation
=
CLLocation
(
latitude
:
getLat
,
longitude
:
getLon
)
coordinateToAdress
(
locationTouch
)
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
// Set initial location in Honolulu
//London coordinates
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()
buttonEmergency
.
isHidden
=
false
buttonLockUp
.
isHidden
=
true
buttonEmerElectric
.
isHidden
=
true
buttonEmerPlumber
.
isHidden
=
true
buttonEmerHandman
.
isHidden
=
true
text_Location
.
delegate
=
self
/*
let annotations = MKPointAnnotation()
annotations.title = "Set my location"
annotations.coordinate = CLLocationCoordinate2D(latitude:
51.509865, longitude: -0.118092)
mapView
.
addAnnotation
(
annotations
)
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
)
}
locationManager
.
checkLocationEnable
()
buttonEmergency
.
isHidden
=
false
buttonLockUp
.
isHidden
=
true
buttonEmerElectric
.
isHidden
=
true
buttonEmerPlumber
.
isHidden
=
true
buttonEmerHandman
.
isHidden
=
true
// let detailsController:MainChildViewController
/* if detailsController != nil {
self.detailsController!.removeFromParent()
}
alert
.
addAction
(
cancelAction
)
alert
.
addAction
(
settingsAction
)
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
else {
// if detailsController != nil {
return
}*/
}
/* 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.
func
textFieldShouldReturn
(
_
textField
:
UITextField
)
->
Bool
{
text_Location
.
resignFirstResponder
()
}
*/
}
func
mapView
(
mapViewAnnot
:
MKMapView
!
,
ViewForAnnotation
annotation
:
MKAnnotation
!
)
->
MKAnnotationView
{
let
reuseId
=
"pin"
extension
MainViewController
{
// 2
func
locationManager
(
manager
:
CLLocationManager
,
didChangeAuthorizationStatus
status
:
CLAuthorizationStatus
)
{
// 3
if
status
==
.
authorizedWhenInUse
{
var
pinView
=
mapView
.
dequeueReusableAnnotationView
(
withIdentifier
:
reuseId
)
as?
MKPinAnnotationView
// 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
()
if
(
pinView
==
nil
){
pinView
=
MKPinAnnotationView
(
annotation
:
annotation
,
reuseIdentifier
:
reuseId
)
pinView
!.
canShowCallout
=
true
pinView
!.
animatesDrop
=
true
pinView
!.
pinTintColor
=
.
red
}
else
{
pinView
!.
annotation
=
annotation
}
return
pinView
!
}
// Преобразуем координаты в Адрес
func
coordinateToAdress
(
_
locations
:
CLLocation
)
{
CLGeocoder
()
.
reverseGeocodeLocation
(
locations
/*.last!*/
)
{
(
placemarks
,
error
)
in
// Детализированная информация по точке
var
placemark
:
CLPlacemark
!
if
let
placemarks
=
placemarks
{
placemark
=
placemarks
[
0
]
}
// Словарь адресов // print(placemark.addressDictionary!)
// Вытаскиваем атрибуты адреса
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
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
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()
}*/
//)
}
}
}
}
private
extension
MKMapView
{
func
centerToLocation
(
_
location
:
CLLocation
,
...
...
@@ -157,3 +208,5 @@ private extension MKMapView {
setRegion
(
coordinateRegion
,
animated
:
true
)
}
}
Em-call/VC/MapViewController.swift
View file @
04d75659
...
...
@@ -6,16 +6,112 @@
//
import
UIKit
import
MapKit
class
MapViewController
:
UIViewController
{
protocol
MapViewControllerDelegate
:
class
{
func
delegateClick
(
text
:
String
)
}
class
MapViewController
:
UIViewController
{
@IBOutlet
weak
var
addressLocation
:
UITextField
!
@IBAction
func
pressSavePosition
(
_
sender
:
Any
)
{
let
textAddress
=
addressLocation
.
text
??
" "
self
.
delegate
?
.
delegateClick
(
text
:
textAddress
)
_
=
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
weak
var
delegate
:
MapViewControllerDelegate
?
var
showAlert
:
ShowAlert
=
ShowAlert
()
@IBOutlet
weak
var
mapView
:
MKMapView
!
let
locationManager
=
LocationMng
()
@IBOutlet
weak
var
textLocation
:
UITextField
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
let
initialLocation
=
CLLocation
(
latitude
:
51.509865
,
longitude
:
-
0.118092
)
mapView
.
centerToLocation
(
initialLocation
)
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
)
locationManager
.
checkLocationEnable
()
}
@IBAction
func
longPress
(
_
sender
:
Any
)
{
let
pressPoint
=
(
sender
as
AnyObject
)
.
location
(
in
:
mapView
)
// let pressCoordinate = mapView.convert(pressPoint, to: mapView)
let
pressCoordinate
=
mapView
.
convert
(
pressPoint
,
toCoordinateFrom
:
mapView
)
let
myposannot
=
MKPointAnnotation
()
myposannot
.
coordinate
=
pressCoordinate
myposannot
.
title
=
"My place"
myposannot
.
subtitle
=
"I am here!"
mapView
.
addAnnotation
(
myposannot
)
let
getLat
:
CLLocationDegrees
=
pressCoordinate
.
latitude
let
getLon
:
CLLocationDegrees
=
pressCoordinate
.
longitude
let
locationTouch
:
CLLocation
=
CLLocation
(
latitude
:
getLat
,
longitude
:
getLon
)
coordinateToAdress
(
locationTouch
)
// Do any additional setup after loading the view.
}
func
mapView
(
mapViewAnnot
:
MKMapView
!
,
ViewForAnnotation
annotation
:
MKAnnotation
!
)
->
MKAnnotationView
{
let
reuseId
=
"pin"
var
pinView
=
mapView
.
dequeueReusableAnnotationView
(
withIdentifier
:
reuseId
)
as?
MKPinAnnotationView
if
(
pinView
==
nil
){
pinView
=
MKPinAnnotationView
(
annotation
:
annotation
,
reuseIdentifier
:
reuseId
)
pinView
!.
canShowCallout
=
true
pinView
!.
animatesDrop
=
true
pinView
!.
pinTintColor
=
.
red
}
else
{
pinView
!.
annotation
=
annotation
}
return
pinView
!
}
// Преобразуем координаты в Адрес
func
coordinateToAdress
(
_
locations
:
CLLocation
)
{
CLGeocoder
()
.
reverseGeocodeLocation
(
locations
/*.last!*/
)
{
(
placemarks
,
error
)
in
// Детализированная информация по точке
var
placemark
:
CLPlacemark
!
if
let
placemarks
=
placemarks
{
placemark
=
placemarks
[
0
]
}
// Словарь адресов //
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
}
guard
let
street
=
placemark
.
addressDictionary
!
[
"Street"
]
as?
String
else
{
return
// print(street)
}
guard
let
subLocality
=
placemark
.
addressDictionary
!
[
"SubLocality"
]
as?
String
else
{
return
// print(subLocality)
}
self
.
textLocation
.
text
=
city
+
" , "
+
street
+
" , "
+
subLocality
}
}
/*
// MARK: - Navigation
...
...
@@ -26,4 +122,17 @@ class MapViewController: UIViewController {
}
*/
}
private
extension
MKMapView
{
func
centerToLocation
(
_
location
:
CLLocation
,
regionRadius
:
CLLocationDistance
=
1000
)
{
let
coordinateRegion
=
MKCoordinateRegion
(
center
:
location
.
coordinate
,
latitudinalMeters
:
regionRadius
,
longitudinalMeters
:
regionRadius
)
setRegion
(
coordinateRegion
,
animated
:
true
)
}
}
Em-call/VC/PlumViewController.swift
View file @
04d75659
...
...
@@ -11,39 +11,19 @@ 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.
}
...
...
@@ -54,9 +34,7 @@ class PlumViewController: UIViewController, UITableViewDataSource,
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
)
}
...
...
@@ -69,17 +47,7 @@ class PlumViewController: UIViewController, UITableViewDataSource,
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
...
...
@@ -121,33 +89,6 @@ class PlumViewController: UIViewController, UITableViewDataSource,
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.
}
*/
}
Em-call/VC/PlumbersViewController.swift
View file @
04d75659
...
...
@@ -11,7 +11,11 @@ class PlumbersViewController: UIViewController,UITableViewDataSource, UITableVie
let
trackList
=
Track
.
getTrackList
()
let
cellReuseIdentifier
=
"cell"
var
address
=
"Unknow address"
var
dateAndTime
=
"2022/02/23"
var
contact
=
"+1 123 112 11 22"
var
card
=
"**** **** **** 1234"
@IBOutlet
weak
var
tableView
:
UITableView
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -19,8 +23,6 @@ class PlumbersViewController: UIViewController,UITableViewDataSource, UITableVie
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
}
...
...
@@ -36,70 +38,85 @@ class PlumbersViewController: UIViewController,UITableViewDataSource, UITableVie
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
trackList
.
count
return
1
}
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
4
}
func
tableView
(
_
tableView
:
UITableView
,
titleForHeaderInSection
section
:
Int
)
->
String
?
{
switch
section
{
case
0
:
return
(
"Work location"
)
case
1
:
return
(
"Date and Time"
)
case
2
:
return
(
"Your contacts"
)
case
3
:
return
(
"Payment"
)
default
:
return
(
"Work location"
)
}
// return ("Work location")
}
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
//let track = trackList[indexPath.row]
let
section
=
indexPath
.
section
switch
section
{
case
0
:
cell
.
textLabel
?
.
text
=
address
case
1
:
cell
.
textLabel
?
.
text
=
dateAndTime
case
2
:
cell
.
textLabel
?
.
text
=
contact
case
3
:
cell
.
textLabel
?
.
text
=
card
default
:
break
}
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
let
section
=
indexPath
.
section
var
vc
:
UIViewController
switch
section
//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"
)
}
case
0
:
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
0
])
(
vc
as!
MapViewController
)
.
delegate
=
self
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
1
:
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
1
])
(
vc
as!
CalendarViewController
)
.
delegate
=
self
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"
)
}
return
case
2
:
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
1
])
(
vc
as!
CalendarViewController
)
.
delegate
=
self
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"
)
}
case
3
:
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
nameXibName
[
1
])
(
vc
as!
CalendarViewController
)
.
delegate
=
self
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
default
:
return
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.
extension
PlumbersViewController
:
MapViewControllerDelegate
{
func
delegateClick
(
text
:
String
)
{
address
=
text
// NotificationCenter.default.post(name: NSNotification.Name(rawValue: "delegateClick"), object: nil)
tableView
.
reloadData
()
}
*/
}
extension
PlumbersViewController
:
CalendarViewControllerDelegate
{
func
calendarDelegateClick
(
text
:
String
,
flagData
:
Int
)
{
switch
flagData
{
case
0
:
dateAndTime
=
text
case
1
:
contact
=
text
case
2
:
card
=
text
default
:
break
}
tableView
.
reloadData
()
}
}
Em-call/ViewController.swift
deleted
100644 → 0
View file @
aa643673
//
// ViewController.swift
// Em-call
//
// Created by Alex Sh on 13.02.2022.
//
import
UIKit
class
ViewController
:
UIViewController
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
// Do any additional setup after loading the view.
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment