Viewing images

This commit is contained in:
Selim Mustafaev 2020-12-22 18:41:10 +03:00
parent 7edc63d06f
commit dba29aa2d7
6 changed files with 208 additions and 76 deletions

View File

@ -93,6 +93,20 @@
7AE24C5F251F1B4E00758E39 /* Buttons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE24C5E251F1B4E00758E39 /* Buttons.swift */; }; 7AE24C5F251F1B4E00758E39 /* Buttons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE24C5E251F1B4E00758E39 /* Buttons.swift */; };
7AE26A3324EEF9EC00625033 /* UIViewControllerExt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE26A3224EEF9EC00625033 /* UIViewControllerExt.swift */; }; 7AE26A3324EEF9EC00625033 /* UIViewControllerExt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE26A3224EEF9EC00625033 /* UIViewControllerExt.swift */; };
7AE26A3524F31B0700625033 /* EventsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE26A3424F31B0700625033 /* EventsController.swift */; }; 7AE26A3524F31B0700625033 /* EventsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE26A3424F31B0700625033 /* EventsController.swift */; };
7AE492922591FF5100322D2E /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 7A11471C23FEA18700B424AF /* RxSwift */; };
7AE492932591FF5100322D2E /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = 7A11471E23FEA18700B424AF /* RxRelay */; };
7AE492942591FF5100322D2E /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 7A11472023FEA18700B424AF /* RxCocoa */; };
7AE492952591FF5100322D2E /* RxBlocking in Frameworks */ = {isa = PBXBuildFile; productRef = 7A11472223FEA18700B424AF /* RxBlocking */; };
7AE492962591FF5100322D2E /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 7A11472523FEA1F400B424AF /* Realm */; };
7AE492972591FF5100322D2E /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 7A11472723FEA1F400B424AF /* RealmSwift */; };
7AE492982591FF5100322D2E /* RxRealm in Frameworks */ = {isa = PBXBuildFile; productRef = 7A530B8A240181F500CBFE6E /* RxRealm */; };
7AE492992591FF5100322D2E /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 7AF58D332402A91C00CE01A0 /* Kingfisher */; };
7AE4929A2591FF5100322D2E /* SwiftDate in Frameworks */ = {isa = PBXBuildFile; productRef = 7A051610241412CA00FC55AC /* SwiftDate */; };
7AE4929B2591FF5100322D2E /* ExceptionCatcher in Frameworks */ = {isa = PBXBuildFile; productRef = 7A813DC02508C4D900CC93B9 /* ExceptionCatcher */; };
7AE4929C2591FF5100322D2E /* PKHUD in Frameworks */ = {isa = PBXBuildFile; productRef = 7AABDE1C2532F3EB0041AFC6 /* PKHUD */; };
7AE4929D2591FF5100322D2E /* DifferenceKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7AABDE22253327F10041AFC6 /* DifferenceKit */; };
7AE4929E2591FF5100322D2E /* Eureka in Frameworks */ = {isa = PBXBuildFile; productRef = 7AEF47A3253DC4D2001D6238 /* Eureka */; };
7AE492A1259232F000322D2E /* MultilineLinkRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE492A0259232F000322D2E /* MultilineLinkRow.swift */; };
7AEFC3BE2529D3CC00BADFB2 /* ConfigurableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AEFC3BD2529D3CC00BADFB2 /* ConfigurableCell.swift */; }; 7AEFC3BE2529D3CC00BADFB2 /* ConfigurableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AEFC3BD2529D3CC00BADFB2 /* ConfigurableCell.swift */; };
7AEFE728240455E200910EB7 /* SettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AEFE727240455E200910EB7 /* SettingsController.swift */; }; 7AEFE728240455E200910EB7 /* SettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AEFE727240455E200910EB7 /* SettingsController.swift */; };
7AF12B1D258C9CFF0090F8B8 /* Cloneable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AF12B1C258C9CFF0090F8B8 /* Cloneable.swift */; }; 7AF12B1D258C9CFF0090F8B8 /* Cloneable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AF12B1C258C9CFF0090F8B8 /* Cloneable.swift */; };
@ -196,6 +210,7 @@
7AE24C5E251F1B4E00758E39 /* Buttons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Buttons.swift; sourceTree = "<group>"; }; 7AE24C5E251F1B4E00758E39 /* Buttons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Buttons.swift; sourceTree = "<group>"; };
7AE26A3224EEF9EC00625033 /* UIViewControllerExt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewControllerExt.swift; sourceTree = "<group>"; }; 7AE26A3224EEF9EC00625033 /* UIViewControllerExt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewControllerExt.swift; sourceTree = "<group>"; };
7AE26A3424F31B0700625033 /* EventsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventsController.swift; sourceTree = "<group>"; }; 7AE26A3424F31B0700625033 /* EventsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventsController.swift; sourceTree = "<group>"; };
7AE492A0259232F000322D2E /* MultilineLinkRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultilineLinkRow.swift; sourceTree = "<group>"; };
7AEFC3BD2529D3CC00BADFB2 /* ConfigurableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigurableCell.swift; sourceTree = "<group>"; }; 7AEFC3BD2529D3CC00BADFB2 /* ConfigurableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigurableCell.swift; sourceTree = "<group>"; };
7AEFE727240455E200910EB7 /* SettingsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsController.swift; sourceTree = "<group>"; }; 7AEFE727240455E200910EB7 /* SettingsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsController.swift; sourceTree = "<group>"; };
7AF12B1C258C9CFF0090F8B8 /* Cloneable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cloneable.swift; sourceTree = "<group>"; }; 7AF12B1C258C9CFF0090F8B8 /* Cloneable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cloneable.swift; sourceTree = "<group>"; };
@ -206,7 +221,20 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
7AE492972591FF5100322D2E /* RealmSwift in Frameworks */,
7AE4929B2591FF5100322D2E /* ExceptionCatcher in Frameworks */,
7AE492962591FF5100322D2E /* Realm in Frameworks */,
7AE492922591FF5100322D2E /* RxSwift in Frameworks */,
7AE492952591FF5100322D2E /* RxBlocking in Frameworks */,
7AE4929E2591FF5100322D2E /* Eureka in Frameworks */,
7AE492992591FF5100322D2E /* Kingfisher in Frameworks */,
7A813DBE2506A57100CC93B9 /* AuthenticationServices.framework in Frameworks */, 7A813DBE2506A57100CC93B9 /* AuthenticationServices.framework in Frameworks */,
7AE4929C2591FF5100322D2E /* PKHUD in Frameworks */,
7AE492942591FF5100322D2E /* RxCocoa in Frameworks */,
7AE4929A2591FF5100322D2E /* SwiftDate in Frameworks */,
7AE4929D2591FF5100322D2E /* DifferenceKit in Frameworks */,
7AE492982591FF5100322D2E /* RxRealm in Frameworks */,
7AE492932591FF5100322D2E /* RxRelay in Frameworks */,
7A96AE2F246B2BCD00297C33 /* WebKit.framework in Frameworks */, 7A96AE2F246B2BCD00297C33 /* WebKit.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -237,6 +265,7 @@
children = ( children = (
7A0B969F257D6D4B000B39AD /* MultilineLabelRow.swift */, 7A0B969F257D6D4B000B39AD /* MultilineLabelRow.swift */,
7A2DE69D2589606A00A113FC /* ImageGridRow.swift */, 7A2DE69D2589606A00A113FC /* ImageGridRow.swift */,
7AE492A0259232F000322D2E /* MultilineLinkRow.swift */,
); );
path = eureka; path = eureka;
sourceTree = "<group>"; sourceTree = "<group>";
@ -459,19 +488,19 @@
); );
name = AutoCat; name = AutoCat;
packageProductDependencies = ( packageProductDependencies = (
7A11471C23FEA18700B424AF, 7A11471C23FEA18700B424AF /* RxSwift */,
7A11471E23FEA18700B424AF, 7A11471E23FEA18700B424AF /* RxRelay */,
7A11472023FEA18700B424AF, 7A11472023FEA18700B424AF /* RxCocoa */,
7A11472223FEA18700B424AF, 7A11472223FEA18700B424AF /* RxBlocking */,
7A11472523FEA1F400B424AF, 7A11472523FEA1F400B424AF /* Realm */,
7A11472723FEA1F400B424AF, 7A11472723FEA1F400B424AF /* RealmSwift */,
7A530B8A240181F500CBFE6E, 7A530B8A240181F500CBFE6E /* RxRealm */,
7AF58D332402A91C00CE01A0, 7AF58D332402A91C00CE01A0 /* Kingfisher */,
7A051610241412CA00FC55AC, 7A051610241412CA00FC55AC /* SwiftDate */,
7A813DC02508C4D900CC93B9, 7A813DC02508C4D900CC93B9 /* ExceptionCatcher */,
7AABDE1C2532F3EB0041AFC6, 7AABDE1C2532F3EB0041AFC6 /* PKHUD */,
7AABDE22253327F10041AFC6, 7AABDE22253327F10041AFC6 /* DifferenceKit */,
7AEF47A3253DC4D2001D6238, 7AEF47A3253DC4D2001D6238 /* Eureka */,
); );
productName = AutoCat; productName = AutoCat;
productReference = 7A1146FD23FDE7E500B424AF /* AutoCat.app */; productReference = 7A1146FD23FDE7E500B424AF /* AutoCat.app */;
@ -503,15 +532,15 @@
); );
mainGroup = 7A1146F423FDE7E500B424AF; mainGroup = 7A1146F423FDE7E500B424AF;
packageReferences = ( packageReferences = (
7A11471B23FEA18700B424AF, 7A11471B23FEA18700B424AF /* XCRemoteSwiftPackageReference "RxSwift" */,
7A11472423FEA1F400B424AF, 7A11472423FEA1F400B424AF /* XCRemoteSwiftPackageReference "realm-cocoa" */,
7A530B89240181F500CBFE6E, 7A530B89240181F500CBFE6E /* XCRemoteSwiftPackageReference "RxRealm" */,
7AF58D322402A91C00CE01A0, 7AF58D322402A91C00CE01A0 /* XCRemoteSwiftPackageReference "Kingfisher" */,
7A05160F241412CA00FC55AC, 7A05160F241412CA00FC55AC /* XCRemoteSwiftPackageReference "SwiftDate" */,
7A813DBF2508C4D900CC93B9, 7A813DBF2508C4D900CC93B9 /* XCRemoteSwiftPackageReference "ExceptionCatcher" */,
7AABDE1B2532F3EB0041AFC6, 7AABDE1B2532F3EB0041AFC6 /* XCRemoteSwiftPackageReference "PKHUD" */,
7AABDE21253327F10041AFC6, 7AABDE21253327F10041AFC6 /* XCRemoteSwiftPackageReference "DifferenceKit" */,
7AEF47A2253DC4D2001D6238, 7AEF47A2253DC4D2001D6238 /* XCRemoteSwiftPackageReference "Eureka" */,
); );
productRefGroup = 7A1146FE23FDE7E500B424AF /* Products */; productRefGroup = 7A1146FE23FDE7E500B424AF /* Products */;
projectDirPath = ""; projectDirPath = "";
@ -615,6 +644,7 @@
7ADF6C95250D037700F237B2 /* ShowEventController.swift in Sources */, 7ADF6C95250D037700F237B2 /* ShowEventController.swift in Sources */,
7A27ADC7249D43210035F39E /* RegionsController.swift in Sources */, 7A27ADC7249D43210035F39E /* RegionsController.swift in Sources */,
7A05161A2414FF0900FC55AC /* DateSection.swift in Sources */, 7A05161A2414FF0900FC55AC /* DateSection.swift in Sources */,
7AE492A1259232F000322D2E /* MultilineLinkRow.swift in Sources */,
7A333814249A532400D878F1 /* Filter.swift in Sources */, 7A333814249A532400D878F1 /* Filter.swift in Sources */,
7A11474B23FF368B00B424AF /* Settings.swift in Sources */, 7A11474B23FF368B00B424AF /* Settings.swift in Sources */,
7ADF6C93250B954900F237B2 /* Navigation.swift in Sources */, 7ADF6C93250B954900F237B2 /* Navigation.swift in Sources */,
@ -865,7 +895,7 @@
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */ /* Begin XCRemoteSwiftPackageReference section */
7A05160F241412CA00FC55AC = { 7A05160F241412CA00FC55AC /* XCRemoteSwiftPackageReference "SwiftDate" */ = {
isa = XCRemoteSwiftPackageReference; isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/malcommac/SwiftDate.git"; repositoryURL = "https://github.com/malcommac/SwiftDate.git";
requirement = { requirement = {
@ -873,7 +903,7 @@
minimumVersion = 6.1.0; minimumVersion = 6.1.0;
}; };
}; };
7A11471B23FEA18700B424AF = { 7A11471B23FEA18700B424AF /* XCRemoteSwiftPackageReference "RxSwift" */ = {
isa = XCRemoteSwiftPackageReference; isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/ReactiveX/RxSwift.git"; repositoryURL = "https://github.com/ReactiveX/RxSwift.git";
requirement = { requirement = {
@ -881,7 +911,7 @@
minimumVersion = 5.0.1; minimumVersion = 5.0.1;
}; };
}; };
7A11472423FEA1F400B424AF = { 7A11472423FEA1F400B424AF /* XCRemoteSwiftPackageReference "realm-cocoa" */ = {
isa = XCRemoteSwiftPackageReference; isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/realm/realm-cocoa"; repositoryURL = "https://github.com/realm/realm-cocoa";
requirement = { requirement = {
@ -889,7 +919,7 @@
minimumVersion = 5.0.0; minimumVersion = 5.0.0;
}; };
}; };
7A530B89240181F500CBFE6E = { 7A530B89240181F500CBFE6E /* XCRemoteSwiftPackageReference "RxRealm" */ = {
isa = XCRemoteSwiftPackageReference; isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/RxSwiftCommunity/RxRealm"; repositoryURL = "https://github.com/RxSwiftCommunity/RxRealm";
requirement = { requirement = {
@ -897,7 +927,7 @@
minimumVersion = 3.0.0; minimumVersion = 3.0.0;
}; };
}; };
7A813DBF2508C4D900CC93B9 = { 7A813DBF2508C4D900CC93B9 /* XCRemoteSwiftPackageReference "ExceptionCatcher" */ = {
isa = XCRemoteSwiftPackageReference; isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/sindresorhus/ExceptionCatcher"; repositoryURL = "https://github.com/sindresorhus/ExceptionCatcher";
requirement = { requirement = {
@ -905,7 +935,7 @@
minimumVersion = 1.1.0; minimumVersion = 1.1.0;
}; };
}; };
7AABDE1B2532F3EB0041AFC6 = { 7AABDE1B2532F3EB0041AFC6 /* XCRemoteSwiftPackageReference "PKHUD" */ = {
isa = XCRemoteSwiftPackageReference; isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/pkluz/PKHUD.git"; repositoryURL = "https://github.com/pkluz/PKHUD.git";
requirement = { requirement = {
@ -913,7 +943,7 @@
minimumVersion = 5.4.0; minimumVersion = 5.4.0;
}; };
}; };
7AABDE21253327F10041AFC6 = { 7AABDE21253327F10041AFC6 /* XCRemoteSwiftPackageReference "DifferenceKit" */ = {
isa = XCRemoteSwiftPackageReference; isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/ra1028/DifferenceKit.git"; repositoryURL = "https://github.com/ra1028/DifferenceKit.git";
requirement = { requirement = {
@ -921,7 +951,7 @@
minimumVersion = 1.1.5; minimumVersion = 1.1.5;
}; };
}; };
7AEF47A2253DC4D2001D6238 = { 7AEF47A2253DC4D2001D6238 /* XCRemoteSwiftPackageReference "Eureka" */ = {
isa = XCRemoteSwiftPackageReference; isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/selim-mustafaev/Eureka"; repositoryURL = "https://github.com/selim-mustafaev/Eureka";
requirement = { requirement = {
@ -929,7 +959,7 @@
kind = branch; kind = branch;
}; };
}; };
7AF58D322402A91C00CE01A0 = { 7AF58D322402A91C00CE01A0 /* XCRemoteSwiftPackageReference "Kingfisher" */ = {
isa = XCRemoteSwiftPackageReference; isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/onevcat/Kingfisher"; repositoryURL = "https://github.com/onevcat/Kingfisher";
requirement = { requirement = {
@ -940,69 +970,69 @@
/* End XCRemoteSwiftPackageReference section */ /* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */ /* Begin XCSwiftPackageProductDependency section */
7A051610241412CA00FC55AC = { 7A051610241412CA00FC55AC /* SwiftDate */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7A05160F241412CA00FC55AC; package = 7A05160F241412CA00FC55AC /* XCRemoteSwiftPackageReference "SwiftDate" */;
productName = SwiftDate; productName = SwiftDate;
}; };
7A11471C23FEA18700B424AF = { 7A11471C23FEA18700B424AF /* RxSwift */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7A11471B23FEA18700B424AF; package = 7A11471B23FEA18700B424AF /* XCRemoteSwiftPackageReference "RxSwift" */;
productName = RxSwift; productName = RxSwift;
}; };
7A11471E23FEA18700B424AF = { 7A11471E23FEA18700B424AF /* RxRelay */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7A11471B23FEA18700B424AF; package = 7A11471B23FEA18700B424AF /* XCRemoteSwiftPackageReference "RxSwift" */;
productName = RxRelay; productName = RxRelay;
}; };
7A11472023FEA18700B424AF = { 7A11472023FEA18700B424AF /* RxCocoa */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7A11471B23FEA18700B424AF; package = 7A11471B23FEA18700B424AF /* XCRemoteSwiftPackageReference "RxSwift" */;
productName = RxCocoa; productName = RxCocoa;
}; };
7A11472223FEA18700B424AF = { 7A11472223FEA18700B424AF /* RxBlocking */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7A11471B23FEA18700B424AF; package = 7A11471B23FEA18700B424AF /* XCRemoteSwiftPackageReference "RxSwift" */;
productName = RxBlocking; productName = RxBlocking;
}; };
7A11472523FEA1F400B424AF = { 7A11472523FEA1F400B424AF /* Realm */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7A11472423FEA1F400B424AF; package = 7A11472423FEA1F400B424AF /* XCRemoteSwiftPackageReference "realm-cocoa" */;
productName = Realm; productName = Realm;
}; };
7A11472723FEA1F400B424AF = { 7A11472723FEA1F400B424AF /* RealmSwift */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7A11472423FEA1F400B424AF; package = 7A11472423FEA1F400B424AF /* XCRemoteSwiftPackageReference "realm-cocoa" */;
productName = RealmSwift; productName = RealmSwift;
}; };
7A530B8A240181F500CBFE6E = { 7A530B8A240181F500CBFE6E /* RxRealm */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7A530B89240181F500CBFE6E; package = 7A530B89240181F500CBFE6E /* XCRemoteSwiftPackageReference "RxRealm" */;
productName = RxRealm; productName = RxRealm;
}; };
7A813DC02508C4D900CC93B9 = { 7A813DC02508C4D900CC93B9 /* ExceptionCatcher */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7A813DBF2508C4D900CC93B9; package = 7A813DBF2508C4D900CC93B9 /* XCRemoteSwiftPackageReference "ExceptionCatcher" */;
productName = ExceptionCatcher; productName = ExceptionCatcher;
}; };
7AABDE1C2532F3EB0041AFC6 = { 7AABDE1C2532F3EB0041AFC6 /* PKHUD */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7AABDE1B2532F3EB0041AFC6; package = 7AABDE1B2532F3EB0041AFC6 /* XCRemoteSwiftPackageReference "PKHUD" */;
productName = PKHUD; productName = PKHUD;
}; };
7AABDE22253327F10041AFC6 = { 7AABDE22253327F10041AFC6 /* DifferenceKit */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7AABDE21253327F10041AFC6; package = 7AABDE21253327F10041AFC6 /* XCRemoteSwiftPackageReference "DifferenceKit" */;
productName = DifferenceKit; productName = DifferenceKit;
}; };
7AEF47A3253DC4D2001D6238 = { 7AEF47A3253DC4D2001D6238 /* Eureka */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7AEF47A2253DC4D2001D6238; package = 7AEF47A2253DC4D2001D6238 /* XCRemoteSwiftPackageReference "Eureka" */;
productName = Eureka; productName = Eureka;
}; };
7AF58D332402A91C00CE01A0 = { 7AF58D332402A91C00CE01A0 /* Kingfisher */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
package = 7AF58D322402A91C00CE01A0; package = 7AF58D322402A91C00CE01A0 /* XCRemoteSwiftPackageReference "Kingfisher" */;
productName = Kingfisher; productName = Kingfisher;
}; };
/* End XCSwiftPackageProductDependency section */ /* End XCSwiftPackageProductDependency section */

