Sfoglia il codice sorgente

MediaCollectionViewCell: Move edit checkbox next to image

Soomin Lee 5 anni fa
parent
commit
95eae7b07e
1 ha cambiato i file con 51 aggiunte e 43 eliminazioni
  1. 51 43
      Sources/MediaCategoryCells/MediaCollectionViewCell.xib

+ 51 - 43
Sources/MediaCategoryCells/MediaCollectionViewCell.xib

@@ -20,68 +20,76 @@
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bhw-Aa-3Q7">
                         <rect key="frame" x="0.0" y="0.0" width="480" height="80"/>
                         <subviews>
-                            <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="jwA-4O-tgL">
+                            <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="eJj-AH-F3E">
                                 <rect key="frame" x="0.0" y="0.0" width="480" height="80"/>
                                 <subviews>
-                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="249" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DpW-xo-rll" userLabel="Thumbnail">
-                                        <rect key="frame" x="0.0" y="12" width="56" height="56"/>
-                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="249" verticalHuggingPriority="251" image="checkboxEmpty" translatesAutoresizingMaskIntoConstraints="NO" id="Uhx-qs-Aow">
+                                        <rect key="frame" x="0.0" y="28" width="24" height="24"/>
                                         <constraints>
-                                            <constraint firstAttribute="width" secondItem="DpW-xo-rll" secondAttribute="height" multiplier="1:1" id="K1w-Z8-Rbn"/>
-                                            <constraint firstAttribute="width" constant="56" id="vgz-Bg-lit"/>
+                                            <constraint firstAttribute="width" constant="24" id="mjC-Gz-Bsh"/>
+                                            <constraint firstAttribute="height" constant="24" id="tJy-jX-8lt"/>
                                         </constraints>
                                     </imageView>
-                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="HHK-jR-WLx">
-                                        <rect key="frame" x="64" y="12" width="416" height="56.5"/>
+                                    <stackView opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="752" alignment="center" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="jwA-4O-tgL">
+                                        <rect key="frame" x="4" y="12" width="476" height="56.5"/>
                                         <subviews>
-                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="new" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Klo-Bq-5nI" userLabel="NewLabel">
-                                                <rect key="frame" x="0.0" y="0.0" width="416" height="12"/>
-                                                <fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
-                                                <nil key="textColor"/>
-                                                <nil key="highlightedColor"/>
-                                            </label>
-                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zkn-vN-SN4" userLabel="Titlelabel">
-                                                <rect key="frame" x="0.0" y="16" width="416" height="20.5"/>
-                                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
-                                                <nil key="textColor"/>
-                                                <nil key="highlightedColor"/>
-                                            </label>
-                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5N8-js-t0W" userLabel="descriptionLabel">
-                                                <rect key="frame" x="0.0" y="40.5" width="416" height="16"/>
-                                                <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="13"/>
-                                                <nil key="textColor"/>
-                                                <nil key="highlightedColor"/>
-                                            </label>
+                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="249" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DpW-xo-rll" userLabel="Thumbnail">
+                                                <rect key="frame" x="0.0" y="0.0" width="56" height="56"/>
+                                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" secondItem="DpW-xo-rll" secondAttribute="height" multiplier="1:1" id="K1w-Z8-Rbn"/>
+                                                    <constraint firstAttribute="width" constant="56" id="vgz-Bg-lit"/>
+                                                </constraints>
+                                            </imageView>
+                                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="HHK-jR-WLx">
+                                                <rect key="frame" x="64" y="0.0" width="412" height="56.5"/>
+                                                <subviews>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="new" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Klo-Bq-5nI" userLabel="NewLabel">
+                                                        <rect key="frame" x="0.0" y="0.0" width="412" height="12"/>
+                                                        <fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zkn-vN-SN4" userLabel="Titlelabel">
+                                                        <rect key="frame" x="0.0" y="16" width="412" height="20.5"/>
+                                                        <fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5N8-js-t0W" userLabel="descriptionLabel">
+                                                        <rect key="frame" x="0.0" y="40.5" width="412" height="16"/>
+                                                        <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="13"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                            </stackView>
+                                            <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list" translatesAutoresizingMaskIntoConstraints="NO" id="f9J-sb-sdM">
+                                                <rect key="frame" x="476" y="16" width="24" height="24"/>
+                                                <color key="tintColor" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="24" id="Cdn-hR-SHJ"/>
+                                                    <constraint firstAttribute="height" constant="24" id="EaV-Ae-GP2"/>
+                                                </constraints>
+                                            </imageView>
                                         </subviews>
                                     </stackView>
