Skip to content

Commit 8abf9a6

Browse files
committed
fix
1 parent e36ffb2 commit 8abf9a6

File tree

2 files changed

+99
-3
lines changed

2 files changed

+99
-3
lines changed

StudentTourism/Screens/Main/Base.lproj/Main.storyboard

Lines changed: 97 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<objects>
1616
<viewController id="pzc-gm-IiC" customClass="MainVC" customModule="StudentTourism" customModuleProvider="target" sceneMemberID="viewController">
1717
<view key="view" contentMode="scaleToFill" id="3ct-6a-etQ" customClass="MainView" customModule="StudentTourism" customModuleProvider="target">
18-
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
18+
<rect key="frame" x="0.0" y="0.0" width="393" height="2000"/>
1919
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2020
<subviews>
2121
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CfJ-gR-A8J">
@@ -26,10 +26,10 @@
2626
</constraints>
2727
</view>
2828
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u5Y-Rp-o6I">
29-
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
29+
<rect key="frame" x="0.0" y="0.0" width="393" height="2000"/>
3030
<subviews>
3131
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="oDQ-aF-l6d">
32-
<rect key="frame" x="0.0" y="0.0" width="393" height="731.66666666666663"/>
32+
<rect key="frame" x="0.0" y="0.0" width="393" height="1031.6666666666667"/>
3333
<subviews>
3434
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ONJ-sA-kDE">
3535
<rect key="frame" x="0.0" y="0.0" width="393" height="181.66666666666666"/>
@@ -253,6 +253,97 @@
253253
<outlet property="collectionView" destination="MnO-Pu-FNh" id="grH-TU-YZA"/>
254254
</connections>
255255
</view>
256+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QDZ-Rd-GBJ" customClass="CityCollection" customModule="StudentTourism" customModuleProvider="target">
257+
<rect key="frame" x="0.0" y="731.66666666666663" width="393" height="299.99999999999989"/>
258+
<subviews>
259+
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="3Ol-C8-zuH">
260+
<rect key="frame" x="0.0" y="10" width="393" height="290"/>
261+
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
262+
<collectionViewFlowLayout key="collectionViewLayout" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="vWh-BQ-8PZ">
263+
<size key="itemSize" width="152" height="265"/>
264+
<size key="headerReferenceSize" width="0.0" height="0.0"/>
265+
<size key="footerReferenceSize" width="0.0" height="0.0"/>
266+
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
267+
</collectionViewFlowLayout>
268+
<cells>
269+
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CityCell" id="nzw-KS-tMr">
270+
<rect key="frame" x="0.0" y="0.0" width="152" height="265"/>
271+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
272+
<collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="V6G-ij-ouX">
273+
<rect key="frame" x="0.0" y="0.0" width="152" height="265"/>
274+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
275+
<subviews>
276+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text="Vals" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lTf-sK-Cb8">
277+
<rect key="frame" x="0.0" y="193.33333333333334" width="152" height="51.666666666666657"/>
278+
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
279+
<color key="textColor" name="sBlack"/>
280+
<nil key="highlightedColor"/>
281+
</label>
282+
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="J9a-b8-c4z">
283+
<rect key="frame" x="0.0" y="249" width="98" height="16"/>
284+
<subviews>
285+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="star" translatesAutoresizingMaskIntoConstraints="NO" id="2Ak-ak-IeV">
286+
<rect key="frame" x="0.0" y="0.0" width="19.666666666666668" height="16"/>
287+
</imageView>
288+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="star" translatesAutoresizingMaskIntoConstraints="NO" id="J17-LG-rSn">
289+
<rect key="frame" x="19.666666666666664" y="0.0" width="19.666666666666664" height="16"/>
290+
</imageView>
291+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="star" translatesAutoresizingMaskIntoConstraints="NO" id="xG2-yb-P3D">
292+
<rect key="frame" x="39.333333333333336" y="0.0" width="19.333333333333336" height="16"/>
293+
</imageView>
294+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="star" translatesAutoresizingMaskIntoConstraints="NO" id="XGr-4K-gYW">
295+
<rect key="frame" x="58.666666666666664" y="0.0" width="19.666666666666664" height="16"/>
296+
</imageView>
297+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="star" translatesAutoresizingMaskIntoConstraints="NO" id="DGv-iZ-XzU">
298+
<rect key="frame" x="78.333333333333329" y="0.0" width="19.666666666666671" height="16"/>
299+
</imageView>
300+
</subviews>
301+
<constraints>
302+
<constraint firstAttribute="height" constant="16" id="EC7-UG-NJv"/>
303+
</constraints>
304+
</stackView>
305+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_valsk_cell" translatesAutoresizingMaskIntoConstraints="NO" id="XhT-rf-CUp">
306+
<rect key="frame" x="0.0" y="0.0" width="152" height="185.33333333333334"/>
307+
<constraints>
308+
<constraint firstAttribute="width" secondItem="XhT-rf-CUp" secondAttribute="height" multiplier="164:200" id="TAh-Gk-EwJ"/>
309+
</constraints>
310+
<userDefinedRuntimeAttributes>
311+
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
312+
<real key="value" value="8"/>
313+
</userDefinedRuntimeAttribute>
314+
</userDefinedRuntimeAttributes>
315+
</imageView>
316+
</subviews>
317+
<constraints>
318+
<constraint firstItem="J9a-b8-c4z" firstAttribute="width" secondItem="lTf-sK-Cb8" secondAttribute="width" multiplier="0.644737" id="9kF-7H-LBW"/>
319+
<constraint firstAttribute="bottom" secondItem="J9a-b8-c4z" secondAttribute="bottom" id="B72-zP-W6V"/>
320+
<constraint firstItem="J9a-b8-c4z" firstAttribute="leading" secondItem="V6G-ij-ouX" secondAttribute="leading" id="EcL-tR-Hc9"/>
321+
<constraint firstItem="XhT-rf-CUp" firstAttribute="leading" secondItem="V6G-ij-ouX" secondAttribute="leading" id="HJc-TV-DCt"/>
322+
<constraint firstItem="lTf-sK-Cb8" firstAttribute="leading" secondItem="V6G-ij-ouX" secondAttribute="leading" id="V5n-13-iSS"/>
323+
<constraint firstAttribute="trailing" secondItem="XhT-rf-CUp" secondAttribute="trailing" id="Wnp-xa-Csf"/>
324+
<constraint firstItem="XhT-rf-CUp" firstAttribute="top" secondItem="V6G-ij-ouX" secondAttribute="top" id="Zue-MH-8gq"/>
325+
<constraint firstItem="lTf-sK-Cb8" firstAttribute="top" secondItem="XhT-rf-CUp" secondAttribute="bottom" constant="8" id="eUp-5S-6cH"/>
326+
<constraint firstItem="J9a-b8-c4z" firstAttribute="top" secondItem="lTf-sK-Cb8" secondAttribute="bottom" constant="4" id="koV-Wr-npc"/>
327+
<constraint firstAttribute="trailing" secondItem="lTf-sK-Cb8" secondAttribute="trailing" id="qAd-6n-ZQo"/>
328+
</constraints>
329+
</collectionViewCellContentView>
330+
<size key="customSize" width="152" height="265"/>
331+
</collectionViewCell>
332+
</cells>
333+
</collectionView>
334+
</subviews>
335+
<color key="backgroundColor" name="sBackground"/>
336+
<constraints>
337+
<constraint firstItem="3Ol-C8-zuH" firstAttribute="leading" secondItem="QDZ-Rd-GBJ" secondAttribute="leading" id="2I1-gT-G4x"/>
338+
<constraint firstAttribute="bottom" secondItem="3Ol-C8-zuH" secondAttribute="bottom" id="HaA-Vu-P7R"/>
339+
<constraint firstAttribute="trailing" secondItem="3Ol-C8-zuH" secondAttribute="trailing" id="TOG-Hi-P5P"/>
340+
<constraint firstAttribute="height" constant="300" id="bsx-UT-jPr"/>
341+
<constraint firstItem="3Ol-C8-zuH" firstAttribute="top" secondItem="QDZ-Rd-GBJ" secondAttribute="top" constant="10" id="gve-5L-5MZ"/>
342+
</constraints>
343+
<connections>
344+
<outlet property="collectionView" destination="3Ol-C8-zuH" id="xi8-NN-vDG"/>
345+
</connections>
346+
</view>
256347
</subviews>
257348
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
258349
</stackView>
@@ -284,8 +375,10 @@
284375
<outlet property="bannerCollection" destination="zah-If-uCU" id="9sf-Xo-upg"/>
285376
<outlet property="bottomConstraintForKeyboard" destination="RiB-py-xR8" id="QfC-ac-pOS"/>
286377
<outlet property="cityCollection" destination="MUV-bg-Mo8" id="Jhh-PK-gtP"/>
378+
<outlet property="hotelsCollection" destination="QDZ-Rd-GBJ" id="idm-Xf-2T2"/>
287379
</connections>
288380
</view>
381+
<size key="freeformSize" width="393" height="2000"/>
289382
</viewController>
290383
<placeholder placeholderIdentifier="IBFirstResponder" id="jwQ-8q-4cX" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
291384
</objects>
@@ -295,6 +388,7 @@
295388
<resources>
296389
<image name="img_kursk_cell" width="164" height="200"/>
297390
<image name="img_template" width="398" height="200"/>
391+
<image name="img_valsk_cell" width="164" height="164"/>
298392
<image name="star" width="16" height="16"/>
299393
<namedColor name="sBackground">
300394
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

StudentTourism/Screens/Main/MainView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ import UIKit
1010
class MainView: BaseView {
1111
@IBOutlet var bannerCollection: BannerCollection!
1212
@IBOutlet var cityCollection: CityCollection!
13+
@IBOutlet var hotelsCollection: CityCollection!
1314

1415

1516
override func customizeUI() {
1617
bannerCollection.items = [Item(reuseId: "BannerCell"),Item(reuseId: "BannerCell"),Item(reuseId: "BannerCell"),Item(reuseId: "BannerCell") ]
1718
cityCollection.items = [Item(reuseId: "CityCell"),Item(reuseId: "CityCell"),Item(reuseId: "CityCell"),Item(reuseId: "CityCell") ]
19+
hotelsCollection.items = [Item(reuseId: "CityCell"),Item(reuseId: "CityCell"),Item(reuseId: "CityCell"),Item(reuseId: "CityCell"), Item(reuseId: "CityCell"),Item(reuseId: "CityCell"),Item(reuseId: "CityCell"),Item(reuseId: "CityCell"),Item(reuseId: "CityCell"),Item(reuseId: "CityCell") ]
1820

1921
}
2022

0 commit comments

Comments
 (0)