View File

@ -1,9 +1,12 @@
import UIKit import UIKit
import Eureka import Eureka
import Kingfisher
import SafariServices
class AdsController: FormViewController { class AdsController: FormViewController, MediaBrowserViewControllerDataSource {
var ads: [VehicleAd] = [] var ads: [VehicleAd] = []
private var currentAd: VehicleAd?
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -53,17 +56,52 @@ class AdsController: FormViewController {
} }
} }
// if let url = URL(string: ad.url) { if let urlStr = ad.url, let url = URL(string: urlStr) {
// section <<< URLRow() { row in section <<< MultilineLinkRow() { row in
// row.title = NSLocalizedString("Link", comment: "") row.title = NSLocalizedString("Link", comment: "")
// row.value = url row.value = urlStr
// } }
// } .onCellSelection { _, _ in
let safari = SFSafariViewController(url: url)
self.present(safari, animated: true)
}
}
if !ad.photos.isEmpty { if !ad.photos.isEmpty {
section <<< ImageGridRow() { row in section <<< ImageGridRow() { row in
row.value = ad.photos.toArray() row.value = ad.photos.toArray()
} }
.onDidSelected { index in
self.currentAd = ad
let mediaBrowser = MediaBrowserViewController(index: index, dataSource: self, delegate: nil)
mediaBrowser.shouldShowTitle = false
self.present(mediaBrowser, animated: true, completion: nil)
}
}
}
}
// MARK: - MediaBrowserViewControllerDataSource
func numberOfItems(in mediaBrowser: MediaBrowserViewController) -> Int {
guard let images = self.currentAd?.photos else { return 0 }
return images.count
}
func mediaBrowser(_ mediaBrowser: MediaBrowserViewController, imageAt index: Int, completion: @escaping MediaBrowserViewControllerDataSource.CompletionBlock) {
guard let images = self.currentAd?.photos, let url = URL(string: images[index]) else {
completion(index, nil, ZoomScale.default, NSError(domain: "", code: 0, userInfo: [NSLocalizedDescriptionKey: "Image not found"]))
return
}
KingfisherManager.shared.retrieveImage(with: url) { result in
switch result {
case .success(let res):
completion(index, res.image, ZoomScale.default, nil)
break
case .failure(let error):
completion(index, nil, ZoomScale.default, error)
break
} }
} }
} }

