Simplify UI, update domain

This commit is contained in:
Christoph Hagen 2020-09-20 13:28:22 +02:00
parent f1a36d5cbe
commit 75ebdf59ae
9 changed files with 211 additions and 221 deletions

View File

@ -245,7 +245,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0940;
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = CH;
TargetAttributes = {
CE56CEC9209D81DD00932C01 = {
@ -384,6 +384,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -409,7 +410,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -444,6 +445,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -463,7 +465,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
@ -480,7 +482,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = H8WR4M6QQ4;
INFOPLIST_FILE = CapCollector/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -503,7 +505,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = H8WR4M6QQ4;
INFOPLIST_FILE = CapCollector/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",

View File

@ -9,6 +9,27 @@
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>SQLite (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>SQLite (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>SQLite (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
</dict>
</plist>

View File

@ -60,7 +60,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}
let serverUrl = URL(string: "https://cc.ssl443.org")!
let serverUrl = URL(string: "https://christophhagen.de")!
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
app = self

View File

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="qlf-I7-aOI">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="qlf-I7-aOI">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@ -21,7 +23,7 @@
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="KLt-lS-0bs">
<rect key="frame" x="0.0" y="44" width="375" height="623"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<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"/>
@ -60,6 +62,7 @@
</constraints>
</containerView>
</subviews>
<viewLayoutGuide key="safeArea" id="lmc-ZJ-cgu"/>
<constraints>
<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"/>
@ -73,7 +76,6 @@
<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>
<tabBarItem key="tabBarItem" systemItem="history" id="Cxk-kX-pY9">
<color key="badgeColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -97,7 +99,7 @@
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="interactive" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="h37-NP-KdK">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="cap" rowHeight="100" id="B8D-Az-9Y6" customClass="CapCell" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="375" height="100"/>
@ -114,7 +116,7 @@
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<color key="value" systemColor="secondaryLabelColor"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
@ -124,7 +126,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="# images" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jmW-Bp-iEs">
<rect key="frame" x="106" y="10" width="70" height="20.5"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Some brand with a long name of more than one line" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bRK-Je-2c8">
@ -135,7 +137,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="71 % match" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0S2-Kl-IEy">
<rect key="frame" x="279" y="10" width="88" height="21"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
@ -153,7 +155,7 @@
<constraint firstItem="jmW-Bp-iEs" firstAttribute="top" secondItem="oId-SE-Vio" secondAttribute="top" constant="10" id="yOO-Jh-C4e"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="capImage" destination="Z8g-0m-rCx" id="7vi-yn-4bH"/>
<outlet property="countLabel" destination="jmW-Bp-iEs" id="EEH-6Q-T8x"/>
@ -173,7 +175,7 @@
<action selector="updateInfo:forEvent:" destination="2ro-5c-16N" id="MDf-gM-ErC"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" title="Item" image="circle.grid.hex" catalog="system" id="Bii-kx-Exm">
<barButtonItem key="rightBarButtonItem" title="Item" image="circles.hexagongrid" catalog="system" id="Bii-kx-Exm">
<connections>
<action selector="showMosaic:" destination="2ro-5c-16N" id="TSM-H0-ljH"/>
</connections>
@ -195,7 +197,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
<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">
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="75a-Qa-tvd" userLabel="Embedding Camera View">
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JR1-Im-yOB" userLabel="PicturePreview" customClass="CameraView" customModule="CapCollector" customModuleProvider="target">
@ -214,7 +216,7 @@
<real key="value" value="0.40000000000000002"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="lineColor">
<color key="value" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="value" systemColor="systemBlueColor"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="lineWidth">
<real key="value" value="2"/>
@ -231,23 +233,26 @@
<constraint firstItem="RWS-jY-sNX" firstAttribute="leading" secondItem="JR1-Im-yOB" secondAttribute="leading" id="xq5-uK-Qgb"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g39-Tf-sLE" userLabel="Blurred Bottom Bar">
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mGZ-Eq-3Pr" userLabel="Bottom Bar">
<rect key="frame" x="0.0" y="567" width="375" height="80"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mcC-De-ygo">
<rect key="frame" x="306" y="23.5" width="53" height="33"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<state key="normal" title="Cancel"/>
<connections>
<action selector="backButtonPressed" destination="oDF-NZ-j9r" eventType="touchUpInside" id="ZKP-ty-JVi"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vaw-Dn-P4X">
<rect key="frame" x="142.5" y="8" width="90" height="64"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="Q93-lY-5IF">
<rect key="frame" x="0.0" y="0.0" width="375" height="80"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
<constraints>
<constraint firstAttribute="width" secondItem="Vaw-Dn-P4X" secondAttribute="height" multiplier="14:10" id="dOA-ls-qFN"/>
<constraint firstAttribute="height" constant="80" id="Mw4-4x-jsf"/>
</constraints>
<state key="normal" image="camera"/>
<blurEffect style="regular"/>
</visualEffectView>
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vaw-Dn-P4X">
<rect key="frame" x="147.5" y="567" width="80" height="80"/>
<constraints>
<constraint firstAttribute="width" secondItem="Vaw-Dn-P4X" secondAttribute="height" multiplier="1:1" id="dOA-ls-qFN"/>
</constraints>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<state key="normal" image="camera" catalog="system">
<preferredSymbolConfiguration key="preferredSymbolConfiguration" scale="large" weight="regular"/>
</state>
<state key="disabled">
<color key="titleColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
@ -258,35 +263,40 @@
<action selector="imageButtonPressed" destination="oDF-NZ-j9r" eventType="touchUpInside" id="101-8q-Ys4"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mcC-De-ygo">
<rect key="frame" x="295" y="567" width="80" height="80"/>
<constraints>
<constraint firstItem="Vaw-Dn-P4X" firstAttribute="top" secondItem="g39-Tf-sLE" secondAttribute="top" constant="8" id="BV2-8C-F2g"/>
<constraint firstItem="Vaw-Dn-P4X" firstAttribute="centerX" secondItem="g39-Tf-sLE" secondAttribute="centerX" id="DkL-oQ-SD4"/>
<constraint firstItem="Vaw-Dn-P4X" firstAttribute="centerY" secondItem="g39-Tf-sLE" secondAttribute="centerY" id="E0H-oN-bYZ"/>
<constraint firstItem="mcC-De-ygo" firstAttribute="centerY" secondItem="g39-Tf-sLE" secondAttribute="centerY" id="Twn-l2-8JD"/>
<constraint firstAttribute="height" constant="80" id="V7j-cT-OeI"/>
<constraint firstAttribute="trailing" secondItem="mcC-De-ygo" secondAttribute="trailing" constant="16" id="xC1-3e-wwW"/>
<constraint firstItem="mcC-De-ygo" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Vaw-Dn-P4X" secondAttribute="trailing" constant="8" id="xM9-WS-89R"/>
<constraint firstAttribute="width" secondItem="mcC-De-ygo" secondAttribute="height" multiplier="1:1" id="sCS-gR-a47"/>
</constraints>
</view>
<state key="normal" image="xmark" catalog="system">
<preferredSymbolConfiguration key="preferredSymbolConfiguration" scale="large"/>
</state>
<connections>
<action selector="backButtonPressed" destination="oDF-NZ-j9r" eventType="touchUpInside" id="ZKP-ty-JVi"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.14168914909999999" green="0.14168914909999999" blue="0.14168914909999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="oi0-LU-PyW"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<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="g39-Tf-sLE" firstAttribute="leading" secondItem="oi0-LU-PyW" secondAttribute="leading" id="Xvu-7U-zal"/>
<constraint firstItem="oi0-LU-PyW" firstAttribute="bottom" secondItem="g39-Tf-sLE" secondAttribute="bottom" id="mpB-ZM-BER"/>
<constraint firstItem="oi0-LU-PyW" firstAttribute="trailing" secondItem="g39-Tf-sLE" secondAttribute="trailing" id="ojr-F5-WV2"/>
<constraint firstItem="mGZ-Eq-3Pr" firstAttribute="leading" secondItem="oi0-LU-PyW" secondAttribute="leading" id="6KA-j9-M2J"/>
<constraint firstItem="Vaw-Dn-P4X" firstAttribute="bottom" secondItem="mGZ-Eq-3Pr" secondAttribute="bottom" id="6MT-0x-PCE"/>
<constraint firstItem="Vaw-Dn-P4X" firstAttribute="centerX" secondItem="oi0-LU-PyW" secondAttribute="centerX" id="baa-SQ-aA8"/>
<constraint firstItem="mcC-De-ygo" firstAttribute="bottom" secondItem="mGZ-Eq-3Pr" secondAttribute="bottom" id="dpX-8L-TKB"/>
<constraint firstItem="mcC-De-ygo" firstAttribute="top" secondItem="mGZ-Eq-3Pr" secondAttribute="top" id="e4q-pi-Iby"/>
<constraint firstItem="mcC-De-ygo" firstAttribute="trailing" secondItem="mGZ-Eq-3Pr" secondAttribute="trailing" id="eOt-AO-Kwc"/>
<constraint firstItem="oi0-LU-PyW" firstAttribute="trailing" secondItem="mGZ-Eq-3Pr" secondAttribute="trailing" id="fq6-bZ-kzu"/>
<constraint firstItem="Vaw-Dn-P4X" firstAttribute="top" secondItem="mGZ-Eq-3Pr" secondAttribute="top" id="nSi-IN-buo"/>
<constraint firstItem="75a-Qa-tvd" firstAttribute="top" secondItem="oi0-LU-PyW" secondAttribute="top" id="uOs-bC-Ham"/>
<constraint firstItem="oi0-LU-PyW" firstAttribute="bottom" secondItem="mGZ-Eq-3Pr" secondAttribute="bottom" id="vRz-6U-FKY"/>
<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="bottomBar" destination="g39-Tf-sLE" id="pKj-b2-8Q0"/>
<outlet property="cameraView" destination="JR1-Im-yOB" id="qau-yi-xCB"/>
<outlet property="cancelButton" destination="mcC-De-ygo" id="Rdr-gp-sDT"/>
<outlet property="cropView" destination="RWS-jY-sNX" id="9OR-8z-a1p"/>
@ -309,14 +319,14 @@
<rect key="frame" x="0.0" y="44" width="375" height="623"/>
</scrollView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="WAE-if-wuA"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="TCx-cV-mMG" firstAttribute="top" secondItem="WAE-if-wuA" secondAttribute="top" id="C5g-UD-eI2"/>
<constraint firstItem="WAE-if-wuA" firstAttribute="bottom" secondItem="TCx-cV-mMG" secondAttribute="bottom" id="J5D-Xs-Unl"/>
<constraint firstItem="TCx-cV-mMG" firstAttribute="leading" secondItem="WAE-if-wuA" secondAttribute="leading" id="fXw-7M-B0G"/>
<constraint firstItem="WAE-if-wuA" firstAttribute="trailing" secondItem="TCx-cV-mMG" secondAttribute="trailing" id="sY8-ka-loB"/>
</constraints>
<viewLayoutGuide key="safeArea" id="WAE-if-wuA"/>
</view>
<navigationItem key="navigationItem" id="bdd-GD-zBH">
<barButtonItem key="rightBarButtonItem" title="Colors" id="0qm-Vt-S3s">
@ -341,7 +351,7 @@
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="LcF-G6-Sln">
<rect key="frame" x="0.0" y="0.0" width="150" height="310"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="secondarySystemBackgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" systemColor="secondarySystemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="checkmark" indentationWidth="10" reuseIdentifier="SortCell" textLabel="2cU-Pz-MYZ" rowHeight="40" style="IBUITableViewCellStyleDefault" id="vYb-0s-NQp">
<rect key="frame" x="0.0" y="73.5" width="150" height="40"/>
@ -359,7 +369,7 @@
</label>
</subviews>
</tableViewCellContentView>
<color key="backgroundColor" cocoaTouchSystemColor="tableCellGroupedBackgroundColor"/>
<color key="backgroundColor" systemColor="tableCellGroupedBackgroundColor"/>
</tableViewCell>
</prototypes>
<sections/>
@ -397,7 +407,23 @@
</scenes>
<resources>
<image name="arrow.clockwise.icloud" catalog="system" width="128" height="88"/>
<image name="camera" width="280" height="200"/>
<image name="circle.grid.hex" catalog="system" width="128" height="112"/>
<image name="camera" catalog="system" width="128" height="94"/>
<image name="circles.hexagongrid" catalog="system" width="128" height="112"/>
<image name="xmark" catalog="system" width="128" height="113"/>
<systemColor name="secondaryLabelColor">
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="secondarySystemBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBlueColor">
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="tableCellGroupedBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -25,8 +25,6 @@ class CameraController: UIViewController {
@IBOutlet weak var cancelButton: UIButton!
@IBOutlet weak var bottomBar: UIView!
@IBOutlet weak var cameraView: CameraView! {
didSet {
cameraView.configure()
@ -67,8 +65,6 @@ class CameraController: UIViewController {
super.viewWillAppear(animated)
cameraView.delegate = self
imageButton.imageView?.image = UIImage.templateImage(named: "camera")
setTintColor()
cameraView.launch { success, error in
guard let err = error else {
@ -88,27 +84,6 @@ class CameraController: UIViewController {
cameraView.complete()
}
private func setTintColor() {
let blur = UIBlurEffect(style: .systemThinMaterial)
let a = UIVisualEffectView(effect: blur)
a.translatesAutoresizingMaskIntoConstraints = false
bottomBar.backgroundColor = nil
bottomBar.insertSubview(a, at: 0)
//bottomBar.addSubview(a)
let t = bottomBar.topAnchor.constraint(equalTo: a.topAnchor)
let b = bottomBar.bottomAnchor.constraint(equalTo: a.bottomAnchor)
let l = bottomBar.leadingAnchor.constraint(equalTo: a.leadingAnchor)
let r = bottomBar.trailingAnchor.constraint(equalTo: a.trailingAnchor)
bottomBar.addConstraints([t,b,l,r])
//let tint = AppDelegate.tintColor
//cropView.lineColor = tint
//imageButton.borderColor = tint
imageButton.imageView?.tintColor = .systemBlue
//cancelButton.borderColor = tint
//cancelButton.set(template: "cancel", with: tint)
}
private func giveFeedback(_ style: UIImpactFeedbackGenerator.FeedbackStyle) {
let generator = UIImpactFeedbackGenerator(style: style)
generator.impactOccurred()

View File

@ -33,23 +33,25 @@ class SearchAndDisplayAccessory: PassthroughView {
// MARK: - Outlets
@IBOutlet weak var newImageView: PassthroughView!
@IBOutlet weak var capImage: RoundedImageView!
@IBOutlet weak var saveButton: UIButton!
@IBOutlet weak var deleteButton: UIButton!
@IBOutlet weak var cameraButton: UIButton!
@IBOutlet weak var searchBar: UISearchBar!
@IBOutlet weak var imageHeightContraint: NSLayoutConstraint!
// MARK: - Actions
@IBAction func cameraButtonPressed() {
if isShowingCapImage {
discardImage()
} else {
delegate?.capAccessoryCameraButtonPressed()
}
}
@IBAction func saveButtonPressed() {
if let image = capImage.image {
@ -57,24 +59,20 @@ class SearchAndDisplayAccessory: PassthroughView {
}
}
@IBAction func cancelButtonPressed() {
discardImage()
}
// MARK: - Variables
var view: UIView?
weak var blurView: UIVisualEffectView?
weak var currentBlurContraint: NSLayoutConstraint?
weak var delegate: CapAccessoryDelegate?
var currentImage: UIImage? {
capImage.image
}
var isShowingCapImage: Bool {
capImage.image != nil
}
// MARK: - Setup
convenience init(width: CGFloat) {
@ -98,29 +96,11 @@ class SearchAndDisplayAccessory: PassthroughView {
//view!.autoresizingMask = .flexibleHeight
addSubview(view!)
let blur = UIBlurEffect(style: .systemThinMaterial)
let blurView = UIVisualEffectView(effect: blur)
self.blurView = blurView
blurView.translatesAutoresizingMaskIntoConstraints = false
blurView.isUserInteractionEnabled = false
insertSubview(blurView, at: 0)
let t = searchBar.topAnchor.constraint(equalTo: blurView.topAnchor)
let b = searchBar.bottomAnchor.constraint(equalTo: blurView.bottomAnchor)
let l = leadingAnchor.constraint(equalTo: blurView.leadingAnchor)
let r = trailingAnchor.constraint(equalTo: blurView.trailingAnchor)
addConstraints([t, b, l, r])
currentBlurContraint = t
self.newImageView.alpha = 0
self.newImageView.isHidden = true
hideImageView()
searchBar.text = nil
searchBar.setShowsCancelButton(false, animated: false)
searchBar.delegate = self
cameraButton.setImage(UIImage.templateImage(named: "camera_square"), for: .normal)
}
// MARK: Search bar
@ -132,15 +112,14 @@ class SearchAndDisplayAccessory: PassthroughView {
// MARK: Cap image
func showImageView(with image: UIImage, isUnlocked: Bool) {
func showImageView(with image: UIImage) {
capImage.image = image
cameraButton.setImage(UIImage(systemName: "xmark"), for: .normal)
saveButton.isHidden = !isUnlocked
saveButton.isEnabled = isUnlocked
let text = isUnlocked ? "Delete" : "Clear image"
deleteButton.setTitle(text, for: .normal)
showImageView()
imageHeightContraint.constant = 90
capImage.alpha = 1
capImage.isHidden = false
saveButton.isHidden = false
}
func discardImage() {
@ -152,24 +131,13 @@ class SearchAndDisplayAccessory: PassthroughView {
}
func hideImageView() {
currentBlurContraint?.isActive = false
let t = searchBar.topAnchor.constraint(equalTo: blurView!.topAnchor)
addConstraint(t)
currentBlurContraint = t
capImage.image = nil
cameraButton.setImage(UIImage(systemName: "camera"), for: .normal)
self.newImageView.alpha = 0
self.newImageView.isHidden = true
self.capImage.image = nil
}
private func showImageView() {
currentBlurContraint?.isActive = false
let t = blurView!.topAnchor.constraint(equalTo: saveButton.topAnchor, constant: -8)
addConstraint(t)
currentBlurContraint = t
self.newImageView.isHidden = false
self.newImageView.alpha = 1
//imageHeightContraint.constant = 0
capImage.alpha = 0
capImage.isHidden = true
saveButton.isHidden = true
}
}

View File

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -11,8 +13,7 @@
<connections>
<outlet property="cameraButton" destination="bIA-eq-Tn5" id="r0F-0j-Ve9"/>
<outlet property="capImage" destination="vQm-nH-J8o" id="bQK-Vu-Z1U"/>
<outlet property="deleteButton" destination="qhB-Sd-K8H" id="oym-9o-1m3"/>
<outlet property="newImageView" destination="0wK-yR-rO9" id="Gi3-I6-Xv9"/>
<outlet property="imageHeightContraint" destination="Phy-Uy-08W" id="gc0-1X-MIz"/>
<outlet property="saveButton" destination="dt5-LD-28a" id="IYT-eN-3lb"/>
<outlet property="searchBar" destination="bCh-7y-t0w" id="8Tt-4h-Fkg"/>
</connections>
@ -22,96 +23,90 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="145"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B0c-fn-aK3">
<rect key="frame" x="0.0" y="90" width="414" height="55"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="Arf-oz-vtV">
<rect key="frame" x="0.0" y="0.0" width="414" height="55"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
<blurEffect style="regular"/>
</visualEffectView>
<searchBar contentMode="redraw" searchBarStyle="minimal" placeholder="Search caps" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bCh-7y-t0w">
<rect key="frame" x="0.0" y="89" width="358" height="56"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardAppearance="alert" returnKeyType="search" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/>
<rect key="frame" x="0.0" y="90" width="359" height="55"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" 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="bIA-eq-Tn5">
<rect key="frame" x="358" y="89" width="56" height="56"/>
<constraints>
<constraint firstAttribute="width" secondItem="bIA-eq-Tn5" secondAttribute="height" multiplier="1:1" id="O09-ww-bHE"/>
<constraint firstAttribute="height" constant="56" id="Y3N-l5-d94"/>
</constraints>
<inset key="imageEdgeInsets" minX="5" minY="5" maxX="5" maxY="5"/>
<state key="normal" image="camera_square"/>
<connections>
<action selector="cameraButtonPressed" destination="-1" eventType="touchUpInside" id="ooo-b8-Atj"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0wK-yR-rO9">
<rect key="frame" x="0.0" y="-1" width="414" height="90"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="vQm-nH-J8o" customClass="RoundedImageView" customModule="CapCollector" customModuleProvider="target">
<rect key="frame" x="2" y="2" width="86" height="86"/>
<rect key="frame" x="5" y="0.0" width="90" height="90"/>
<constraints>
<constraint firstAttribute="width" secondItem="vQm-nH-J8o" secondAttribute="height" multiplier="1:1" id="WHb-tV-k4S"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<color key="value" systemColor="secondaryLabelColor"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dt5-LD-28a">
<rect key="frame" x="96" y="60" width="151" height="30"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dt5-LD-28a" userLabel="Save Button">
<rect key="frame" x="5" y="0.0" width="90" height="90"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="Boy-dJ-2BJ"/>
<constraint firstAttribute="height" constant="90" id="Phy-Uy-08W"/>
</constraints>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<state key="normal" title="Save"/>
<connections>
<action selector="saveButtonPressed" destination="-1" eventType="touchUpInside" id="O49-6L-mNY"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qhB-Sd-K8H">
<rect key="frame" x="255" y="58.5" width="151" height="33"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<state key="normal" title="Delete"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bIA-eq-Tn5" userLabel="Camera/Clear Button">
<rect key="frame" x="359" y="90" width="55" height="55"/>
<constraints>
<constraint firstAttribute="width" secondItem="bIA-eq-Tn5" secondAttribute="height" multiplier="1:1" id="O09-ww-bHE"/>
</constraints>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle0"/>
<state key="normal" image="camera" catalog="system">
<preferredSymbolConfiguration key="preferredSymbolConfiguration" scale="large"/>
</state>
<connections>
<action selector="cancelButtonPressed" destination="-1" eventType="touchUpInside" id="4Sm-nV-aOd"/>
<action selector="cameraButtonPressed" destination="-1" eventType="touchUpInside" id="ooo-b8-Atj"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<constraints>
<constraint firstItem="vQm-nH-J8o" firstAttribute="leading" secondItem="0wK-yR-rO9" secondAttribute="leading" constant="2" id="6q2-Lc-eIF"/>
<constraint firstItem="dt5-LD-28a" firstAttribute="leading" secondItem="vQm-nH-J8o" secondAttribute="trailing" constant="8" id="OUT-X8-cxn"/>
<constraint firstAttribute="bottom" secondItem="vQm-nH-J8o" secondAttribute="bottom" constant="2" id="P8h-BA-8Yc"/>
<constraint firstAttribute="height" constant="90" id="Rsk-qm-0WZ"/>
<constraint firstAttribute="trailing" secondItem="qhB-Sd-K8H" secondAttribute="trailing" constant="8" id="fzn-7b-WrO"/>
<constraint firstItem="vQm-nH-J8o" firstAttribute="top" secondItem="0wK-yR-rO9" secondAttribute="top" constant="2" id="h1D-Ut-lnp"/>
<constraint firstAttribute="bottom" secondItem="dt5-LD-28a" secondAttribute="bottom" id="wFi-0u-ian"/>
<constraint firstItem="qhB-Sd-K8H" firstAttribute="leading" secondItem="dt5-LD-28a" secondAttribute="trailing" constant="8" id="y1c-g7-5zg"/>
<constraint firstItem="qhB-Sd-K8H" firstAttribute="centerY" secondItem="dt5-LD-28a" secondAttribute="centerY" id="yhy-DU-ReF"/>
<constraint firstItem="qhB-Sd-K8H" firstAttribute="width" secondItem="dt5-LD-28a" secondAttribute="width" id="zpv-6V-gXr"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="dt5-LD-28a" firstAttribute="top" secondItem="vQm-nH-J8o" secondAttribute="top" id="0fL-ow-Unw"/>
<constraint firstItem="dt5-LD-28a" firstAttribute="leading" secondItem="vQm-nH-J8o" secondAttribute="leading" id="BDw-lR-hYd"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="B0c-fn-aK3" secondAttribute="bottom" id="Cbb-yb-0av"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="bIA-eq-Tn5" secondAttribute="bottom" id="Geo-F0-pdI"/>
<constraint firstItem="bIA-eq-Tn5" firstAttribute="top" secondItem="bCh-7y-t0w" secondAttribute="top" id="IiT-eG-qfb"/>
<constraint firstItem="vQm-nH-J8o" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="5" id="Kf4-2d-yxI"/>
<constraint firstItem="bCh-7y-t0w" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="M9M-He-vxM"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="top" secondItem="0wK-yR-rO9" secondAttribute="top" constant="1" id="Uyp-J7-bKr"/>
<constraint firstItem="vQm-nH-J8o" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="PPc-Zp-Vty"/>
<constraint firstItem="B0c-fn-aK3" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="Pp8-wt-rM7"/>
<constraint firstItem="dt5-LD-28a" firstAttribute="bottom" secondItem="vQm-nH-J8o" secondAttribute="bottom" id="VD3-fH-dsS"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="B0c-fn-aK3" secondAttribute="trailing" id="bri-jC-TDo"/>
<constraint firstItem="dt5-LD-28a" firstAttribute="trailing" secondItem="vQm-nH-J8o" secondAttribute="trailing" id="eg2-RT-iVc"/>
<constraint firstItem="bIA-eq-Tn5" firstAttribute="leading" secondItem="bCh-7y-t0w" secondAttribute="trailing" id="i7w-LO-9lv"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="0wK-yR-rO9" secondAttribute="trailing" id="iWS-vI-RAT"/>
<constraint firstItem="bCh-7y-t0w" firstAttribute="top" secondItem="0wK-yR-rO9" secondAttribute="bottom" id="iab-RT-0nN"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="bIA-eq-Tn5" secondAttribute="trailing" id="kQV-mX-EoD"/>
<constraint firstItem="B0c-fn-aK3" firstAttribute="top" secondItem="bCh-7y-t0w" secondAttribute="top" id="l7d-ZC-pNp"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="bCh-7y-t0w" secondAttribute="bottom" id="r8c-kO-KT5"/>
<constraint firstItem="0wK-yR-rO9" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="rd3-iN-jtD"/>
<constraint firstItem="bCh-7y-t0w" firstAttribute="top" secondItem="vQm-nH-J8o" secondAttribute="bottom" id="tBl-Ig-g9a"/>
</constraints>
<nil key="simulatedTopBarMetrics"/>
<nil key="simulatedBottomBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<point key="canvasLocation" x="97.5" y="105.625"/>
<point key="canvasLocation" x="96" y="104.7976011994003"/>
</view>
</objects>
<resources>
<image name="camera_square" width="220" height="220"/>
<image name="camera" catalog="system" width="128" height="94"/>
<systemColor name="secondaryLabelColor">
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>

View File

@ -198,8 +198,8 @@ class TableView: UITableViewController {
private func updateNavigationItemTitleView() {
DispatchQueue.main.async {
self.titleLabel.text = self.titleText
self.subtitleLabel.text = self.subtitleText
self.titleLabel?.text = self.titleText
self.subtitleLabel?.text = self.subtitleText
}
}
@ -249,7 +249,7 @@ class TableView: UITableViewController {
return
}
let thumbnail = Cap.thumbnail(for: image)
app.storage.save(thumbnail: thumbnail, for: id)
_ = app.storage.save(thumbnail: thumbnail, for: id)
}
if group.wait(timeout: .now() + .seconds(30)) != .success {
self.log("Timed out waiting for thumbnails to be generated")
@ -302,7 +302,7 @@ class TableView: UITableViewController {
guard let color = image.averageColor(context: context) else {
return
}
app.database.set(color: color, for: id)
_ = app.database.set(color: color, for: id)
}
if group.wait(timeout: .now() + .seconds(30)) != .success {
self.log("Timed out waiting for colors to be generated")
@ -812,7 +812,7 @@ extension TableView: CameraControllerDelegate {
func didCapture(image: UIImage) {
guard let cap = capToAddImageTo else {
accessory!.showImageView(with: image, isUnlocked: isUnlocked)
accessory!.showImageView(with: image)
classify(image: image)
return
}
@ -1063,6 +1063,9 @@ extension TableView: CapAccessoryDelegate {
}
func capAccessory(shouldSave image: UIImage) {
guard isUnlocked else {
return
}
saveNewCap(for: image)
}