Update models

This commit is contained in:
Christoph 2018-08-16 11:18:27 +02:00
parent 2048bac6e9
commit 8ed9a6046d
46 changed files with 1656 additions and 69 deletions

View File

@ -7,21 +7,74 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
043EC7C35065DD26F6BB496F /* Pods_CapCollector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 86546C4DAB5E47A540F6E8DD /* Pods_CapCollector.framework */; };
CE56CECE209D81DE00932C01 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CECD209D81DE00932C01 /* AppDelegate.swift */; }; CE56CECE209D81DE00932C01 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CECD209D81DE00932C01 /* AppDelegate.swift */; };
CE56CED0209D81DE00932C01 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CECF209D81DE00932C01 /* ViewController.swift */; };
CE56CED3209D81DE00932C01 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE56CED1209D81DE00932C01 /* Main.storyboard */; }; CE56CED3209D81DE00932C01 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE56CED1209D81DE00932C01 /* Main.storyboard */; };
CE56CED5209D81E000932C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE56CED4209D81E000932C01 /* Assets.xcassets */; }; CE56CED5209D81E000932C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE56CED4209D81E000932C01 /* Assets.xcassets */; };
CE56CED8209D81E000932C01 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE56CED6209D81E000932C01 /* LaunchScreen.storyboard */; }; CE56CED8209D81E000932C01 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE56CED6209D81E000932C01 /* LaunchScreen.storyboard */; };
CE56CEF8209D83B800932C01 /* CapCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEE0209D83B200932C01 /* CapCell.swift */; };
CE56CEF9209D83B800932C01 /* CapImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEE1209D83B200932C01 /* CapImages.swift */; };
CE56CEFA209D83B800932C01 /* CapNames.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEE2209D83B200932C01 /* CapNames.swift */; };
CE56CEFC209D83B800932C01 /* DropboxUpload.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEE4209D83B300932C01 /* DropboxUpload.swift */; };
CE56CEFD209D83B800932C01 /* NameFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEE5209D83B300932C01 /* NameFile.swift */; };
CE56CEFE209D83B800932C01 /* RoundedButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEE6209D83B300932C01 /* RoundedButton.swift */; };
CE56CEFF209D83B800932C01 /* CameraController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEE7209D83B300932C01 /* CameraController.swift */; };
CE56CF00209D83B800932C01 /* UIAlertControllerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEE8209D83B300932C01 /* UIAlertControllerExtensions.swift */; };
CE56CF01209D83B800932C01 /* DropBoxController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEE9209D83B400932C01 /* DropBoxController.swift */; };
CE56CF02209D83B800932C01 /* RoundedImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEEA209D83B400932C01 /* RoundedImageView.swift */; };
CE56CF03209D83B800932C01 /* TableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEEB209D83B400932C01 /* TableView.swift */; };
CE56CF04209D83B800932C01 /* UIViewExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEEC209D83B400932C01 /* UIViewExtensions.swift */; };
CE56CF05209D83B800932C01 /* ViewControllerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEED209D83B400932C01 /* ViewControllerExtensions.swift */; };
CE56CF06209D83B800932C01 /* CameraView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEEE209D83B500932C01 /* CameraView.swift */; };
CE56CF07209D83B800932C01 /* ImageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEEF209D83B500932C01 /* ImageCell.swift */; };
CE56CF08209D83B800932C01 /* DiskManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEF0209D83B500932C01 /* DiskManager.swift */; };
CE56CF09209D83B800932C01 /* Classifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEF1209D83B500932C01 /* Classifier.swift */; };
CE56CF0A209D83B800932C01 /* CropView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEF2209D83B600932C01 /* CropView.swift */; };
CE56CF0B209D83B800932C01 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEF3209D83B600932C01 /* Logger.swift */; };
CE56CF0C209D83B800932C01 /* DropboxDownload.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEF4209D83B600932C01 /* DropboxDownload.swift */; };
CE56CF0D209D83B800932C01 /* ImageSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEF5209D83B600932C01 /* ImageSelector.swift */; };
CE56CF0E209D83B800932C01 /* PhotoCaptureHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEF6209D83B700932C01 /* PhotoCaptureHandler.swift */; };
CE56CF0F209D83B800932C01 /* UIImageExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE56CEF7209D83B700932C01 /* UIImageExtensions.swift */; };
CEF38744209D8476001C8D3C /* Resnet.mlmodel in Sources */ = {isa = PBXBuildFile; fileRef = CEF38742209D8476001C8D3C /* Resnet.mlmodel */; };
CEF38745209D8476001C8D3C /* Squeezenet.mlmodel in Sources */ = {isa = PBXBuildFile; fileRef = CEF38743209D8476001C8D3C /* Squeezenet.mlmodel */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
342A23CD7996DA1E7039C097 /* Pods-CapCollector.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CapCollector.release.xcconfig"; path = "Pods/Target Support Files/Pods-CapCollector/Pods-CapCollector.release.xcconfig"; sourceTree = "<group>"; };
86546C4DAB5E47A540F6E8DD /* Pods_CapCollector.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CapCollector.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CE56CECA209D81DD00932C01 /* CapCollector.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CapCollector.app; sourceTree = BUILT_PRODUCTS_DIR; }; CE56CECA209D81DD00932C01 /* CapCollector.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CapCollector.app; sourceTree = BUILT_PRODUCTS_DIR; };
CE56CECD209D81DE00932C01 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; CE56CECD209D81DE00932C01 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
CE56CECF209D81DE00932C01 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
CE56CED2209D81DE00932C01 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; CE56CED2209D81DE00932C01 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
CE56CED4209D81E000932C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; CE56CED4209D81E000932C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
CE56CED7209D81E000932C01 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; CE56CED7209D81E000932C01 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
CE56CED9209D81E000932C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; CE56CED9209D81E000932C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CE56CEE0209D83B200932C01 /* CapCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CapCell.swift; sourceTree = "<group>"; };
CE56CEE1209D83B200932C01 /* CapImages.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CapImages.swift; sourceTree = "<group>"; };
CE56CEE2209D83B200932C01 /* CapNames.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CapNames.swift; sourceTree = "<group>"; };
CE56CEE4209D83B300932C01 /* DropboxUpload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DropboxUpload.swift; sourceTree = "<group>"; };
CE56CEE5209D83B300932C01 /* NameFile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NameFile.swift; sourceTree = "<group>"; };
CE56CEE6209D83B300932C01 /* RoundedButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoundedButton.swift; sourceTree = "<group>"; };
CE56CEE7209D83B300932C01 /* CameraController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraController.swift; sourceTree = "<group>"; };
CE56CEE8209D83B300932C01 /* UIAlertControllerExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIAlertControllerExtensions.swift; sourceTree = "<group>"; };
CE56CEE9209D83B400932C01 /* DropBoxController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DropBoxController.swift; sourceTree = "<group>"; };
CE56CEEA209D83B400932C01 /* RoundedImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoundedImageView.swift; sourceTree = "<group>"; };
CE56CEEB209D83B400932C01 /* TableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TableView.swift; path = ../TableView.swift; sourceTree = "<group>"; };
CE56CEEC209D83B400932C01 /* UIViewExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIViewExtensions.swift; sourceTree = "<group>"; };
CE56CEED209D83B400932C01 /* ViewControllerExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewControllerExtensions.swift; sourceTree = "<group>"; };
CE56CEEE209D83B500932C01 /* CameraView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraView.swift; sourceTree = "<group>"; };
CE56CEEF209D83B500932C01 /* ImageCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageCell.swift; sourceTree = "<group>"; };
CE56CEF0209D83B500932C01 /* DiskManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiskManager.swift; sourceTree = "<group>"; };
CE56CEF1209D83B500932C01 /* Classifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Classifier.swift; sourceTree = "<group>"; };
CE56CEF2209D83B600932C01 /* CropView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CropView.swift; sourceTree = "<group>"; };
CE56CEF3209D83B600932C01 /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
CE56CEF4209D83B600932C01 /* DropboxDownload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DropboxDownload.swift; sourceTree = "<group>"; };
CE56CEF5209D83B600932C01 /* ImageSelector.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageSelector.swift; sourceTree = "<group>"; };
CE56CEF6209D83B700932C01 /* PhotoCaptureHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotoCaptureHandler.swift; sourceTree = "<group>"; };
CE56CEF7209D83B700932C01 /* UIImageExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageExtensions.swift; sourceTree = "<group>"; };
CE92CA6120CAD38600D5DAA4 /* Xcode.mlmodel */ = {isa = PBXFileReference; lastKnownFileType = file.mlmodel; path = Xcode.mlmodel; sourceTree = "<group>"; };
CEF38742209D8476001C8D3C /* Resnet.mlmodel */ = {isa = PBXFileReference; lastKnownFileType = file.mlmodel; name = Resnet.mlmodel; path = ../../../../Dropbox/Models/Resnet.mlmodel; sourceTree = "<group>"; };
CEF38743209D8476001C8D3C /* Squeezenet.mlmodel */ = {isa = PBXFileReference; lastKnownFileType = file.mlmodel; name = Squeezenet.mlmodel; path = ../../../../Dropbox/Models/Squeezenet.mlmodel; sourceTree = "<group>"; };
DBD72193E502C23E06DA913D /* Pods-CapCollector.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CapCollector.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CapCollector/Pods-CapCollector.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -29,17 +82,37 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
043EC7C35065DD26F6BB496F /* Pods_CapCollector.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
0FE92EFB7AA01ED92CDE6BF3 /* Pods */ = {
isa = PBXGroup;
children = (
DBD72193E502C23E06DA913D /* Pods-CapCollector.debug.xcconfig */,
342A23CD7996DA1E7039C097 /* Pods-CapCollector.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
9EAE4B3CEE704AF443897B44 /* Frameworks */ = {
isa = PBXGroup;
children = (
86546C4DAB5E47A540F6E8DD /* Pods_CapCollector.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
CE56CEC1209D81DD00932C01 = { CE56CEC1209D81DD00932C01 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CE56CECC209D81DD00932C01 /* CapCollector */, CE56CECC209D81DD00932C01 /* CapCollector */,
CE56CECB209D81DD00932C01 /* Products */, CE56CECB209D81DD00932C01 /* Products */,
0FE92EFB7AA01ED92CDE6BF3 /* Pods */,
9EAE4B3CEE704AF443897B44 /* Frameworks */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -55,13 +128,94 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CE56CECD209D81DE00932C01 /* AppDelegate.swift */, CE56CECD209D81DE00932C01 /* AppDelegate.swift */,
CE56CECF209D81DE00932C01 /* ViewController.swift */, CEF38742209D8476001C8D3C /* Resnet.mlmodel */,
CEF38743209D8476001C8D3C /* Squeezenet.mlmodel */,
CE92CA6120CAD38600D5DAA4 /* Xcode.mlmodel */,
CE56CEF1209D83B500932C01 /* Classifier.swift */,
CEF3874D209D9378001C8D3C /* Capture */,
CEF3874E209D9390001C8D3C /* Sync */,
CEF38750209D93D1001C8D3C /* Data */,
CEF3874B209D932E001C8D3C /* View Components */,
CEF3874F209D93A6001C8D3C /* Presentation */,
CEF3874C209D935E001C8D3C /* Extensions */,
CE56CEF3209D83B600932C01 /* Logger.swift */,
CE56CED1209D81DE00932C01 /* Main.storyboard */, CE56CED1209D81DE00932C01 /* Main.storyboard */,
CE56CEDF209D81FD00932C01 /* Support */,
);
path = CapCollector;
sourceTree = "<group>";
};
CE56CEDF209D81FD00932C01 /* Support */ = {
isa = PBXGroup;
children = (
CE56CED4209D81E000932C01 /* Assets.xcassets */, CE56CED4209D81E000932C01 /* Assets.xcassets */,
CE56CED6209D81E000932C01 /* LaunchScreen.storyboard */, CE56CED6209D81E000932C01 /* LaunchScreen.storyboard */,
CE56CED9209D81E000932C01 /* Info.plist */, CE56CED9209D81E000932C01 /* Info.plist */,
); );
path = CapCollector; name = Support;
sourceTree = "<group>";
};
CEF3874B209D932E001C8D3C /* View Components */ = {
isa = PBXGroup;
children = (
CE56CEF2209D83B600932C01 /* CropView.swift */,
CE56CEEA209D83B400932C01 /* RoundedImageView.swift */,
CE56CEE6209D83B300932C01 /* RoundedButton.swift */,
);
path = "View Components";
sourceTree = "<group>";
};
CEF3874C209D935E001C8D3C /* Extensions */ = {
isa = PBXGroup;
children = (
CE56CEE8209D83B300932C01 /* UIAlertControllerExtensions.swift */,
CE56CEF7209D83B700932C01 /* UIImageExtensions.swift */,
CE56CEEC209D83B400932C01 /* UIViewExtensions.swift */,
CE56CEED209D83B400932C01 /* ViewControllerExtensions.swift */,
);
path = Extensions;
sourceTree = "<group>";
};
CEF3874D209D9378001C8D3C /* Capture */ = {
isa = PBXGroup;
children = (
CE56CEE7209D83B300932C01 /* CameraController.swift */,
CE56CEEE209D83B500932C01 /* CameraView.swift */,
CE56CEF6209D83B700932C01 /* PhotoCaptureHandler.swift */,
);
path = Capture;
sourceTree = "<group>";
};
CEF3874E209D9390001C8D3C /* Sync */ = {
isa = PBXGroup;
children = (
CE56CEE9209D83B400932C01 /* DropBoxController.swift */,
CE56CEF4209D83B600932C01 /* DropboxDownload.swift */,
CE56CEE4209D83B300932C01 /* DropboxUpload.swift */,
);
path = Sync;
sourceTree = "<group>";
};
CEF3874F209D93A6001C8D3C /* Presentation */ = {
isa = PBXGroup;
children = (
CE56CEEB209D83B400932C01 /* TableView.swift */,
CE56CEE0209D83B200932C01 /* CapCell.swift */,
CE56CEF5209D83B600932C01 /* ImageSelector.swift */,
CE56CEEF209D83B500932C01 /* ImageCell.swift */,
);
path = Presentation;
sourceTree = "<group>";
};
CEF38750209D93D1001C8D3C /* Data */ = {
isa = PBXGroup;
children = (
CE56CEE1209D83B200932C01 /* CapImages.swift */,
CE56CEE2209D83B200932C01 /* CapNames.swift */,
CE56CEF0209D83B500932C01 /* DiskManager.swift */,
CE56CEE5209D83B300932C01 /* NameFile.swift */,
);
path = Data;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
/* End PBXGroup section */ /* End PBXGroup section */
@ -71,9 +225,11 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = CE56CEDC209D81E000932C01 /* Build configuration list for PBXNativeTarget "CapCollector" */; buildConfigurationList = CE56CEDC209D81E000932C01 /* Build configuration list for PBXNativeTarget "CapCollector" */;
buildPhases = ( buildPhases = (
3E8A16B5B7B80A2451075442 /* [CP] Check Pods Manifest.lock */,
CE56CEC6209D81DD00932C01 /* Sources */, CE56CEC6209D81DD00932C01 /* Sources */,
CE56CEC7209D81DD00932C01 /* Frameworks */, CE56CEC7209D81DD00932C01 /* Frameworks */,
CE56CEC8209D81DD00932C01 /* Resources */, CE56CEC8209D81DD00932C01 /* Resources */,
135644FD94500ABE4DA09082 /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -96,6 +252,7 @@
TargetAttributes = { TargetAttributes = {
CE56CEC9209D81DD00932C01 = { CE56CEC9209D81DD00932C01 = {
CreatedOnToolsVersion = 9.4; CreatedOnToolsVersion = 9.4;
LastSwiftMigration = 1000;
}; };
}; };
}; };
@ -130,13 +287,78 @@
}; };
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
135644FD94500ABE4DA09082 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-CapCollector/Pods-CapCollector-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
"${BUILT_PRODUCTS_DIR}/SwiftyDropbox/SwiftyDropbox.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyDropbox.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CapCollector/Pods-CapCollector-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3E8A16B5B7B80A2451075442 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-CapCollector-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
CE56CEC6209D81DD00932C01 /* Sources */ = { CE56CEC6209D81DD00932C01 /* Sources */ = {
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
CE56CED0209D81DE00932C01 /* ViewController.swift in Sources */, CE56CF09209D83B800932C01 /* Classifier.swift in Sources */,
CE56CF0B209D83B800932C01 /* Logger.swift in Sources */,
CE56CF01209D83B800932C01 /* DropBoxController.swift in Sources */,
CE56CF04209D83B800932C01 /* UIViewExtensions.swift in Sources */,
CE56CF08209D83B800932C01 /* DiskManager.swift in Sources */,
CE56CF0F209D83B800932C01 /* UIImageExtensions.swift in Sources */,
CE56CEF9209D83B800932C01 /* CapImages.swift in Sources */,
CEF38745209D8476001C8D3C /* Squeezenet.mlmodel in Sources */,
CEF38744209D8476001C8D3C /* Resnet.mlmodel in Sources */,
CE56CF03209D83B800932C01 /* TableView.swift in Sources */,
CE56CEFD209D83B800932C01 /* NameFile.swift in Sources */,
CE56CECE209D81DE00932C01 /* AppDelegate.swift in Sources */, CE56CECE209D81DE00932C01 /* AppDelegate.swift in Sources */,
CE56CF0D209D83B800932C01 /* ImageSelector.swift in Sources */,
CE56CEFF209D83B800932C01 /* CameraController.swift in Sources */,
CE56CF05209D83B800932C01 /* ViewControllerExtensions.swift in Sources */,
CE56CF0E209D83B800932C01 /* PhotoCaptureHandler.swift in Sources */,
CE56CEFE209D83B800932C01 /* RoundedButton.swift in Sources */,
CE56CEFA209D83B800932C01 /* CapNames.swift in Sources */,
CE56CF07209D83B800932C01 /* ImageCell.swift in Sources */,
CE56CF00209D83B800932C01 /* UIAlertControllerExtensions.swift in Sources */,
CE56CF06209D83B800932C01 /* CameraView.swift in Sources */,
CE56CF0A209D83B800932C01 /* CropView.swift in Sources */,
CE56CF0C209D83B800932C01 /* DropboxDownload.swift in Sources */,
CE56CF02209D83B800932C01 /* RoundedImageView.swift in Sources */,
CE56CEFC209D83B800932C01 /* DropboxUpload.swift in Sources */,
CE56CEF8209D83B800932C01 /* CapCell.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -278,8 +500,10 @@
}; };
CE56CEDD209D81E000932C01 /* Debug */ = { CE56CEDD209D81E000932C01 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = DBD72193E502C23E06DA913D /* Pods-CapCollector.debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = H8WR4M6QQ4; DEVELOPMENT_TEAM = H8WR4M6QQ4;
INFOPLIST_FILE = CapCollector/Info.plist; INFOPLIST_FILE = CapCollector/Info.plist;
@ -289,15 +513,19 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = christophhagen.CapCollector; PRODUCT_BUNDLE_IDENTIFIER = christophhagen.CapCollector;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0; PROVISIONING_PROFILE = "";
TARGETED_DEVICE_FAMILY = "1,2"; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 1;
}; };
name = Debug; name = Debug;
}; };
CE56CEDE209D81E000932C01 /* Release */ = { CE56CEDE209D81E000932C01 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 342A23CD7996DA1E7039C097 /* Pods-CapCollector.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = H8WR4M6QQ4; DEVELOPMENT_TEAM = H8WR4M6QQ4;
INFOPLIST_FILE = CapCollector/Info.plist; INFOPLIST_FILE = CapCollector/Info.plist;
@ -307,8 +535,10 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = christophhagen.CapCollector; PRODUCT_BUNDLE_IDENTIFIER = christophhagen.CapCollector;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0; PROVISIONING_PROFILE = "";
TARGETED_DEVICE_FAMILY = "1,2"; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 1;
}; };
name = Release; name = Release;
}; };

View File

@ -1,24 +1,45 @@
// //
// AppDelegate.swift // AppDelegate.swift
// CapCollector // CapFinder
// //
// Created by User on 05.05.18. // Created by User on 31.01.18.
// Copyright © 2018 CH. All rights reserved. // Copyright © 2018 User. All rights reserved.
// //
import UIKit import UIKit
import CoreData
import SwiftyDropbox
@UIApplicationMain @UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate { class AppDelegate: UIResponder, UIApplicationDelegate {
/// Main tint color of the app
static let tintColor = UIColor(red: 122/255, green: 155/255, blue: 41/255, alpha: 1)
var window: UIWindow? var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { DropboxClientsManager.setupWithAppKey("n81tx2g638wuffl")
// Override point for customization after application launch. DiskManager.setupOnFirstLaunch()
return true return true
} }
var frontmostViewController: UIViewController? {
var controller = window?.rootViewController
while let presentedViewController = controller?.presentedViewController {
controller = presentedViewController
}
return controller
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
DropboxController.shared.handle(url: url)
return true
}
/**
func applicationWillResignActive(_ application: UIApplication) { func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
@ -39,8 +60,55 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func applicationWillTerminate(_ application: UIApplication) { func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
// Saves changes in the application's managed object context before the application terminates.
self.saveContext()
} }
*/
// MARK: - Core Data stack
lazy var persistentContainer: NSPersistentContainer = {
/*
The persistent container for the application. This implementation
creates and returns a container, having loaded the store for the
application to it. This property is optional since there are legitimate
error conditions that could cause the creation of the store to fail.
*/
let container = NSPersistentContainer(name: "CapFinder")
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
/*
Typical reasons for an error here include:
* The parent directory does not exist, cannot be created, or disallows writing.
* The persistent store is not accessible, due to permissions or data protection when the device is locked.
* The device is out of space.
* The store could not be migrated to the current model version.
Check the error message to determine what the actual problem was.
*/
fatalError("Unresolved error \(error), \(error.userInfo)")
}
})
return container
}()
// MARK: - Core Data Saving support
func saveContext () {
let context = persistentContainer.viewContext
if context.hasChanges {
do {
try context.save()
} catch {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
let nserror = error as NSError
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
}
}
}
} }

