From 4df15702b3ba963a03a817385282f28acbe79f59 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Tue, 25 Feb 2020 00:11:46 +0300 Subject: [PATCH] Added app icon (temporary) added viewer controller for vehicle photos added logout functionality --- AutoCat.xcodeproj/project.pbxproj | 8 ++ .../xcdebugger/Breakpoints_v2.xcbkptlist | 16 --- AutoCat/Base.lproj/Main.storyboard | 43 ++++++-- AutoCat/Cells/SectionHeader.swift | 6 + AutoCat/Cells/SectionHeader.xib | 5 +- AutoCat/Cells/VehiclePhotoCell.swift | 12 ++ AutoCat/Controllers/AuthController.swift | 17 +++ AutoCat/Controllers/CheckController.swift | 2 +- AutoCat/Controllers/ReportController.swift | 103 ++++++++++++++++-- AutoCat/Controllers/SettingsController.swift | 16 +++ AutoCat/Info.plist | 20 ++++ AutoCat/Models/User.swift | 2 +- AutoCat/Models/Vehicle.swift | 61 ++++++++++- AutoCat/Utils/Api.swift | 5 +- Cartfile | 1 + Cartfile.resolved | 1 + input.xcfilelist | 1 + output.xcfilelist | 1 + 18 files changed, 278 insertions(+), 42 deletions(-) create mode 100644 AutoCat/Controllers/SettingsController.swift diff --git a/AutoCat.xcodeproj/project.pbxproj b/AutoCat.xcodeproj/project.pbxproj index 59dc222..7518af0 100644 --- a/AutoCat.xcodeproj/project.pbxproj +++ b/AutoCat.xcodeproj/project.pbxproj @@ -39,6 +39,8 @@ 7A7547DD2403180A004E8406 /* SectionHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A7547DB2403180A004E8406 /* SectionHeader.swift */; }; 7A7547DE2403180A004E8406 /* SectionHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7A7547DC2403180A004E8406 /* SectionHeader.xib */; }; 7A7547E024032CB6004E8406 /* VehiclePhotoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A7547DF24032CB6004E8406 /* VehiclePhotoCell.swift */; }; + 7A92D0AC240425B200EF3B77 /* ATGMediaBrowser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A92D0AB240425B100EF3B77 /* ATGMediaBrowser.framework */; }; + 7AEFE728240455E200910EB7 /* SettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AEFE727240455E200910EB7 /* SettingsController.swift */; }; 7AF58D2F24029C5200CE01A0 /* MagazineLayout in Frameworks */ = {isa = PBXBuildFile; productRef = 7AF58D2E24029C5200CE01A0 /* MagazineLayout */; }; 7AF58D3124029E1000CE01A0 /* VehicleHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AF58D3024029E1000CE01A0 /* VehicleHeaderCell.swift */; }; 7AF58D342402A91C00CE01A0 /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 7AF58D332402A91C00CE01A0 /* Kingfisher */; }; @@ -71,6 +73,8 @@ 7A7547DB2403180A004E8406 /* SectionHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SectionHeader.swift; sourceTree = ""; }; 7A7547DC2403180A004E8406 /* SectionHeader.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SectionHeader.xib; sourceTree = ""; }; 7A7547DF24032CB6004E8406 /* VehiclePhotoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VehiclePhotoCell.swift; sourceTree = ""; }; + 7A92D0AB240425B100EF3B77 /* ATGMediaBrowser.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ATGMediaBrowser.framework; path = Carthage/Build/iOS/ATGMediaBrowser.framework; sourceTree = ""; }; + 7AEFE727240455E200910EB7 /* SettingsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsController.swift; sourceTree = ""; }; 7AF58D3024029E1000CE01A0 /* VehicleHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VehicleHeaderCell.swift; sourceTree = ""; }; 7AF58D57240309CA00CE01A0 /* VehicleTextParamCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VehicleTextParamCell.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -89,6 +93,7 @@ 7A11472B23FEA24D00B424AF /* Action in Frameworks */, 7A11471F23FEA18700B424AF /* RxRelay in Frameworks */, 7AF58D2F24029C5200CE01A0 /* MagazineLayout in Frameworks */, + 7A92D0AC240425B200EF3B77 /* ATGMediaBrowser.framework in Frameworks */, 7A530B78240010D900CBFE6E /* InputMask in Frameworks */, 7A11471D23FEA18700B424AF /* RxSwift in Frameworks */, 7A11472623FEA1F400B424AF /* Realm in Frameworks */, @@ -140,6 +145,7 @@ 7A11471723FDEBFA00B424AF /* ReportController.swift */, 7A11471923FE839000B424AF /* AuthController.swift */, 7A530B7924001D3300CBFE6E /* CheckController.swift */, + 7AEFE727240455E200910EB7 /* SettingsController.swift */, ); path = Controllers; sourceTree = ""; @@ -174,6 +180,7 @@ 7A11474C23FFEE8700B424AF /* Frameworks */ = { isa = PBXGroup; children = ( + 7A92D0AB240425B100EF3B77 /* ATGMediaBrowser.framework */, 7A11474D23FFEE8800B424AF /* SVProgressHUD.framework */, ); name = Frameworks; @@ -323,6 +330,7 @@ 7A530B802401803A00CBFE6E /* Vehicle.swift in Sources */, 7A11470123FDE7E500B424AF /* AppDelegate.swift in Sources */, 7A530B86240180CC00CBFE6E /* RealmBindObserver.swift in Sources */, + 7AEFE728240455E200910EB7 /* SettingsController.swift in Sources */, 7A11474923FF2B2D00B424AF /* Response.swift in Sources */, 7A11471823FDEBFA00B424AF /* ReportController.swift in Sources */, 7A11471A23FE839000B424AF /* AuthController.swift in Sources */, diff --git a/AutoCat.xcodeproj/xcuserdata/selim.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/AutoCat.xcodeproj/xcuserdata/selim.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 86a6745..07e3a91 100644 --- a/AutoCat.xcodeproj/xcuserdata/selim.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/AutoCat.xcodeproj/xcuserdata/selim.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -24,21 +24,5 @@ stopOnStyle = "0"> - - - - diff --git a/AutoCat/Base.lproj/Main.storyboard b/AutoCat/Base.lproj/Main.storyboard index 30198de..beaaabe 100644 --- a/AutoCat/Base.lproj/Main.storyboard +++ b/AutoCat/Base.lproj/Main.storyboard @@ -18,7 +18,7 @@ - + @@ -116,38 +116,39 @@ - + - - + - + - + + @@ -199,18 +200,35 @@ - + + + + + + + + + - + @@ -424,6 +442,7 @@ + diff --git a/AutoCat/Cells/SectionHeader.swift b/AutoCat/Cells/SectionHeader.swift index 82bf5e7..ce90577 100644 --- a/AutoCat/Cells/SectionHeader.swift +++ b/AutoCat/Cells/SectionHeader.swift @@ -3,10 +3,16 @@ import MagazineLayout class SectionHeader: MagazineLayoutCollectionReusableView { @IBOutlet weak var title: UILabel! + @IBOutlet weak var divider: UIView! @IBOutlet weak var dividerHeightConstraint: NSLayoutConstraint! override func awakeFromNib() { super.awakeFromNib() self.dividerHeightConstraint.constant = 1/UIScreen.main.scale } + + func configure(with section: ReportSection) { + self.title.text = section.description + self.divider.isHidden = section == .photos + } } diff --git a/AutoCat/Cells/SectionHeader.xib b/AutoCat/Cells/SectionHeader.xib index 155abe0..3ea88fb 100644 --- a/AutoCat/Cells/SectionHeader.xib +++ b/AutoCat/Cells/SectionHeader.xib @@ -14,7 +14,7 @@