Skip to content

Commit 8165f3b

Browse files
authored
Merge pull request #74 from MasamiSuzuki/hotfix-weather-container
change Weather Container View AutoLayout
2 parents 350a2ef + abb73cc commit 8165f3b

File tree

1 file changed

+33
-13
lines changed

1 file changed

+33
-13
lines changed

SwiftWeather/Base.lproj/Main.storyboard

+33-13
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<dependencies>
77
<deployment identifier="iOS"/>
88
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
9+
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
910
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
1011
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1112
</dependencies>
@@ -37,10 +38,10 @@
3738
<rect key="frame" x="0.0" y="492" width="375" height="115"/>
3839
<subviews>
3940
<stackView opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="314" placeholderIntrinsicHeight="115" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="rzR-3u-MJe">
40-
<rect key="frame" x="30.5" y="0.0" width="314" height="115"/>
41+
<rect key="frame" x="-143.5" y="0.0" width="663" height="115"/>
4142
<subviews>
4243
<stackView opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="142" placeholderIntrinsicHeight="115" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="wXV-Go-iDR">
43-
<rect key="frame" x="0.0" y="0.0" width="142" height="115"/>
44+
<rect key="frame" x="0.0" y="0.0" width="319" height="115"/>
4445
<subviews>
4546
<view contentMode="scaleToFill" placeholderIntrinsicWidth="56" placeholderIntrinsicHeight="115" translatesAutoresizingMaskIntoConstraints="NO" id="y4d-hQ-IEP" customClass="ForecastView" customModule="SwiftWeather" customModuleProvider="target">
4647
<rect key="frame" x="0.0" y="0.0" width="56" height="115"/>
@@ -56,7 +57,7 @@
5657
</userDefinedRuntimeAttributes>
5758
</view>
5859
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X03-jw-bPo" customClass="ForecastView" customModule="SwiftWeather" customModuleProvider="target">
59-
<rect key="frame" x="86" y="0.0" width="56" height="115"/>
60+
<rect key="frame" x="86" y="0.0" width="233" height="115"/>
6061
<userDefinedRuntimeAttributes>
6162
<userDefinedRuntimeAttribute type="color" keyPath="bgColor">
6263
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
@@ -72,7 +73,7 @@
7273
</constraints>
7374
</stackView>
7475
<stackView opaque="NO" contentMode="scaleToFill" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="6LM-Ly-chv">
75-
<rect key="frame" x="172" y="0.0" width="142" height="115"/>
76+
<rect key="frame" x="349" y="0.0" width="314" height="115"/>
7677
<subviews>
7778
<view contentMode="scaleToFill" placeholderIntrinsicWidth="56" placeholderIntrinsicHeight="115" translatesAutoresizingMaskIntoConstraints="NO" id="8G3-c1-MSy" customClass="ForecastView" customModule="SwiftWeather" customModuleProvider="target">
7879
<rect key="frame" x="0.0" y="0.0" width="56" height="115"/>
@@ -86,7 +87,7 @@
8687
</userDefinedRuntimeAttributes>
8788
</view>
8889
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mjK-Yg-kU1" customClass="ForecastView" customModule="SwiftWeather" customModuleProvider="target">
89-
<rect key="frame" x="86" y="0.0" width="56" height="115"/>
90+
<rect key="frame" x="86" y="0.0" width="228" height="115"/>
9091
<userDefinedRuntimeAttributes>
9192
<userDefinedRuntimeAttribute type="color" keyPath="bgColor">
9293
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
@@ -118,19 +119,19 @@
118119
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="rnC-Hz-RdO">
119120
<rect key="frame" x="104.5" y="0.0" width="166" height="345"/>
120121
<subviews>
121-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Melbourne" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="COR-kZ-hOu">
122+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Melbourne" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="COR-kZ-hOu">
122123
<rect key="frame" x="0.0" y="0.0" width="166" height="43"/>
123124
<fontDescription key="fontDescription" type="system" pointSize="36"/>
124125
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
125126
<nil key="highlightedColor"/>
126127
</label>
127-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hId-DS-ttH">
128+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="749" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="72" translatesAutoresizingMaskIntoConstraints="NO" id="hId-DS-ttH">
128129
<rect key="frame" x="3.5" y="43" width="159.5" height="208.5"/>
129130
<fontDescription key="fontDescription" name="WeatherIcons-Regular" family="Weather Icons" pointSize="144"/>
130131
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
131132
<nil key="highlightedColor"/>
132133
</label>
133-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="7" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lFc-pa-Aur">
134+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="7" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="32" translatesAutoresizingMaskIntoConstraints="NO" id="lFc-pa-Aur">
134135
<rect key="frame" x="47.5" y="251.5" width="71" height="93.5"/>
135136
<fontDescription key="fontDescription" name="WeatherIcons-Regular" family="Weather Icons" pointSize="64"/>
136137
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -141,15 +142,24 @@
141142
</subviews>
142143
<constraints>
143144
<constraint firstItem="rnC-Hz-RdO" firstAttribute="top" secondItem="gh8-e9-Cg0" secondAttribute="top" id="291-K2-pTz"/>
144-
<constraint firstAttribute="height" constant="345" id="9yX-32-Js5"/>
145145
<constraint firstItem="rnC-Hz-RdO" firstAttribute="centerX" secondItem="gh8-e9-Cg0" secondAttribute="centerX" id="GTq-Sa-V2d"/>
146146
<constraint firstItem="rnC-Hz-RdO" firstAttribute="height" secondItem="gh8-e9-Cg0" secondAttribute="height" id="WXq-yn-P2E"/>
147+
<constraint firstAttribute="width" secondItem="gh8-e9-Cg0" secondAttribute="height" multiplier="25:23" id="cEm-xC-5cF"/>
147148
</constraints>
149+
<variation key="default">
150+
<mask key="constraints">
151+
<exclude reference="cEm-xC-5cF"/>
152+
</mask>
153+
</variation>
154+
<variation key="heightClass=regular">
155+
<mask key="constraints">
156+
<include reference="cEm-xC-5cF"/>
157+
</mask>
158+
</variation>
148159
</view>
149160
</subviews>
150161
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.40000000000000002" colorSpace="custom" customColorSpace="sRGB"/>
151162
<constraints>
152-
<constraint firstItem="gh8-e9-Cg0" firstAttribute="centerY" secondItem="8LB-3C-fUZ" secondAttribute="centerY" id="32j-YN-mOd"/>
153163
<constraint firstItem="WCS-fc-TZZ" firstAttribute="width" secondItem="8LB-3C-fUZ" secondAttribute="width" multiplier="0.5" id="3IU-Kj-HHc"/>
154164
<constraint firstItem="gh8-e9-Cg0" firstAttribute="width" secondItem="8LB-3C-fUZ" secondAttribute="width" priority="750" id="6ed-kO-L91"/>
155165
<constraint firstItem="gh8-e9-Cg0" firstAttribute="centerX" secondItem="8LB-3C-fUZ" secondAttribute="centerX" priority="750" id="7Q8-76-OLC"/>
@@ -159,15 +169,19 @@
159169
<constraint firstItem="gh8-e9-Cg0" firstAttribute="top" secondItem="8LB-3C-fUZ" secondAttribute="top" priority="750" constant="88" id="P70-Li-xl4"/>
160170
<constraint firstItem="WCS-fc-TZZ" firstAttribute="centerX" secondItem="8LB-3C-fUZ" secondAttribute="centerX" priority="750" id="Xsm-BG-UnV"/>
161171
<constraint firstAttribute="bottom" secondItem="WCS-fc-TZZ" secondAttribute="bottom" priority="250" constant="60" id="ecC-D0-3e1"/>
172+
<constraint firstAttribute="bottom" secondItem="gh8-e9-Cg0" secondAttribute="bottom" id="gB4-jE-0i2"/>
162173
<constraint firstAttribute="trailing" secondItem="WCS-fc-TZZ" secondAttribute="trailing" id="kcs-hW-uwp"/>
163174
<constraint firstItem="gh8-e9-Cg0" firstAttribute="leading" secondItem="8LB-3C-fUZ" secondAttribute="leading" id="phd-YU-KsB"/>
164175
<constraint firstItem="WCS-fc-TZZ" firstAttribute="top" secondItem="gh8-e9-Cg0" secondAttribute="bottom" constant="60" id="vm9-Hc-UkY"/>
176+
<constraint firstItem="gh8-e9-Cg0" firstAttribute="top" secondItem="8LB-3C-fUZ" secondAttribute="top" constant="33" id="yP8-eC-1al"/>
165177
</constraints>
166178
<variation key="default">
167179
<mask key="constraints">
168-
<exclude reference="32j-YN-mOd"/>
169180
<exclude reference="9Cu-xN-W6S"/>
181+
<exclude reference="P70-Li-xl4"/>
182+
<exclude reference="gB4-jE-0i2"/>
170183
<exclude reference="phd-YU-KsB"/>
184+
<exclude reference="yP8-eC-1al"/>
171185
<exclude reference="3IU-Kj-HHc"/>
172186
<exclude reference="L9h-Ut-wIn"/>
173187
<exclude reference="kcs-hW-uwp"/>
@@ -176,14 +190,20 @@
176190
</variation>
177191
<variation key="heightClass=compact">
178192
<mask key="constraints">
179-
<include reference="32j-YN-mOd"/>
180193
<include reference="9Cu-xN-W6S"/>
194+
<include reference="gB4-jE-0i2"/>
181195
<include reference="phd-YU-KsB"/>
196+
<include reference="yP8-eC-1al"/>
182197
<include reference="3IU-Kj-HHc"/>
183198
<include reference="L9h-Ut-wIn"/>
184199
<include reference="kcs-hW-uwp"/>
185200
</mask>
186201
</variation>
202+
<variation key="heightClass=regular">
203+
<mask key="constraints">
204+
<include reference="P70-Li-xl4"/>
205+
</mask>
206+
</variation>
187207
<variation key="heightClass=regular-widthClass=regular">
188208
<mask key="constraints">
189209
<include reference="vm9-Hc-UkY"/>
@@ -222,7 +242,7 @@
222242
</viewController>
223243
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
224244
</objects>
225-
<point key="canvasLocation" x="935" y="-564"/>
245+
<point key="canvasLocation" x="933.80281690140851" y="-566.25"/>
226246
</scene>
227247
<!--Navigation Controller-->
228248
<scene sceneID="Onj-c0-oij">

0 commit comments

Comments
 (0)