View File

@ -30,6 +30,7 @@ class ImageCell: UICollectionViewCell {
func configure(with image: String) { func configure(with image: String) {
guard let url = URL(string: image) else { return } guard let url = URL(string: image) else { return }
print("=== Configure cell with url: \(image)")
self.imgView.kf.setImage(with: url, options: [ self.imgView.kf.setImage(with: url, options: [
.processor(DownsamplingImageProcessor(size: self.imgView.frame.size)), .processor(DownsamplingImageProcessor(size: self.imgView.frame.size)),
.scaleFactor(UIScreen.main.scale), .scaleFactor(UIScreen.main.scale),
@ -42,6 +43,8 @@ class ImageGrid: UICollectionView, UICollectionViewDataSource, UICollectionViewD
private var images: [String] = [] private var images: [String] = []
private var columnsCount: Int = 1 private var columnsCount: Int = 1
private var spacing: CGFloat = 0 private var spacing: CGFloat = 0
var selectionChanged: ((Int) -> Void)?
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
@ -101,4 +104,9 @@ class ImageGrid: UICollectionView, UICollectionViewDataSource, UICollectionViewD
let cellSize = (self.bounds.size.width - self.spacing*(CGFloat(self.columnsCount) - 1))/CGFloat(self.columnsCount) let cellSize = (self.bounds.size.width - self.spacing*(CGFloat(self.columnsCount) - 1))/CGFloat(self.columnsCount)
return CGSize(width: cellSize, height: cellSize) return CGSize(width: cellSize, height: cellSize)
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
collectionView.deselectItem(at: indexPath, animated: false)
self.selectionChanged?(indexPath.row)
}
} }

View File

@ -6,15 +6,7 @@ final class ImageGridCell: Cell<[String]>, CellType {
required init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { required init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier) super.init(style: style, reuseIdentifier: reuseIdentifier)
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
override func setup() {
super.setup()
self.grid = ImageGrid(columns: 3, spacing: 2) self.grid = ImageGrid(columns: 3, spacing: 2)
self.grid.translatesAutoresizingMaskIntoConstraints = false self.grid.translatesAutoresizingMaskIntoConstraints = false
self.contentView.addSubview(self.grid) self.contentView.addSubview(self.grid)
@ -26,6 +18,20 @@ final class ImageGridCell: Cell<[String]>, CellType {
]) ])
} }
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
override func setup() {
super.setup()
self.grid.selectionChanged = { index in
if let row = self.row as? ImageGridRow {
row.select(at: index)
}
}
}
override func update() { override func update() {
super.update() super.update()
self.textLabel?.text = nil self.textLabel?.text = nil
@ -35,8 +41,20 @@ final class ImageGridCell: Cell<[String]>, CellType {
} }
final class ImageGridRow: Row<ImageGridCell>, RowType { final class ImageGridRow: Row<ImageGridCell>, RowType {
private var selectionCallback: ((Int) -> Void)?
required init(tag: String?) { required init(tag: String?) {
super.init(tag: tag) super.init(tag: tag)
cellProvider = CellProvider<ImageGridCell>() cellProvider = CellProvider<ImageGridCell>()
} }
fileprivate func select(at index: Int) {
self.selectionCallback?(index)
}
@discardableResult
func onDidSelected(_ callback: @escaping (Int) -> Void) -> ImageGridRow {
self.selectionCallback = callback
return self
}
} }

View File

@ -1,9 +1,9 @@
import UIKit import UIKit
import Eureka import Eureka
final class MultilineLabelCell: Cell<String>, CellType { class MultilineLabelCell: Cell<String>, CellType {
private var title: UILabel! private(set) var title: UILabel!
private var value: UILabel! private(set) var value: UILabel!
required init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { required init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier) super.init(style: style, reuseIdentifier: reuseIdentifier)
@ -16,6 +16,8 @@ final class MultilineLabelCell: Cell<String>, CellType {
override func setup() { override func setup() {
super.setup() super.setup()
self.selectionStyle = .none
self.title = UILabel() self.title = UILabel()
self.contentView.addSubview(self.title) self.contentView.addSubview(self.title)
self.title.translatesAutoresizingMaskIntoConstraints = false self.title.translatesAutoresizingMaskIntoConstraints = false

View File

@ -0,0 +1,36 @@
import UIKit
import Eureka
class MultilineLinkCell: MultilineLabelCell {
required init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
override func update() {
super.update()
self.textLabel?.text = nil
self.detailTextLabel?.text = nil
self.title.text = row.title
if let url = row.value {
self.value.attributedText = NSAttributedString(string: url, attributes: [
.link: url
])
} else {
self.title.attributedText = NSAttributedString(string: "")
}
}
}
final class MultilineLinkRow: Row<MultilineLinkCell>, RowType {
required init(tag: String?) {
super.init(tag: tag)
cellProvider = CellProvider<MultilineLinkCell>()
}
}