Skip to content

Commit

Permalink
[#2] 메인뷰 상단 NavigationBar 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyesuuou committed Sep 14, 2021
1 parent ae9beb5 commit d36fbfe
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="AddInputTVC" id="ovl-82-Sbj" customClass="AddInputTVC" customModule="AppleContacts" customModuleProvider="target">
<rect key="frame" x="0.0" y="191.33333396911621" width="390" height="21"/>
<rect key="frame" x="0.0" y="191.33333396911621" width="390" height="21.666666030883789"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ovl-82-Sbj" id="DCP-Ij-a1a">
<rect key="frame" x="0.0" y="0.0" width="390" height="21"/>
<rect key="frame" x="0.0" y="0.0" width="390" height="21.666666030883789"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="placeholder" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="taT-Cu-1GZ">
<rect key="frame" x="20" y="1" width="350" height="19"/>
<rect key="frame" x="20" y="1" width="350" height="19.666666666666668"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="backgroundColor" systemColor="systemGray6Color"/>
<constraints>
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="s7u-Qe-dAU" secondAttribute="trailing" id="15k-0A-uNY"/>
<constraint firstItem="jtK-Jv-6xb" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="21I-vd-jHP"/>
Expand Down
52 changes: 18 additions & 34 deletions AppleContacts/AppleContacts/Source/Main/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--MainVC-->
<!--연락처-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController storyboardIdentifier="MainVC" id="BYZ-38-t0r" customClass="MainVC" customModule="AppleContacts" customModuleProvider="target" sceneMemberID="viewController">
Expand All @@ -17,52 +17,26 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mWj-Xv-BAh">
<rect key="frame" x="0.0" y="0.0" width="390" height="130"/>
<rect key="frame" x="0.0" y="0.0" width="390" height="150"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="연락처" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ECm-Kc-jrx">
<rect key="frame" x="172.66666666666666" y="50" width="45" height="21"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7rd-KI-OPM">
<rect key="frame" x="20" y="45.666666666666664" width="30" height="29.999999999999993"/>
<state key="normal" title="그룹"/>
<connections>
<action selector="groupButtonClicked:" destination="BYZ-38-t0r" eventType="touchUpInside" id="JoM-WS-pxb"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WjA-aH-ccx">
<rect key="frame" x="352" y="49.666666666666664" width="18" height="21.999999999999993"/>
<state key="normal" image="plus" catalog="system"/>
<connections>
<action selector="addButtonClicked:" destination="BYZ-38-t0r" eventType="touchUpInside" id="ztL-b1-TvW"/>
</connections>
</button>
<searchBar contentMode="redraw" searchBarStyle="minimal" translatesAutoresizingMaskIntoConstraints="NO" id="qdg-zg-yT8">
<rect key="frame" x="0.0" y="79" width="390" height="51"/>
<rect key="frame" x="0.0" y="99" width="390" height="51"/>
<textInputTraits key="textInputTraits"/>
</searchBar>
</subviews>
<color key="backgroundColor" systemColor="systemGray6Color"/>
<constraints>
<constraint firstItem="ECm-Kc-jrx" firstAttribute="top" secondItem="mWj-Xv-BAh" secondAttribute="top" constant="50" id="1e8-NX-Mp9"/>
<constraint firstItem="7rd-KI-OPM" firstAttribute="leading" secondItem="mWj-Xv-BAh" secondAttribute="leading" constant="20" id="2fI-yL-HUm"/>
<constraint firstItem="7rd-KI-OPM" firstAttribute="centerY" secondItem="ECm-Kc-jrx" secondAttribute="centerY" id="44q-Ju-lKQ"/>
<constraint firstItem="WjA-aH-ccx" firstAttribute="centerY" secondItem="ECm-Kc-jrx" secondAttribute="centerY" id="8er-7H-PPk"/>
<constraint firstAttribute="trailing" secondItem="qdg-zg-yT8" secondAttribute="trailing" id="8zL-yp-fJU"/>
<constraint firstAttribute="trailing" secondItem="WjA-aH-ccx" secondAttribute="trailing" constant="20" id="Gu7-c3-R1x"/>
<constraint firstItem="ECm-Kc-jrx" firstAttribute="centerX" secondItem="mWj-Xv-BAh" secondAttribute="centerX" id="HwQ-LZ-rIt"/>
<constraint firstAttribute="bottom" secondItem="qdg-zg-yT8" secondAttribute="bottom" id="Pxn-wY-4Yd"/>
<constraint firstAttribute="height" constant="130" id="YZd-ZO-G4y"/>
<constraint firstAttribute="height" constant="150" id="YZd-ZO-G4y"/>
<constraint firstItem="qdg-zg-yT8" firstAttribute="leading" secondItem="mWj-Xv-BAh" secondAttribute="leading" id="aEn-fT-rbB"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="8di-aH-Q9Z">
<rect key="frame" x="0.0" y="130" width="390" height="714"/>
<rect key="frame" x="0.0" y="150" width="390" height="694"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<view key="tableFooterView" contentMode="scaleToFill" id="J3t-lf-59n">
<rect key="frame" x="0.0" y="77.000002254139304" width="390" height="88"/>
<rect key="frame" x="0.0" y="77.000002254139318" width="390" height="87.999999999999986"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="person.circle.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="d2s-Cy-YB6">
Expand Down Expand Up @@ -137,7 +111,18 @@
<constraint firstAttribute="bottom" secondItem="8di-aH-Q9Z" secondAttribute="bottom" id="wo5-QT-UWu"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="XT1-Tk-8Yj"/>
<navigationItem key="navigationItem" title="연락처" id="XT1-Tk-8Yj">
<barButtonItem key="leftBarButtonItem" title="그룹" id="b9C-n2-haQ">
<connections>
<action selector="groupButtonClicked:" destination="BYZ-38-t0r" id="rIf-Y7-eko"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" systemItem="add" id="arY-hH-KAn">
<connections>
<action selector="addButtonClicked:" destination="BYZ-38-t0r" id="PmL-F6-oNL"/>
</connections>
</barButtonItem>
</navigationItem>
<connections>
<outlet property="searchBar" destination="qdg-zg-yT8" id="id5-uZ-bOX"/>
<outlet property="tableheaderview" destination="J3t-lf-59n" id="dR5-KO-4Hw"/>
Expand Down Expand Up @@ -169,7 +154,6 @@
</scenes>
<resources>
<image name="person.circle.fill" catalog="system" width="128" height="121"/>
<image name="plus" catalog="system" width="128" height="113"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
Expand Down
11 changes: 11 additions & 0 deletions AppleContacts/AppleContacts/Source/Main/MainVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ class MainVC: UIViewController {
// MARK: - UI
func setUI(){
setSearchBarUI()
setNavigationBarUI()
}

// MARK: UI / NavigationBar
func setNavigationBarUI(){
navigationController?.navigationBar.backgroundColor = .systemGray6

/// 선 없애기
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
self.navigationController?.navigationBar.shadowImage = UIImage()

}

// MARK: UI / SearchBarUI
Expand Down

0 comments on commit d36fbfe

Please sign in to comment.