Skip to content

Commit 7139f18

Browse files
authored
Merge pull request #27 from ipodishima/fix/longFlagName
Fix the Toggle Cell display when the flag name is too long
2 parents 570f4c2 + bdb8924 commit 7139f18

File tree

1 file changed

+31
-16
lines changed

1 file changed

+31
-16
lines changed

RealFlags/Sources/RealFlags/Classes/Browser/Cells/FlagsBrowserToggleCell.xib

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
33
<device id="retina6_1" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
7+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
78
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
89
</dependencies>
910
<objects>
@@ -13,17 +14,11 @@
1314
<rect key="frame" x="0.0" y="0.0" width="414" height="87"/>
1415
<autoresizingMask key="autoresizingMask"/>
1516
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="MbZ-1g-8Rz" id="DPr-rx-ZhZ">
16-
<rect key="frame" x="0.0" y="0.0" width="385.5" height="87"/>
17+
<rect key="frame" x="0.0" y="0.0" width="383.5" height="87"/>
1718
<autoresizingMask key="autoresizingMask"/>
1819
<subviews>
19-
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="W8d-T6-yNd">
20-
<rect key="frame" x="316.5" y="28" width="51" height="31"/>
21-
<connections>
22-
<action selector="didChangeSwitchValue:" destination="MbZ-1g-8Rz" eventType="valueChanged" id="d9B-WI-ssW"/>
23-
</connections>
24-
</switch>
2520
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Vsa-7k-Hfg">
26-
<rect key="frame" x="15" y="10" width="281.5" height="67"/>
21+
<rect key="frame" x="15" y="10" width="353.5" height="67"/>
2722
<subviews>
2823
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nYb-UQ-bMw">
2924
<rect key="frame" x="0.0" y="0.0" width="25" height="67"/>
@@ -44,22 +39,39 @@
4439
</constraints>
4540
</view>
4641
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="VHU-Lf-SzP">
47-
<rect key="frame" x="35" y="0.0" width="246.5" height="67"/>
42+
<rect key="frame" x="35" y="0.0" width="104" height="67"/>
4843
<subviews>
4944
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" text="Title of the cell" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W3Y-sW-Z9m">
50-
<rect key="frame" x="0.0" y="0.0" width="246.5" height="18"/>
45+
<rect key="frame" x="0.0" y="0.0" width="104" height="18"/>
5146
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
5247
<nil key="textColor"/>
5348
<nil key="highlightedColor"/>
5449
</label>
5550
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Subtitle of the cell" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WDc-XH-fYD">
56-
<rect key="frame" x="0.0" y="18" width="246.5" height="49"/>
51+
<rect key="frame" x="0.0" y="18" width="104" height="49"/>
5752
<fontDescription key="fontDescription" type="system" pointSize="12"/>
5853
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
5954
<nil key="highlightedColor"/>
6055
</label>
6156
</subviews>
6257
</stackView>
58+
<view contentMode="scaleToFill" horizontalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="QaK-SF-56N">
59+
<rect key="frame" x="149" y="0.0" width="204.5" height="67"/>
60+
<subviews>
61+
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="W8d-T6-yNd">
62+
<rect key="frame" x="155.5" y="18" width="51" height="31"/>
63+
<connections>
64+
<action selector="didChangeSwitchValue:" destination="MbZ-1g-8Rz" eventType="valueChanged" id="d9B-WI-ssW"/>
65+
</connections>
66+
</switch>
67+
</subviews>
68+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
69+
<constraints>
70+
<constraint firstItem="W8d-T6-yNd" firstAttribute="centerY" secondItem="QaK-SF-56N" secondAttribute="centerY" id="1Is-6O-ynt"/>
71+
<constraint firstAttribute="trailing" secondItem="W8d-T6-yNd" secondAttribute="trailing" id="Czl-7T-5xn"/>
72+
<constraint firstItem="W8d-T6-yNd" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="QaK-SF-56N" secondAttribute="leading" id="XZG-ru-rdq"/>
73+
</constraints>
74+
</view>
6375
</subviews>
6476
<constraints>
6577
<constraint firstAttribute="bottom" secondItem="VHU-Lf-SzP" secondAttribute="bottom" id="o9U-75-y76"/>
@@ -68,12 +80,10 @@
6880
</stackView>
6981
</subviews>
7082
<constraints>
71-
<constraint firstAttribute="trailing" secondItem="W8d-T6-yNd" secondAttribute="trailing" constant="20" id="4QN-ut-7dP"/>
7283
<constraint firstAttribute="bottom" secondItem="Vsa-7k-Hfg" secondAttribute="bottom" constant="10" id="N9a-yF-p7e"/>
73-
<constraint firstItem="W8d-T6-yNd" firstAttribute="leading" secondItem="Vsa-7k-Hfg" secondAttribute="trailing" constant="20" id="Ond-Sv-Oz5"/>
74-
<constraint firstItem="W8d-T6-yNd" firstAttribute="centerY" secondItem="DPr-rx-ZhZ" secondAttribute="centerY" id="RSW-Fx-Q7f"/>
7584
<constraint firstItem="Vsa-7k-Hfg" firstAttribute="leading" secondItem="DPr-rx-ZhZ" secondAttribute="leading" constant="15" id="dXV-c6-tcZ"/>
7685
<constraint firstItem="Vsa-7k-Hfg" firstAttribute="top" secondItem="DPr-rx-ZhZ" secondAttribute="top" constant="10" id="rop-iE-4Jj"/>
86+
<constraint firstAttribute="trailing" secondItem="Vsa-7k-Hfg" secondAttribute="trailing" constant="15" id="th0-aB-PvI"/>
7787
</constraints>
7888
</tableViewCellContentView>
7989
<connections>
@@ -88,4 +98,9 @@
8898
<point key="canvasLocation" x="-748" y="28"/>
8999
</tableViewCell>
90100
</objects>
101+
<resources>
102+
<systemColor name="systemBackgroundColor">
103+
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
104+
</systemColor>
105+
</resources>
91106
</document>

0 commit comments

Comments
 (0)