Skip to content

Commit

Permalink
[feat] 저금통 생성 피커 하단 문구 삭제 #204
Browse files Browse the repository at this point in the history
  • Loading branch information
2unbini committed May 22, 2022
1 parent c601c77 commit ab23a39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
13 changes: 2 additions & 11 deletions Happiggy-bank/Happiggy-bank/Storyboard/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="dSD-O6-Yej">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="dSD-O6-Yej">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
Expand Down Expand Up @@ -1216,20 +1216,12 @@
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JZC-yk-iLa">
<rect key="frame" x="27.5" y="298" width="320" height="216"/>
</pickerView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bjm-mA-Pms">
<rect key="frame" x="166.5" y="554" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="3Tj-oo-gq3"/>
<color key="backgroundColor" name="homeBackground"/>
<constraints>
<constraint firstItem="bjm-mA-Pms" firstAttribute="top" secondItem="JZC-yk-iLa" secondAttribute="bottom" constant="40" id="1MG-3u-6w7"/>
<constraint firstItem="JZC-yk-iLa" firstAttribute="top" secondItem="8q5-pU-bsj" secondAttribute="bottom" constant="40" id="8ns-L8-Pei"/>
<constraint firstItem="JZC-yk-iLa" firstAttribute="centerY" secondItem="c3L-CD-aRg" secondAttribute="centerY" id="E6U-Bl-yJv"/>
<constraint firstItem="bjm-mA-Pms" firstAttribute="centerX" secondItem="c3L-CD-aRg" secondAttribute="centerX" id="HLN-jP-wxc"/>
<constraint firstItem="VaU-DG-hJr" firstAttribute="trailing" secondItem="3Tj-oo-gq3" secondAttribute="trailing" id="Nhu-hS-kTS"/>
<constraint firstItem="VaU-DG-hJr" firstAttribute="leading" secondItem="3Tj-oo-gq3" secondAttribute="leading" id="TNz-Y9-H7c"/>
<constraint firstItem="VaU-DG-hJr" firstAttribute="top" secondItem="3Tj-oo-gq3" secondAttribute="top" id="aLS-Kl-wVO"/>
Expand All @@ -1242,7 +1234,6 @@
<size key="freeformSize" width="375" height="812"/>
<connections>
<outlet property="navigationBar" destination="VaU-DG-hJr" id="tLl-nY-dh1"/>
<outlet property="openDateLabel" destination="bjm-mA-Pms" id="Cwe-nn-ZhI"/>
<outlet property="pickerView" destination="JZC-yk-iLa" id="ESS-v4-zWK"/>
<outlet property="topLabel" destination="8q5-pU-bsj" id="QQD-EH-FCm"/>
</connections>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ final class NewBottleDatePickerViewController: UIViewController {

/// 개봉 시점 선택하는 피커 뷰
@IBOutlet weak var pickerView: UIPickerView!

/// 개봉 날짜 표시하는 라벨
@IBOutlet weak var openDateLabel: UILabel!


/// 유리병 데이터 전달하는 델리게이트
var delegate: DataProvider?
Expand Down Expand Up @@ -81,7 +79,6 @@ final class NewBottleDatePickerViewController: UIViewController {
/// 라벨 초기 세팅하는 함수
private func initializeLabel() {
setTopLabel()
setOpenDateLabel()
}

/// 상단 라벨 세팅
Expand All @@ -91,19 +88,6 @@ final class NewBottleDatePickerViewController: UIViewController {
self.topLabel.textColor = .customLabel
}

/// 개봉 예정일 라벨 세팅
private func setOpenDateLabel() {
guard let periodIndex = self.viewModel.bottleData?.periodIndex
else { return }
let endDate = viewModel.endDate(
from: Date(),
after: periodIndex
)
self.openDateLabel.text = viewModel.openDateString(of: endDate)
self.openDateLabel.font = .systemFont(ofSize: FontSize.openDateLabelText)
self.openDateLabel.textColor = .customTint
}

/// 피커 뷰 초기 상태 세팅하는 함수
/// 처음엔 가운데로, 이후엔 선택된 행의 인덱스에 따라 설정됨
private func initializePickerView() {
Expand Down Expand Up @@ -220,6 +204,5 @@ extension NewBottleDatePickerViewController: UIPickerViewDelegate {
else { return }

rowView.textColor = .customTint
setOpenDateLabel()
}
}

0 comments on commit ab23a39

Please sign in to comment.