Skip to content

Commit

Permalink
[Fix] 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 5ed1eb6 commit 2f7e898
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ final class SearchResultVC: UIViewController {

private lazy var searchResultHeaderButton: UIButton = {
let btn = UIButton()
btn.setImage(ImageLiterals.Search.viewMapBtn, for: .normal)
btn.setTitle("지도 뷰로 보기", for: .normal)
btn.setTitleColor(UIColor.helfmeGray1, for: .normal)
btn.titleLabel?.font = .NotoRegular(size: 14)
btn.isHidden = true
btn.addTarget(self, action: #selector(moveSearchResultView), for: .touchUpInside)
btn.semanticContentAttribute = .forceLeftToRight
btn.imageEdgeInsets = .init(top: 0, left: 0, bottom: 0, right: 10)
return btn
}()

Expand All @@ -72,7 +75,7 @@ final class SearchResultVC: UIViewController {
tv.backgroundColor = .helfmeWhite
tv.keyboardDismissMode = .onDrag
tv.tableHeaderView = searchResultHeaderView
tv.tableHeaderView?.frame.size.height = 56
tv.tableHeaderView?.frame.size.height = 48
return tv
}()

Expand Down Expand Up @@ -147,6 +150,8 @@ extension SearchResultVC {
searchResultHeaderButton.snp.makeConstraints {
$0.trailing.equalTo(searchResultHeaderView.snp.trailing).inset(20)
$0.centerY.equalTo(searchResultHeaderView)
$0.width.equalTo(105)
$0.height.equalTo(20)
}

searchResultTableView.snp.makeConstraints {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ final class SearchVC: UIViewController {

private lazy var resultHeaderButton: UIButton = {
let btn = UIButton()
btn.setImage(ImageLiterals.Search.viewMapBtn, for: .normal)
btn.setTitle("지도 뷰로 보기", for: .normal)
btn.setTitleColor(UIColor.helfmeGray1, for: .normal)
btn.titleLabel?.font = .NotoRegular(size: 14)
btn.isHidden = true
btn.addTarget(self, action: #selector(pushToSearchResultVC), for: .touchUpInside)
btn.semanticContentAttribute = .forceLeftToRight
btn.imageEdgeInsets = .init(top: 0, left: 0, bottom: 0, right: 10)
return btn
}()

Expand Down Expand Up @@ -218,6 +221,8 @@ extension SearchVC {
resultHeaderButton.snp.makeConstraints {
$0.trailing.equalTo(searchHeaderView.snp.trailing).inset(20)
$0.centerY.equalTo(searchHeaderView)
$0.width.equalTo(105)
$0.height.equalTo(20)
}

searchView.snp.makeConstraints {
Expand Down

0 comments on commit 2f7e898

Please sign in to comment.