Skip to content

Commit

Permalink
[Chore] Health-Food-Me#28 - 코드리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
0inn committed Jul 13, 2022
1 parent f4a81bc commit 7695fff
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ final class SearchRecentTVC: UITableViewCell, UITableViewRegisterable {

override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)

setUI()
setLayout()
}
Expand All @@ -66,6 +65,7 @@ extension SearchRecentTVC {

private func setUI() {
backgroundColor = .helfmeWhite
selectionStyle = .none
}

private func setLayout() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ final class SearchResultTVC: UITableViewCell, UITableViewRegisterable {

private lazy var storeStackView: UIStackView = {
let sv = UIStackView()
sv.addArrangedSubviews(foodLabel)
sv.addArrangedSubviews(storeNameLabel)
sv.addArrangedSubviews(starView)
sv.addArrangedSubviews(distanceLabel)
sv.addArrangedSubviews(foodLabel,
storeNameLabel,
starView,
distanceLabel)
sv.alignment = .leading
sv.axis = .vertical
sv.spacing = 2
Expand All @@ -82,7 +82,6 @@ final class SearchResultTVC: UITableViewCell, UITableViewRegisterable {

override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)

setUI()
setLayout()
}
Expand All @@ -101,6 +100,7 @@ extension SearchResultTVC {

private func setUI() {
backgroundColor = .helfmeWhite
selectionStyle = .none
}

private func setLayout() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ final class SearchTVC: UITableViewCell, UITableViewRegisterable {

override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)

setUI()
setLayout()
}
Expand All @@ -52,6 +51,7 @@ extension SearchTVC {

private func setUI() {
backgroundColor = .helfmeWhite
selectionStyle = .none
}

private func setLayout() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ extension SearchResultVC {
}

private func setLayout() {
view.addSubviews(searchTextField, lineView, mapView, searchResultTableView)
view.addSubviews(searchTextField,
lineView,
mapView,
searchResultTableView)

searchTextField.snp.makeConstraints {
$0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,13 @@ extension SearchVC: UITableViewDataSource {
cell.setData(data: searchRecentList[indexPath.row])
cell.index = indexPath.row
cell.delegate = self
cell.selectionStyle = .none
return cell
case .search:
guard let cell = tableView.dequeueReusableCell(withIdentifier: SearchTVC.className, for: indexPath) as? SearchTVC else { return UITableViewCell() }
cell.setData(data: searchRecentList[indexPath.row])
cell.selectionStyle = .none
return cell
case .searchResult:
guard let cell = tableView.dequeueReusableCell(withIdentifier: SearchResultTVC.className, for: indexPath) as? SearchResultTVC else { return UITableViewCell() }
cell.selectionStyle = .none
return cell
}
}
Expand Down

0 comments on commit 7695fff

Please sign in to comment.