View File

@ -1,43 +1,51 @@
{ {
"images" : [ "images" : [
{ {
"idiom" : "iphone",
"size" : "20x20", "size" : "20x20",
"idiom" : "iphone",
"filename" : "bottle-cap40.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "iphone",
"size" : "20x20", "size" : "20x20",
"idiom" : "iphone",
"filename" : "bottle-cap60.png",
"scale" : "3x" "scale" : "3x"
}, },
{ {
"idiom" : "iphone",
"size" : "29x29", "size" : "29x29",
"idiom" : "iphone",
"filename" : "bottle-cap58.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "iphone",
"size" : "29x29", "size" : "29x29",
"idiom" : "iphone",
"filename" : "bottle-cap87.png",
"scale" : "3x" "scale" : "3x"
}, },
{ {
"idiom" : "iphone",
"size" : "40x40", "size" : "40x40",
"idiom" : "iphone",
"filename" : "bottle-cap80.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "iphone",
"size" : "40x40", "size" : "40x40",
"idiom" : "iphone",
"filename" : "bottle-cap120.png",
"scale" : "3x" "scale" : "3x"
}, },
{ {
"idiom" : "iphone",
"size" : "60x60", "size" : "60x60",
"idiom" : "iphone",
"filename" : "bottle-cap120-1.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "iphone",
"size" : "60x60", "size" : "60x60",
"idiom" : "iphone",
"filename" : "bottle-cap180.png",
"scale" : "3x" "scale" : "3x"
}, },
{ {
@ -86,8 +94,9 @@
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "ios-marketing",
"size" : "1024x1024", "size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "bottle-cap1024.png",
"scale" : "1x" "scale" : "1x"
} }
], ],

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "camera.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "camera_square.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "cancel.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "launch.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "search_icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14105" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
@ -13,7 +18,20 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch" translatesAutoresizingMaskIntoConstraints="NO" id="SQk-Vr-WK2">
<rect key="frame" x="62" y="218.5" width="250" height="250"/>
<constraints>
<constraint firstAttribute="width" constant="250" id="PfE-No-7DY"/>
<constraint firstAttribute="width" secondItem="SQk-Vr-WK2" secondAttribute="height" multiplier="1:1" id="b99-Ji-vq3"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.41960784313725491" green="0.57647058823529407" blue="0.37254901960784315" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="SQk-Vr-WK2" firstAttribute="centerX" secondItem="6Tk-OE-BBY" secondAttribute="centerX" id="8lU-QA-M23"/>
<constraint firstItem="SQk-Vr-WK2" firstAttribute="centerY" secondItem="6Tk-OE-BBY" secondAttribute="centerY" id="M5A-L2-2tA"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view> </view>
</viewController> </viewController>
@ -22,4 +40,7 @@
<point key="canvasLocation" x="53" y="375"/> <point key="canvasLocation" x="53" y="375"/>
</scene> </scene>
</scenes> </scenes>
<resources>
<image name="launch" width="1024" height="1024"/>
</resources>
</document> </document>

View File

@ -1,24 +1,447 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14269.12" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="VSb-c5-JF6">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14252.5"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--View Controller--> <!--Caps-->
<scene sceneID="tne-QT-ifu"> <scene sceneID="FO1-cz-6Q6">
<objects> <objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController"> <viewController storyboardIdentifier="ImageSelector" id="xXN-Zh-iCd" customClass="ImageSelector" customModule="CapCollector" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> <view key="view" contentMode="scaleToFill" id="7RW-nN-0XQ">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vx1-tM-8mD" userLabel="Status Bar View">
<rect key="frame" x="0.0" y="0.0" width="375" height="20"/>
<color key="backgroundColor" red="0.14168914909999999" green="0.14168914909999999" blue="0.14168914909999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="KLt-lS-0bs">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<color key="backgroundColor" red="0.14168914910710662" green="0.14168914910710662" blue="0.14168914910710662" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="0.0" id="m0z-hV-bp1">
<size key="itemSize" width="125" height="125"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Image" id="a3h-Rh-cyS" customClass="ImageCell" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="125" height="125"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
<rect key="frame" x="0.0" y="0.0" width="125" height="125"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dUp-gB-b4C" customClass="RoundedImageView" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="2" y="2" width="121" height="121"/>
</imageView>
</subviews>
</view>
<constraints>
<constraint firstItem="dUp-gB-b4C" firstAttribute="leading" secondItem="a3h-Rh-cyS" secondAttribute="leading" constant="2" id="Gc7-h0-pzJ"/>
<constraint firstAttribute="bottom" secondItem="dUp-gB-b4C" secondAttribute="bottom" constant="2" id="dKB-wM-BWw"/>
<constraint firstAttribute="trailing" secondItem="dUp-gB-b4C" secondAttribute="trailing" constant="2" id="eLS-W2-Owa"/>
<constraint firstItem="dUp-gB-b4C" firstAttribute="top" secondItem="a3h-Rh-cyS" secondAttribute="top" constant="2" id="wkf-il-wti"/>
</constraints>
<connections>
<outlet property="capView" destination="dUp-gB-b4C" id="RKW-nR-43M"/>
</connections>
</collectionViewCell>
</cells>
</collectionView>
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pHE-7r-I7l" userLabel="Search View">
<rect key="frame" x="-1" y="668" width="377" height="49"/>
<constraints>
<constraint firstAttribute="height" constant="49" id="75Y-Pa-gf4"/>
</constraints>
</containerView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uBv-Ka-a6u" customClass="RoundedButton" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="20" y="607" width="335" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="I11-YD-mhs"/>
</constraints>
<state key="normal" title="Cancel"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" red="0.83921568629999999" green="0.9379758883" blue="0.54901960780000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="didCancel" destination="xXN-Zh-iCd" eventType="touchUpInside" id="7bg-Y2-nV1"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="lmc-ZJ-cgu" firstAttribute="bottom" secondItem="uBv-Ka-a6u" secondAttribute="bottom" constant="20" id="0bT-Jh-qzm"/>
<constraint firstItem="lmc-ZJ-cgu" firstAttribute="top" secondItem="Vx1-tM-8mD" secondAttribute="top" constant="20" id="9Ai-nd-gYO"/>
<constraint firstItem="KLt-lS-0bs" firstAttribute="top" secondItem="Vx1-tM-8mD" secondAttribute="bottom" id="DdH-ID-K5R"/>
<constraint firstItem="lmc-ZJ-cgu" firstAttribute="bottom" secondItem="KLt-lS-0bs" secondAttribute="bottom" id="LgP-eI-hGc"/>
<constraint firstItem="lmc-ZJ-cgu" firstAttribute="trailing" secondItem="KLt-lS-0bs" secondAttribute="trailing" id="MFg-gH-TZJ"/>
<constraint firstItem="KLt-lS-0bs" firstAttribute="leading" secondItem="lmc-ZJ-cgu" secondAttribute="leading" id="MNg-7M-R1B"/>
<constraint firstItem="KLt-lS-0bs" firstAttribute="top" secondItem="lmc-ZJ-cgu" secondAttribute="top" id="MgU-8N-zWy"/>
<constraint firstItem="lmc-ZJ-cgu" firstAttribute="trailing" secondItem="Vx1-tM-8mD" secondAttribute="trailing" id="PqZ-Gb-7Le"/>
<constraint firstItem="uBv-Ka-a6u" firstAttribute="leading" secondItem="lmc-ZJ-cgu" secondAttribute="leading" constant="20" id="VLy-Qd-LzF"/>
<constraint firstItem="Vx1-tM-8mD" firstAttribute="leading" secondItem="lmc-ZJ-cgu" secondAttribute="leading" id="WgW-hG-WpI"/>
<constraint firstItem="pHE-7r-I7l" firstAttribute="centerX" secondItem="lmc-ZJ-cgu" secondAttribute="centerX" id="fdQ-KZ-Nj4"/>
<constraint firstItem="uBv-Ka-a6u" firstAttribute="centerX" secondItem="lmc-ZJ-cgu" secondAttribute="centerX" id="jcu-4d-ddV"/>
<constraint firstItem="lmc-ZJ-cgu" firstAttribute="bottom" secondItem="pHE-7r-I7l" secondAttribute="bottom" constant="-50" id="n33-vy-jhn"/>
<constraint firstItem="lmc-ZJ-cgu" firstAttribute="trailing" secondItem="pHE-7r-I7l" secondAttribute="trailing" constant="-1" id="sGP-rj-Nsr"/>
</constraints>
<viewLayoutGuide key="safeArea" id="lmc-ZJ-cgu"/>
</view> </view>
<tabBarItem key="tabBarItem" systemItem="history" id="Cxk-kX-pY9">
<color key="badgeColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tabBarItem>
<navigationItem key="navigationItem" title="Caps" id="Pt2-ad-tUu">
<barButtonItem key="backBarButtonItem" title="Back" id="e2a-wC-2Uv"/>
<barButtonItem key="leftBarButtonItem" systemItem="camera" id="qPt-0g-cjq"/>
<barButtonItem key="rightBarButtonItem" title="Clear" id="hmj-Lo-iYP"/>
</navigationItem>
<nil key="simulatedTopBarMetrics"/>
<nil key="simulatedBottomBarMetrics"/>
<connections>
<outlet property="collection" destination="KLt-lS-0bs" id="Jfu-ZQ-v2b"/>
</connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="xnW-hF-IOj" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="1804" y="1558"/>
</scene>
<!--Camera Controller-->
<scene sceneID="5iQ-Nr-LFc">
<objects>
<viewController id="oDF-NZ-j9r" customClass="CameraController" customModule="CapCollector" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Y3e-A9-cGq">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="75a-Qa-tvd" userLabel="Embedding Camera View">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JR1-Im-yOB" userLabel="PicturePreview" customClass="CameraView" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="-80" y="-33" width="535" height="713"/>
<constraints>
<constraint firstAttribute="width" secondItem="JR1-Im-yOB" secondAttribute="height" multiplier="3:4" id="LL6-Z4-ep1"/>
</constraints>
</view>
<view opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RWS-jY-sNX" customClass="CropView" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="-80" y="56" width="535" height="535"/>
<constraints>
<constraint firstAttribute="width" secondItem="RWS-jY-sNX" secondAttribute="height" multiplier="1:1" id="Buc-aU-mqr"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="relativeSize">
<real key="value" value="0.40000000000000002"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="lineColor">
<color key="value" red="0.47843137254901957" green="0.60784313725490191" blue="0.16078431372549018" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="lineWidth">
<real key="value" value="2"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="JR1-Im-yOB" firstAttribute="centerY" secondItem="75a-Qa-tvd" secondAttribute="centerY" id="I0g-m0-LPb"/>
<constraint firstItem="JR1-Im-yOB" firstAttribute="centerX" secondItem="75a-Qa-tvd" secondAttribute="centerX" id="PWv-L2-yWL"/>
<constraint firstItem="RWS-jY-sNX" firstAttribute="centerY" secondItem="JR1-Im-yOB" secondAttribute="centerY" id="gW5-a3-fBU"/>
<constraint firstItem="RWS-jY-sNX" firstAttribute="centerX" secondItem="JR1-Im-yOB" secondAttribute="centerX" id="sxd-Vu-qCf"/>
<constraint firstItem="JR1-Im-yOB" firstAttribute="leading" secondItem="75a-Qa-tvd" secondAttribute="leading" constant="-80" id="teJ-k1-aza"/>
<constraint firstItem="RWS-jY-sNX" firstAttribute="leading" secondItem="JR1-Im-yOB" secondAttribute="leading" id="xq5-uK-Qgb"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vaw-Dn-P4X" customClass="RoundedButton" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="117.5" y="547" width="140" height="100"/>
<color key="backgroundColor" red="0.23474514530000001" green="0.23474514530000001" blue="0.23474514530000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="GV5-gm-Mgb"/>
<constraint firstAttribute="width" constant="140" id="yvj-4Q-SbM"/>
</constraints>
<color key="tintColor" red="0.40996540770000001" green="0.74387006369999997" blue="0.0063908164090000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" image="camera">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<state key="disabled">
<color key="titleColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<state key="highlighted">
<color key="titleColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="imageButtonPressed" destination="oDF-NZ-j9r" eventType="touchUpInside" id="101-8q-Ys4"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n6Y-h8-wqX" userLabel="Back Button" customClass="RoundedButton" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="285" y="577" width="70" height="70"/>
<color key="backgroundColor" red="0.23474514530000001" green="0.23474514530000001" blue="0.23474514530000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="70" id="GKD-MA-Vi8"/>
<constraint firstAttribute="width" secondItem="n6Y-h8-wqX" secondAttribute="height" multiplier="1:1" id="spk-9b-njd"/>
</constraints>
<color key="tintColor" red="0.40996540770000001" green="0.74387006369999997" blue="0.0063908164090000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" image="cancel">
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<state key="disabled">
<color key="titleColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<state key="highlighted">
<color key="titleColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="backButtonPressed" destination="oDF-NZ-j9r" eventType="touchUpInside" id="Tj9-M1-kIZ"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.14168914909999999" green="0.14168914909999999" blue="0.14168914909999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="75a-Qa-tvd" firstAttribute="leading" secondItem="oi0-LU-PyW" secondAttribute="leading" id="3sA-U9-YPf"/>
<constraint firstItem="oi0-LU-PyW" firstAttribute="bottom" secondItem="75a-Qa-tvd" secondAttribute="bottom" id="44I-wq-3q0"/>
<constraint firstItem="Vaw-Dn-P4X" firstAttribute="centerX" secondItem="JR1-Im-yOB" secondAttribute="centerX" id="9Kc-2m-6gN"/>
<constraint firstItem="oi0-LU-PyW" firstAttribute="trailing" secondItem="n6Y-h8-wqX" secondAttribute="trailing" constant="20" id="9zc-lE-kuc"/>
<constraint firstItem="oi0-LU-PyW" firstAttribute="bottom" secondItem="Vaw-Dn-P4X" secondAttribute="bottom" constant="20" id="ikl-hi-ZxS"/>
<constraint firstItem="n6Y-h8-wqX" firstAttribute="bottom" secondItem="Vaw-Dn-P4X" secondAttribute="bottom" id="tYb-nH-Gcw"/>
<constraint firstItem="75a-Qa-tvd" firstAttribute="top" secondItem="oi0-LU-PyW" secondAttribute="top" id="uOs-bC-Ham"/>
<constraint firstItem="oi0-LU-PyW" firstAttribute="trailing" secondItem="75a-Qa-tvd" secondAttribute="trailing" id="wnh-xb-MEk"/>
</constraints>
<viewLayoutGuide key="safeArea" id="oi0-LU-PyW"/>
</view>
<tabBarItem key="tabBarItem" systemItem="search" id="eNS-Ka-b0t"/>
<modalPageSheetSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="cameraView" destination="JR1-Im-yOB" id="qau-yi-xCB"/>
<outlet property="cancelButton" destination="n6Y-h8-wqX" id="EHz-dt-jwA"/>
<outlet property="cropView" destination="RWS-jY-sNX" id="9OR-8z-a1p"/>
<outlet property="imageButton" destination="Vaw-Dn-P4X" id="2mY-wk-jWZ"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="u9k-DO-1HN" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3159" y="1558"/>
</scene>
<!--Table View-->
<scene sceneID="3Dy-nA-zIw">
<objects>
<viewController id="VSb-c5-JF6" customClass="TableView" customModule="CapCollector" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Vc7-bL-TES">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsVerticalScrollIndicator="NO" keyboardDismissMode="onDrag" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Djy-MM-jNn">
<rect key="frame" x="0.0" y="110" width="375" height="501"/>
<color key="backgroundColor" red="0.14168914909999999" green="0.14168914909999999" blue="0.14168914909999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="cap" rowHeight="100" id="ubX-SO-ltt" customClass="CapCell" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="375" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ubX-SO-ltt" id="BD9-Ic-hwS">
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="eHr-Uk-WC9" customClass="RoundedImageView" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="2" y="2" width="96" height="96"/>
<constraints>
<constraint firstAttribute="width" secondItem="eHr-Uk-WC9" secondAttribute="height" multiplier="1:1" id="640-1g-g0v"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="71 % match" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pe1-sR-2RT">
<rect key="frame" x="106" y="2.5" width="128" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Some brand with a long name of more than 2 lines" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Sij-H0-zYC">
<rect key="frame" x="106" y="25.5" width="261" height="49"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/>
<color key="textColor" red="0.83921568629999999" green="0.9379758883" blue="0.54901960780000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="# caps" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nJ1-TQ-ZT3">
<rect key="frame" x="315.5" y="2.5" width="51.5" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="Pe1-sR-2RT" firstAttribute="leading" secondItem="eHr-Uk-WC9" secondAttribute="trailing" constant="8" id="1bU-zq-83L"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Sij-H0-zYC" secondAttribute="bottom" constant="8" id="3e4-bs-Jka"/>
<constraint firstItem="eHr-Uk-WC9" firstAttribute="leading" secondItem="BD9-Ic-hwS" secondAttribute="leading" constant="2" id="BH6-4m-jIT"/>
<constraint firstItem="Sij-H0-zYC" firstAttribute="top" secondItem="Pe1-sR-2RT" secondAttribute="bottom" constant="2" id="FNF-xm-BjR"/>
<constraint firstItem="Sij-H0-zYC" firstAttribute="leading" secondItem="Pe1-sR-2RT" secondAttribute="leading" id="SdR-AF-gcG"/>
<constraint firstAttribute="bottom" secondItem="eHr-Uk-WC9" secondAttribute="bottom" constant="2" id="UGo-B1-mHf"/>
<constraint firstItem="nJ1-TQ-ZT3" firstAttribute="leading" secondItem="Pe1-sR-2RT" secondAttribute="trailing" constant="81.5" id="WQ3-ZG-Hva"/>
<constraint firstAttribute="trailing" secondItem="Sij-H0-zYC" secondAttribute="trailing" constant="8" id="hKh-2e-iDu"/>
<constraint firstItem="eHr-Uk-WC9" firstAttribute="centerY" secondItem="BD9-Ic-hwS" secondAttribute="centerY" id="lRZ-Qc-0MI"/>
<constraint firstItem="Sij-H0-zYC" firstAttribute="centerY" secondItem="BD9-Ic-hwS" secondAttribute="centerY" id="mIz-nP-Mtz"/>
<constraint firstItem="nJ1-TQ-ZT3" firstAttribute="trailing" secondItem="Sij-H0-zYC" secondAttribute="trailing" id="r1z-vT-brQ"/>
<constraint firstItem="nJ1-TQ-ZT3" firstAttribute="centerY" secondItem="Pe1-sR-2RT" secondAttribute="centerY" id="xBh-YR-DhC"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="0.14168914909999999" green="0.14168914909999999" blue="0.14168914909999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<outlet property="capImage" destination="eHr-Uk-WC9" id="sQH-w5-lp6"/>
<outlet property="countLabel" destination="nJ1-TQ-ZT3" id="Vde-d4-EhH"/>
<outlet property="matchLabel" destination="Pe1-sR-2RT" id="ZPR-ro-2Yg"/>
<outlet property="nameLabel" destination="Sij-H0-zYC" id="Wc1-h9-i2E"/>
</connections>
</tableViewCell>
</prototypes>
</tableView>
<searchBar contentMode="redraw" barStyle="black" searchBarStyle="minimal" placeholder="Search caps" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xrp-e5-Cxl">
<rect key="frame" x="0.0" y="611" width="319" height="56"/>
<color key="backgroundColor" red="0.14168914909999999" green="0.14168914909999999" blue="0.14168914909999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardAppearance="alert" returnKeyType="search" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/>
<scopeButtonTitles>
<string>Title</string>
<string>Title</string>
</scopeButtonTitles>
</searchBar>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ks7-y5-82m">
<rect key="frame" x="319" y="611" width="56" height="56"/>
<color key="backgroundColor" red="0.14168914909999999" green="0.14168914909999999" blue="0.14168914909999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="56" id="ePe-XA-CtH"/>
<constraint firstAttribute="width" secondItem="Ks7-y5-82m" secondAttribute="height" multiplier="1:1" id="kwo-RI-k9X"/>
</constraints>
<state key="normal" title="Button" image="camera_square"/>
<connections>
<action selector="imageClearButtonPressed" destination="VSb-c5-JF6" eventType="touchUpInside" id="zGe-MT-RR1"/>
<segue destination="oDF-NZ-j9r" kind="show" identifier="showCamera" id="CZp-Jx-hhr"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="m5W-zE-D1T">
<rect key="frame" x="0.0" y="20" width="375" height="90"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TLY-ak-c4W" customClass="RoundedImageView" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="2" y="2" width="86" height="86"/>
<constraints>
<constraint firstAttribute="width" secondItem="TLY-ak-c4W" secondAttribute="height" multiplier="1:1" id="SU9-Ph-0PV"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wyc-2T-CIk" customClass="RoundedButton" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="96" y="30" width="131.5" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="gZx-2X-umh"/>
</constraints>
<state key="normal" title="Save">
<color key="titleColor" red="0.83921568629999999" green="0.9379758883" blue="0.54901960780000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" red="0.83921568629999999" green="0.9379758883" blue="0.54901960780000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="saveButtonPressed" destination="VSb-c5-JF6" eventType="touchUpInside" id="4AR-Ph-o3o"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wMe-pc-3Zj" customClass="RoundedButton" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="235.5" y="30" width="131.5" height="30"/>
<state key="normal" title="Delete">
<color key="titleColor" red="0.83921568629999999" green="0.9379758883" blue="0.54901960780000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" red="0.83921568629999999" green="0.9379758883" blue="0.54901960780000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="deleteButtonPressed" destination="VSb-c5-JF6" eventType="touchUpInside" id="Du1-og-bhf"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.14168914909999999" green="0.14168914909999999" blue="0.14168914909999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="wMe-pc-3Zj" secondAttribute="trailing" constant="8" id="7h0-P7-I7h"/>
<constraint firstAttribute="height" constant="90" id="AUb-Ft-duN"/>
<constraint firstAttribute="bottom" secondItem="TLY-ak-c4W" secondAttribute="bottom" constant="2" id="L7F-jU-EaK"/>
<constraint firstItem="Wyc-2T-CIk" firstAttribute="centerY" secondItem="m5W-zE-D1T" secondAttribute="centerY" id="MXd-KD-oxZ"/>
<constraint firstItem="wMe-pc-3Zj" firstAttribute="leading" secondItem="Wyc-2T-CIk" secondAttribute="trailing" constant="8" id="PTl-jC-foM"/>
<constraint firstItem="Wyc-2T-CIk" firstAttribute="leading" secondItem="TLY-ak-c4W" secondAttribute="trailing" constant="8" id="a9h-aD-eGM"/>
<constraint firstItem="TLY-ak-c4W" firstAttribute="top" secondItem="m5W-zE-D1T" secondAttribute="top" constant="2" id="cqY-6J-wZ2"/>
<constraint firstItem="wMe-pc-3Zj" firstAttribute="centerY" secondItem="m5W-zE-D1T" secondAttribute="centerY" id="eZm-fE-jDg"/>
<constraint firstItem="TLY-ak-c4W" firstAttribute="leading" secondItem="m5W-zE-D1T" secondAttribute="leading" constant="2" id="q5i-NN-2kA"/>
<constraint firstItem="wMe-pc-3Zj" firstAttribute="width" secondItem="Wyc-2T-CIk" secondAttribute="width" id="wlK-Mg-D9n"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.14168914909999999" green="0.14168914909999999" blue="0.14168914909999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="ubM-g6-UCF" firstAttribute="trailing" secondItem="Ks7-y5-82m" secondAttribute="trailing" id="4FR-Kx-Kfu"/>
<constraint firstItem="ubM-g6-UCF" firstAttribute="trailing" secondItem="m5W-zE-D1T" secondAttribute="trailing" id="DOw-9l-2O1"/>
<constraint firstItem="ubM-g6-UCF" firstAttribute="trailing" secondItem="Djy-MM-jNn" secondAttribute="trailing" id="Ghh-Hs-JzF"/>
<constraint firstItem="Ks7-y5-82m" firstAttribute="top" secondItem="Xrp-e5-Cxl" secondAttribute="top" id="RGy-I1-MVT"/>
<constraint firstItem="ubM-g6-UCF" firstAttribute="bottom" secondItem="Xrp-e5-Cxl" secondAttribute="bottom" id="Y5M-co-2Un"/>
<constraint firstItem="m5W-zE-D1T" firstAttribute="leading" secondItem="ubM-g6-UCF" secondAttribute="leading" id="aPP-aa-cmD"/>
<constraint firstItem="Djy-MM-jNn" firstAttribute="top" secondItem="m5W-zE-D1T" secondAttribute="bottom" id="cNb-ms-LeU"/>
<constraint firstItem="Ks7-y5-82m" firstAttribute="leading" secondItem="Xrp-e5-Cxl" secondAttribute="trailing" id="e46-xz-RV5"/>
<constraint firstItem="Xrp-e5-Cxl" firstAttribute="leading" secondItem="ubM-g6-UCF" secondAttribute="leading" id="hXz-2U-50F"/>
<constraint firstItem="Djy-MM-jNn" firstAttribute="leading" secondItem="ubM-g6-UCF" secondAttribute="leading" id="j6y-an-UAV"/>
<constraint firstItem="Xrp-e5-Cxl" firstAttribute="top" secondItem="Djy-MM-jNn" secondAttribute="bottom" id="jNO-hG-AUn"/>
<constraint firstItem="Ks7-y5-82m" firstAttribute="bottom" secondItem="Xrp-e5-Cxl" secondAttribute="bottom" id="qWb-TH-cFw"/>
<constraint firstItem="ubM-g6-UCF" firstAttribute="top" secondItem="m5W-zE-D1T" secondAttribute="top" id="xpP-XY-r4B"/>
</constraints>
<viewLayoutGuide key="safeArea" id="ubM-g6-UCF"/>
</view>
<nil key="simulatedTopBarMetrics"/>
<nil key="simulatedBottomBarMetrics"/>
<connections>
<outlet property="deleteButton" destination="wMe-pc-3Zj" id="c9L-bH-9gt"/>
<outlet property="imageButtonConstraint" destination="4FR-Kx-Kfu" id="Id8-GZ-b98"/>
<outlet property="imageClearButton" destination="Ks7-y5-82m" id="rML-XC-FO7"/>
<outlet property="imageView" destination="m5W-zE-D1T" id="d1Q-vt-6Y5"/>
<outlet property="imageViewContraint" destination="xpP-XY-r4B" id="Ogg-ty-ELE"/>
<outlet property="newImage" destination="TLY-ak-c4W" id="hP1-M9-g6a"/>
<outlet property="saveButton" destination="Wyc-2T-CIk" id="Z2V-2o-rmp"/>
<outlet property="searchBar" destination="Xrp-e5-Cxl" id="Mhm-u0-vKn"/>
<outlet property="searchBarConstraint" destination="Y5M-co-2Un" id="wUn-uK-n1e"/>
<outlet property="table" destination="Djy-MM-jNn" id="j5C-x9-SNf"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yym-Ts-ne2" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2469.5999999999999" y="1557.5712143928038"/>
</scene> </scene>
</scenes> </scenes>
<resources>
<image name="camera" width="280" height="200"/>
<image name="camera_square" width="220" height="220"/>
<image name="cancel" width="178" height="178"/>
</resources>
<color key="tintColor" red="0.83921568629999999" green="0.9379758883" blue="0.54901960780000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</document> </document>

View File

@ -0,0 +1,142 @@
//
// CameraController.swift
// CapFinder
//
// Created by User on 22.02.18.
// Copyright © 2018 User. All rights reserved.
//
import UIKit
protocol CameraControllerDelegate {
func didCapture(image: UIImage)
func didCancel()
}
class CameraController: UIViewController {
private let imageSize = 299 // New for XCode models, 227 for turicreate
// MARK: Outlets
@IBOutlet weak var imageButton: RoundedButton!
@IBOutlet weak var cropView: CropView!
@IBOutlet weak var cancelButton: RoundedButton!
@IBOutlet weak var cameraView: CameraView! {
didSet {
cameraView.configure()
}
}
var delegate: CameraControllerDelegate?
// MARK: Actions
@IBAction func backButtonPressed() {
delegate?.didCancel()
self.dismiss(animated: true)
}
@IBAction func imageButtonPressed() {
imageButton.isEnabled = false
event("Taking image")
cameraView.capture()
}
// MARK: Life cycle
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
cameraView.delegate = self
imageButton.imageView?.image = UIImage.templateImage(named: "camera")
setTintColor()
cameraView.launch { success, error in
guard let err = error else {
return
}
switch err {
case "No camera access": self.showNoCameraAccessAlert()
case "Camera error": self.showAlert("Unable to capture media")
default: self.showAlert("Error in camera setup")
}
}
self.imageButton.isEnabled = true
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
cameraView.complete()
}
private func setTintColor() {
let tint = AppDelegate.tintColor
cropView.lineColor = tint
imageButton.borderColor = tint
imageButton.imageView?.tintColor = tint
cancelButton.borderColor = tint
cancelButton.set(template: "cancel", with: tint)
}
// MARK: Alerts
private func showNoCameraAccessAlert() {
let alert = UIAlertController(title: "Unable to access the Camera",
message: "To enable access, go to Settings > Privacy > Camera and turn on Camera access for this app.",
preferredStyle: .alert,
blurStyle: .dark)
let okAction = UIAlertAction(title: "OK", style: .cancel, handler: nil)
alert.addAction(okAction)
let settingsAction = UIAlertAction(title: "Settings", style: .default, handler: { _ in
// Take the user to Settings app to possibly change permission.
guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { return }
if UIApplication.shared.canOpenURL(settingsUrl) {
UIApplication.shared.open(settingsUrl, completionHandler: nil)
}
})
alert.addAction(settingsAction)
self.present(alert, animated: true, completion: nil)
}
}
extension CameraController: PhotoCaptureHandlerDelegate {
func didCapture(_ image: UIImage?) {
event("Image captured")
let factor = CGFloat(cropView.relativeSize)
self.dismiss(animated: true)
let size = CGSize(width: imageSize, height: imageSize)
guard let img = image else {
self.error("No image captured")
return
}
guard delegate != nil else {
self.error("No delegate")
return
}
guard let masked = img.crop(factor: factor).circleMasked else {
self.error("Could not mask image")
return
}
// Only use 227 x 227 image
let scaled = masked.resize(to: size)
delegate!.didCapture(image: scaled)
}
}
extension CameraController: Logger {
static var logToken = "[Camera]"
}

View File

@ -0,0 +1,197 @@
//
// CameraView.swift
// CapFinder
//
// Created by User on 07.02.18.
// Copyright © 2018 User. All rights reserved.
//
import UIKit
import AVFoundation
class CameraView: UIView {
// MARK: UIView overrides
/**
Override for AVCapture
*/
override class var layerClass: AnyClass {
return AVCaptureVideoPreviewLayer.self
}
// MARK: Enums
private enum SessionSetupResult {
case success
case notAuthorized
case configurationFailed
}
// MARK: Variables
var delegate: PhotoCaptureHandlerDelegate? {
get {
return photoCaptureProcessor.delegate
}
set {
photoCaptureProcessor.delegate = newValue
}
}
private let session = AVCaptureSession()
private var isSessionRunning = false
/// Communicate with the session and other session objects on this queue.
private let sessionQueue = DispatchQueue(label: "session queue")
private var setupResult: SessionSetupResult = .success
var videoDeviceInput: AVCaptureDeviceInput!
private let photoOutput = AVCapturePhotoOutput()
private let photoCaptureProcessor = PhotoCaptureHandler()
var videoPreviewLayer: AVCaptureVideoPreviewLayer {
return layer as! AVCaptureVideoPreviewLayer
}
// MARK: Life cycle
func configure() {
videoPreviewLayer.session = session
checkPermission()
// Setup the capture session.
sessionQueue.async {
self.configureSession()
}
}
func launch(completionHandler: @escaping (Bool, String?) -> ()) {
sessionQueue.async {
switch self.setupResult {
case .success:
// Only setup observers and start the session running if setup succeeded.
self.session.startRunning()
self.isSessionRunning = self.session.isRunning
case .notAuthorized:
DispatchQueue.main.async {
completionHandler(false, "No camera access")
}
case .configurationFailed:
DispatchQueue.main.async {
completionHandler(false, "Camera error")
}
}
}
}
func complete() {
sessionQueue.async {
if self.setupResult == .success {
self.session.stopRunning()
self.isSessionRunning = self.session.isRunning
}
}
}
// MARK: Photo Capture
func capture() {
sessionQueue.async {
self.photoOutput.capturePhoto(
with: self.photoCaptureProcessor.photoSettings,
delegate: self.photoCaptureProcessor)
}
}
// MARK: Camera permissions
private func checkPermission() {
switch AVCaptureDevice.authorizationStatus(for: .video) {
case .authorized: break
case .notDetermined:
sessionQueue.suspend()
AVCaptureDevice.requestAccess(for: .video, completionHandler: { granted in
if !granted {
self.setupResult = .notAuthorized
}
self.sessionQueue.resume()
})
default:
// The user has previously denied access.
setupResult = .notAuthorized
}
}
// Call this on the session queue.
private func configureSession() {
if setupResult != .success {
return
}
session.beginConfiguration()
/*
We do not create an AVCaptureMovieFileOutput when setting up the session because the
AVCaptureMovieFileOutput does not support movie recording with AVCaptureSession.Preset.Photo.
*/
session.sessionPreset = .photo
// Add video input.
do {
guard let backCameraDevice = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back) else {
print("No camera on device")
setupResult = .configurationFailed
session.commitConfiguration()
return
}
let videoDeviceInput = try AVCaptureDeviceInput(device: backCameraDevice)
if session.canAddInput(videoDeviceInput) {
session.addInput(videoDeviceInput)
self.videoDeviceInput = videoDeviceInput
DispatchQueue.main.async {
self.videoPreviewLayer.connection?.videoOrientation = .portrait
}
} else {
print("Could not add video device input to the session")
setupResult = .configurationFailed
session.commitConfiguration()
return
}
} catch {
print("Could not create video device input: \(error)")
setupResult = .configurationFailed
session.commitConfiguration()
return
}
// Add photo output.
if session.canAddOutput(photoOutput) {
session.addOutput(photoOutput)
photoOutput.isHighResolutionCaptureEnabled = true
photoOutput.isDepthDataDeliveryEnabled = false
photoOutput.isDualCameraDualPhotoDeliveryEnabled = false
photoOutput.isLivePhotoCaptureEnabled = false
} else {
print("Could not add photo output to the session")
setupResult = .configurationFailed
session.commitConfiguration()
return
}
session.commitConfiguration()
}
}