-                                    <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list" translatesAutoresizingMaskIntoConstraints="NO" id="f9J-sb-sdM">
-                                        <rect key="frame" x="480" y="28" width="24" height="24"/>
-                                        <color key="tintColor" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="24" id="Cdn-hR-SHJ"/>
-                                            <constraint firstAttribute="height" constant="24" id="EaV-Ae-GP2"/>
-                                        </constraints>
-                                    </imageView>
                                 </subviews>
+                                <edgeInsets key="layoutMargins" top="0.0" left="4" bottom="0.0" right="0.0"/>
                             </stackView>
                             <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vQV-tE-gv0">
                                 <rect key="frame" x="0.0" y="0.0" width="480" height="80"/>
                                 <color key="backgroundColor" red="0.94509803920000002" green="0.49019607840000001" blue="0.0" alpha="0.40000000000000002" colorSpace="custom" customColorSpace="sRGB"/>
                             </view>
-                            <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="checkboxEmpty" translatesAutoresizingMaskIntoConstraints="NO" id="Uhx-qs-Aow">
-                                <rect key="frame" x="16" y="28" width="24" height="24"/>
-                            </imageView>
                         </subviews>
                         <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
+                            <constraint firstAttribute="bottom" secondItem="eJj-AH-F3E" secondAttribute="bottom" id="1re-cC-4xs"/>
                             <constraint firstItem="vQV-tE-gv0" firstAttribute="width" secondItem="bhw-Aa-3Q7" secondAttribute="width" id="Dqf-E3-sXZ"/>
-                            <constraint firstItem="Uhx-qs-Aow" firstAttribute="centerY" secondItem="DpW-xo-rll" secondAttribute="centerY" id="Nii-BJ-jmJ"/>
-                            <constraint firstItem="Uhx-qs-Aow" firstAttribute="centerX" secondItem="DpW-xo-rll" secondAttribute="centerX" id="Pid-97-YyF"/>
-                            <constraint firstItem="jwA-4O-tgL" firstAttribute="leading" secondItem="bhw-Aa-3Q7" secondAttribute="leading" id="YQR-FC-YG0"/>
-                            <constraint firstAttribute="bottom" secondItem="jwA-4O-tgL" secondAttribute="bottom" id="cPv-gK-orc"/>
-                            <constraint firstItem="jwA-4O-tgL" firstAttribute="top" secondItem="bhw-Aa-3Q7" secondAttribute="top" id="gXu-Td-kve"/>
+                            <constraint firstAttribute="trailing" secondItem="eJj-AH-F3E" secondAttribute="trailing" id="au8-zQ-pfA"/>
+                            <constraint firstItem="eJj-AH-F3E" firstAttribute="leading" secondItem="bhw-Aa-3Q7" secondAttribute="leading" id="jqw-81-Khq"/>
                             <constraint firstItem="vQV-tE-gv0" firstAttribute="height" secondItem="bhw-Aa-3Q7" secondAttribute="height" id="m5l-X4-Pqt"/>
-                            <constraint firstAttribute="trailing" secondItem="jwA-4O-tgL" secondAttribute="trailing" id="mtd-yR-U0o"/>
+                            <constraint firstItem="eJj-AH-F3E" firstAttribute="top" secondItem="bhw-Aa-3Q7" secondAttribute="top" id="osX-uS-f9J"/>
                             <constraint firstItem="vQV-tE-gv0" firstAttribute="centerY" secondItem="bhw-Aa-3Q7" secondAttribute="centerY" id="pcz-sz-DBh"/>
                             <constraint firstItem="vQV-tE-gv0" firstAttribute="centerX" secondItem="bhw-Aa-3Q7" secondAttribute="centerX" id="xBV-Z6-LrT"/>
                         </constraints>