Skip to content

Commit

Permalink
Refactor [#269] 타임라인 불필요한 코드 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
chaentopia committed Oct 25, 2023
1 parent e1bd064 commit 9c768a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ final class AroundSkeletonTableViewCell: UITableViewCell {

override func layoutSubviews() {
super.layoutSubviews()

contentView.frame = contentView.frame.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: 8.adjustedHeight, right: 0))
}

Expand Down Expand Up @@ -91,9 +90,6 @@ final class AroundSkeletonTableViewCell: UITableViewCell {
}

private func setLayout() {

// 데이터 어떻게 들어오는지에 따라서 변경 예정
// let maxKeywordLength = votingList[VotingViewController.pushCount].keywordList.compactMap { $0.count }.max() ?? 0
let keywordLength = (keywordLabel.text?.count ?? 0 * 14).adjusted + 28.adjusted

contentView.addSubviews(genderImageView,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ final class AroundTableViewCell: UITableViewCell {

override func layoutSubviews() {
super.layoutSubviews()

contentView.frame = contentView.frame.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: 8.adjustedHeight, right: 0))
}

Expand Down
11 changes: 7 additions & 4 deletions YELLO-iOS/YELLO-iOS/Presentation/Around/View/AroundView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ final class AroundView: BaseView {

// MARK: Layout Helpers
override func setUI() {
setStyle()
setLayout()
super.setUI()
setDelegate()
updateView()
}

Expand All @@ -63,8 +63,6 @@ final class AroundView: BaseView {
aroundTableView.do {
$0.register(AroundTableViewCell.self, forCellReuseIdentifier: AroundTableViewCell.identifier)
$0.register(AroundSkeletonTableViewCell.self, forCellReuseIdentifier: AroundSkeletonTableViewCell.identifier)
$0.dataSource = self
$0.delegate = self
$0.separatorStyle = .none
$0.showsVerticalScrollIndicator = false
$0.showsHorizontalScrollIndicator = false
Expand Down Expand Up @@ -120,6 +118,11 @@ final class AroundView: BaseView {
}
}

func setDelegate() {
aroundTableView.dataSource = self
aroundTableView.delegate = self
}

// MARK: Objc Function
@objc func refreshTable(refresh: UIRefreshControl) {
self.isRefreshing = true
Expand Down

0 comments on commit 9c768a3

Please sign in to comment.