View File

@ -0,0 +1,51 @@
/*
See LICENSE.txt for this samples licensing information.
Abstract:
Photo capture delegate.
*/
import AVFoundation
import Photos
protocol PhotoCaptureHandlerDelegate {
func didCapture(_ image: UIImage?)
}
class PhotoCaptureHandler: NSObject {
var delegate: PhotoCaptureHandlerDelegate?
var photoSettings: AVCapturePhotoSettings {
let photoSettings = AVCapturePhotoSettings()
photoSettings.flashMode = .off
return photoSettings
}
}
extension PhotoCaptureHandler: AVCapturePhotoCaptureDelegate {
/*
This extension includes all the delegate callbacks for AVCapturePhotoCaptureDelegate protocol
*/
func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
guard error == nil else {
print("PhotoCaptureHandler: \(error!)")
delegate?.didCapture(nil)
return
}
guard let cgImage = photo.cgImageRepresentation()?.takeUnretainedValue() else {
print("PhotoCaptureHandler: No image captured")
delegate?.didCapture(nil)
return
}
let image = UIImage(cgImage: cgImage, scale: 1.0, orientation: .right)
DispatchQueue.main.async {
self.delegate?.didCapture(image)
}
}
}

View File

@ -0,0 +1,61 @@
//
// UIAlertControllerExtensions.swift
// CapFinder
//
// Created by User on 23.03.18.
// Copyright © 2018 User. All rights reserved.
//
import Foundation
import UIKit
extension UIAlertController {
private struct AssociatedKeys {
static var blurStyleKey = "UIAlertController.blurStyleKey"
}
public var blurStyle: UIBlurEffect.Style {
get {
return objc_getAssociatedObject(self, &AssociatedKeys.blurStyleKey) as? UIBlurEffect.Style ?? .extraLight
} set (style) {
objc_setAssociatedObject(self, &AssociatedKeys.blurStyleKey, style, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
view.setNeedsLayout()
view.layoutIfNeeded()
}
}
public var cancelButtonColor: UIColor? {
return blurStyle == .dark ? UIColor(red: 28.0/255.0, green: 28.0/255.0, blue: 28.0/255.0, alpha: 1.0) : nil
}
private var visualEffectView: UIVisualEffectView? {
if let presentationController = presentationController, presentationController.responds(to: Selector(("popoverView"))), let view = presentationController.value(forKey: "popoverView") as? UIView // We're on an iPad and visual effect view is in a different place.
{
return view.recursiveSubviews.compactMap({$0 as? UIVisualEffectView}).first
}
return view.recursiveSubviews.compactMap({$0 as? UIVisualEffectView}).first
}
private var cancelActionView: UIView? {
return view.recursiveSubviews.compactMap({
$0 as? UILabel}
).first(where: {
$0.text == actions.first(where: { $0.style == .cancel })?.title
})?.superview?.superview
}
public convenience init(title: String?, message: String?, preferredStyle: UIAlertController.Style, blurStyle: UIBlurEffect.Style) {
self.init(title: title, message: message, preferredStyle: preferredStyle)
self.blurStyle = blurStyle
}
open override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
visualEffectView?.effect = UIBlurEffect(style: blurStyle)
cancelActionView?.backgroundColor = cancelButtonColor
}
}

