diff --git a/Deartoday/Deartoday/Screen/CheckTimeTravelDetail/Controller/CheckTimeTravelDetailViewController.swift b/Deartoday/Deartoday/Screen/CheckTimeTravelDetail/Controller/CheckTimeTravelDetailViewController.swift index f740801..3c0b71e 100644 --- a/Deartoday/Deartoday/Screen/CheckTimeTravelDetail/Controller/CheckTimeTravelDetailViewController.swift +++ b/Deartoday/Deartoday/Screen/CheckTimeTravelDetail/Controller/CheckTimeTravelDetailViewController.swift @@ -32,10 +32,6 @@ final class CheckTimeTravelDetailViewController: UIViewController { getTravelInfo(timeTravelId: timeTravelID) } - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - } - // MARK: - Custom Method private func setUI() { @@ -50,6 +46,11 @@ final class CheckTimeTravelDetailViewController: UIViewController { registerXib() } + private func setCollectionViewLayout() { + collectionViewFlowLayout.scrollDirection = .vertical + collectionViewFlowLayout.sectionHeadersPinToVisibleBounds = true + } + // MARK: - IBAction @IBAction func backButtonDidTap(_ sender: Any) { @@ -119,8 +120,7 @@ extension CheckTimeTravelDetailViewController: UICollectionViewDataSource { headerView.titleLabel?.text = travelInfo?.title ?? "" headerView.pastDateLabel?.text = "\(travelInfo?.year ?? 0).\(travelInfo?.month ?? 0).\(travelInfo?.day ?? 0)" headerView.writtenDateLabel?.text = travelInfo?.writtenDate ?? "" - headerView.titleLabel.setTextWithLineHeight(text: headerView.titleLabel.text, - lineHeight: 26) + headerView.titleLabel.setTextWithLineHeight(text: headerView.titleLabel.text, lineHeight: 26) return headerView default: return UICollectionReusableView() } @@ -221,9 +221,4 @@ extension CheckTimeTravelDetailViewController { collectionView.register(presentXib, forCellWithReuseIdentifier: PresentDialogCollectionViewCell.identifier) } - - private func setCollectionViewLayout() { - collectionViewFlowLayout.scrollDirection = .vertical - collectionViewFlowLayout.sectionHeadersPinToVisibleBounds = true - } }