Skip to content

Commit

Permalink
Merge pull request #9 from SOPT28th-SOPKATHON-Kick/feat/#7
Browse files Browse the repository at this point in the history
[Feat] 페이지컨트롤 추가
  • Loading branch information
Hansangjin98 authored May 22, 2021
2 parents 81b4c07 + b6f7c5b commit 892057a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
33 changes: 21 additions & 12 deletions SOPKATHON_Kick/Sources/Home/Home.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,41 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="934"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pSB-Jp-oQY">
<rect key="frame" x="0.0" y="0.0" width="414" height="111"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="51"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="오늘의 킥 BEST" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ln6-Zo-9Ym">
<rect key="frame" x="18" y="63" width="127" height="24"/>
<rect key="frame" x="18" y="3" width="127" height="24"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="인기있는 킥 살펴보세요" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VOa-ud-Mrz">
<rect key="frame" x="18" y="89" width="102" height="14"/>
<rect key="frame" x="18" y="29" width="102" height="14"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hfP-Lf-RKW">
<rect key="frame" x="322" y="45" width="73" height="60"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="hfP-Lf-RKW">
<rect key="frame" x="378" y="6.5" width="17" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="fta-Bc-VHK"/>
<constraint firstAttribute="width" constant="17" id="mt1-uO-7xV"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="VOa-ud-Mrz" secondAttribute="bottom" constant="8" id="1JN-JY-dpi"/>
<constraint firstAttribute="trailing" secondItem="hfP-Lf-RKW" secondAttribute="trailing" constant="19" id="BIV-FT-viy"/>
<constraint firstItem="hfP-Lf-RKW" firstAttribute="centerY" secondItem="Ln6-Zo-9Ym" secondAttribute="centerY" id="Ckq-aj-NjJ"/>
<constraint firstItem="VOa-ud-Mrz" firstAttribute="leading" secondItem="pSB-Jp-oQY" secondAttribute="leading" constant="18" id="Iej-2N-cdF"/>
<constraint firstAttribute="height" constant="111" id="Vfw-fL-L7u"/>
<constraint firstAttribute="height" constant="51" id="Vfw-fL-L7u"/>
<constraint firstItem="Ln6-Zo-9Ym" firstAttribute="leading" secondItem="pSB-Jp-oQY" secondAttribute="leading" constant="18" id="W2L-zo-sJu"/>
<constraint firstAttribute="bottom" secondItem="Ln6-Zo-9Ym" secondAttribute="bottom" constant="24" id="fAG-rM-qG7"/>
</constraints>
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="oVq-j2-Z6D">
<rect key="frame" x="18" y="128" width="339" height="205"/>
<rect key="frame" x="18" y="68" width="339" height="205"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="205" id="e84-6p-uOu"/>
Expand Down Expand Up @@ -111,10 +116,11 @@
</cells>
</collectionView>
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="EyB-D1-tav">
<rect key="frame" x="0.0" y="343.5" width="414" height="27.5"/>
<rect key="frame" x="0.0" y="283.5" width="414" height="27.5"/>
<color key="currentPageIndicatorTintColor" systemColor="systemRedColor"/>
</pageControl>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="0yf-T1-5SP">
<rect key="frame" x="18" y="458" width="377" height="476"/>
<rect key="frame" x="18" y="398" width="377" height="536"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" rowHeight="91" id="2Jz-Cb-OIi" customClass="HomeTableViewCell" customModule="SOPKATHON_Kick" customModuleProvider="target">
Expand Down Expand Up @@ -181,13 +187,13 @@
</prototypes>
</tableView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="킥 살펴보기" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dm6-FO-fqX">
<rect key="frame" x="18" y="402" width="83" height="22"/>
<rect key="frame" x="18" y="342" width="83" height="22"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="오늘 나온 따끈따끈한 킥을 만나보세요" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mQ1-T7-ErB">
<rect key="frame" x="19" y="429" width="195" height="16"/>
<rect key="frame" x="19" y="369" width="195" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
Expand Down Expand Up @@ -251,5 +257,8 @@
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
5 changes: 5 additions & 0 deletions SOPKATHON_Kick/Sources/Home/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class HomeViewController: UIViewController {
homeTableViewSet()
homeCollectionViewSet()
setScrollHeight()
pageCtrlSet()
}

func homeTableViewSet() {
Expand Down Expand Up @@ -64,6 +65,10 @@ class HomeViewController: UIViewController {
scrollViewHeightConstraint.constant = CGFloat(homeTableViewList.count * 59)
homeTableView.reloadData()
}

func pageCtrlSet() {
homePageControl.numberOfPages = homeCollectionViewList.count
}

}

Expand Down

0 comments on commit 892057a

Please sign in to comment.