View File

@ -0,0 +1,82 @@
//
// UIImageExtensions.swift
// CapFinder
//
// Created by User on 13.02.18.
// Copyright © 2018 User. All rights reserved.
//
import Foundation
import UIKit
extension UIImage {
static func templateImage(named: String) -> UIImage {
return UIImage(named: named)!.withRenderingMode(.alwaysTemplate)
}
/**
Resize an image to the target size
*/
func resize(to targetSize: CGSize) -> UIImage {
let rect = CGRect(x: 0, y: 0, width: targetSize.width, height: targetSize.height)
UIGraphicsBeginImageContextWithOptions(targetSize, false, 1.0)
self.draw(in: rect)
let newImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return newImage!
}
/**
Crop an image to a square, centered around the middle of the frame
- parameter factor: The crop factor of the resulting image
- returns: The cropped image
*/
func crop(factor: CGFloat) -> UIImage {
let width = self.size.width * factor
return crop(to: width)
}
/**
Crop an image to a square, centered around the middle of the frame
- parameter size: The height and width of the resulting image
- returns: The cropped image
*/
func crop(to size: CGFloat) -> UIImage {
var rect = CGRect(
x: (self.size.height - size) / 2,
y: (self.size.width - size) / 2,
width: size,
height: size)
rect.origin.x *= scale
rect.origin.y *= scale
rect.size.width *= scale
rect.size.height *= scale
let imageRef = cgImage!.cropping(to: rect)
return UIImage(cgImage: imageRef!, scale: scale, orientation: imageOrientation)
}
/// The (circular) image masked by a circle
var circleMasked: UIImage? {
let width = size.width
let height = size.height
let isPortrait = height > width
let breadth = min(width, height)
let breadthSize = CGSize(width: breadth, height: breadth)
let breadthRect = CGRect(origin: .zero, size: breadthSize)
UIGraphicsBeginImageContextWithOptions(breadthSize, false, scale)
defer { UIGraphicsEndImageContext() }
let x = isPortrait ? 0 : floor((width - height) / 2)
let y = isPortrait ? floor((height - width) / 2) : 0
let rect = CGRect(origin: CGPoint( x: x, y: y), size: breadthSize)
guard let cgImage = cgImage?.cropping(to: rect) else {
return nil
}
UIBezierPath(ovalIn: breadthRect).addClip()
UIImage(cgImage: cgImage, scale: 1, orientation: imageOrientation).draw(in: breadthRect)
return UIGraphicsGetImageFromCurrentImageContext()
}
}

View File

@ -0,0 +1,19 @@
//
// UIViewExtensions.swift
// CapFinder
//
// Created by User on 23.03.18.
// Copyright © 2018 User. All rights reserved.
//
import Foundation
import UIKit
extension UIView {
var recursiveSubviews: [UIView] {
var subviews = self.subviews.compactMap{ $0 }
subviews.forEach { subviews.append(contentsOf: $0.recursiveSubviews) }
return subviews
}
}

View File

@ -0,0 +1,28 @@
//
// ViewControllerExtensions.swift
// CapFinder
//
// Created by User on 18.03.18.
// Copyright © 2018 User. All rights reserved.
//
import Foundation
import UIKit
extension UIViewController {
// MARK: Alerts
/// Present an alert with a message to the user
func showAlert(_ message: String, title: String = "Error") {
let alertController = UIAlertController(
title: title,
message: message,
preferredStyle: .alert,
blurStyle: .dark)
alertController.addAction(UIAlertAction(title: "OK", style: .cancel, handler: nil))
self.present(alertController, animated: true, completion: nil)
}
}

View File

@ -2,8 +2,26 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>dbapi-8-emm</string>
<string>dbapi-2</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>db-n81tx2g638wuffl</string>
</array>
<key>CFBundleURLName</key>
<string></string>
</dict>
</array>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Cap Collector</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@ -28,12 +46,16 @@
<array> <array>
<string>armv7</string> <string>armv7</string>
</array> </array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>NSCameraUsageDescription</key>
<string>Take images to identify matching caps and register new ones</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UISupportedInterfaceOrientations~ipad</key> <key>UISupportedInterfaceOrientations~ipad</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>

Binary file not shown.

View File

@ -0,0 +1,99 @@
//
// RoundedButton.swift
// CapFinder
//
// Created by User on 01.02.18.
// Copyright © 2018 User. All rights reserved.
//
import Foundation
import UIKit
@IBDesignable
class RoundedButton: UIButton {
@IBInspectable var borderColor: UIColor = UIColor.black {
didSet {
layer.borderColor = borderColor.cgColor
}
}
@IBInspectable var borderWidth: CGFloat = 0 {
didSet {
layer.borderWidth = borderWidth
}
}
//Normal state bg and border
@IBInspectable var normalBorderColor: UIColor? {
didSet {
layer.borderColor = normalBorderColor?.cgColor
}
}
@IBInspectable var normalBackgroundColor: UIColor? {
didSet {
setBgColorForState(color: normalBackgroundColor, forState: [])
}
}
//Highlighted state bg and border
@IBInspectable var highlightedBorderColor: UIColor?
@IBInspectable var highlightedBackgroundColor: UIColor? {
didSet {
setBgColorForState(color: highlightedBackgroundColor, forState: .highlighted)
}
}
private func setBgColorForState(color: UIColor?, forState: UIControl.State){
self.backgroundColor = color
// if color != nil {
// self.backgroundColor = color!
// setBackgroundImage(UIImage.imageWithColor(color: color!), for: forState)
// } else {
// setBackgroundImage(nil, for: forState)
// }
}
override func layoutSubviews() {
super.layoutSubviews()
layer.cornerRadius = layer.frame.height / 2
// layer.cornerRadius = min(layer.frame.height, layer.frame.width) / 2
clipsToBounds = true
if borderWidth > 0 {
if state == [] && layer.borderColor == normalBorderColor?.cgColor {
layer.borderColor = normalBorderColor?.cgColor
} else if state == .highlighted && highlightedBorderColor != nil {
layer.borderColor = highlightedBorderColor!.cgColor
}
}
}
}
extension RoundedButton {
func set(template: String, with tint: UIColor) {
self.setImage(UIImage.templateImage(named: template), for: .normal)
self.tintColor = tint
self.borderColor = tint
}
}
//Extension Required by RoundedButton to create UIImage from UIColor
extension UIImage {
class func imageWithColor(color: UIColor) -> UIImage {
let rect: CGRect = CGRect(x: 0, y: 0, width: 1, height: 1)
UIGraphicsBeginImageContextWithOptions(CGSize(width: 1, height: 1), false, 1.0)
color.setFill()
UIRectFill(rect)
let image: UIImage = UIGraphicsGetImageFromCurrentImageContext()!
UIGraphicsEndImageContext()
return image
}
}

View File

@ -0,0 +1,31 @@
//
// RoundedImageView.swift
// CapFinder
//
// Created by User on 22.04.18.
// Copyright © 2018 User. All rights reserved.
//
import UIKit
class RoundedImageView: UIImageView {
@IBInspectable var borderColor: UIColor = UIColor.black {
didSet {
layer.borderColor = borderColor.cgColor
}
}
@IBInspectable var borderWidth: CGFloat = 0 {
didSet {
layer.borderWidth = borderWidth
}
}
override func layoutSubviews() {
super.layoutSubviews()
layer.cornerRadius = layer.frame.height / 2
clipsToBounds = true
}
}

View File

@ -1,25 +0,0 @@
//
// ViewController.swift
// CapCollector
//
// Created by User on 05.05.18.
// Copyright © 2018 CH. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}

BIN
CapCollector/Xcode.mlmodel Normal file

Binary file not shown.

View File

@ -1,2 +1,26 @@
/Users/User/Development/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/ViewController.o /Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/Classifier.o
/Users/User/Development/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/AppDelegate.o /Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/Logger.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/DropBoxController.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/UIViewExtensions.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/DiskManager.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/UIImageExtensions.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/CapImages.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/TableView.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/NameFile.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/AppDelegate.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/ImageSelector.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/CameraController.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/ViewControllerExtensions.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/PhotoCaptureHandler.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/RoundedButton.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/CapNames.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/ImageCell.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/UIAlertControllerExtensions.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/CameraView.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/CropView.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/DropboxDownload.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/RoundedImageView.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/DropboxUpload.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/CapCell.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/Squeezenet.o
/Users/christoph/Documents/GitHub/CapCollector/build/CapCollector/Build/Intermediates.noindex/CapCollector.build/Debug-iphoneos/CapCollector.build/Objects-normal/arm64/Resnet.o

View File

@ -3,8 +3,8 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>LastAccessedDate</key> <key>LastAccessedDate</key>
<date>2018-05-05T06:08:35Z</date> <date>2018-08-16T09:18:02Z</date>
<key>WorkspacePath</key> <key>WorkspacePath</key>
<string>/Users/User/Development/CapCollector/CapCollector.xcodeproj</string> <string>/Users/christoph/Documents/GitHub/CapCollector/CapCollector.xcworkspace</string>
</dict> </dict>
</plist> </plist>

View File

@ -1 +1 @@
Module build session file for module cache at /Users/User/Development/CapCollector/build/ModuleCache.noindex 1534411083.265933: Module build session file for module cache at Path(str: "/Users/christoph/Documents/GitHub/CapCollector/build/ModuleCache.noindex")