Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #53 from FooRun-EatDa/feature/matzipDetail
Browse files Browse the repository at this point in the history
기능추가🔧 #51,  디자인수정📱 32# :  맛집 페이지 UI 수정사항 반영,리팩토링 및 api 연동
  • Loading branch information
k-nh authored Jun 24, 2022
2 parents 9b8d816 + 23faee7 commit 04f7eb0
Show file tree
Hide file tree
Showing 31 changed files with 706 additions and 410 deletions.
10 changes: 5 additions & 5 deletions EatDa.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
F03D976627DDAC330011FA3D /* BestBoardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03D976527DDAC330011FA3D /* BestBoardViewController.swift */; };
F03D976827DDC4A10011FA3D /* BestBoardTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03D976727DDC4A10011FA3D /* BestBoardTVC.swift */; };
F03FB65327A6DDA40097D817 /* RestaurantDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03FB65227A6DDA40097D817 /* RestaurantDetailViewController.swift */; };
F03FB65627A6EBB90097D817 /* RestaurantImageCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03FB65527A6EBB90097D817 /* RestaurantImageCVC.swift */; };
F03FB65A27A93C3A0097D817 /* RestaurantDetailTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03FB65927A93C3A0097D817 /* RestaurantDetailTVC.swift */; };
F03FB65D27A95D620097D817 /* RestauranthashTagCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03FB65C27A95D620097D817 /* RestauranthashTagCVC.swift */; };
F03FB65F27B025460097D817 /* RestaurantMenuTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03FB65E27B025460097D817 /* RestaurantMenuTVC.swift */; };
F03FB66127B0333D0097D817 /* UILabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03FB66027B0333D0097D817 /* UILabel.swift */; };
F03FB66327B52B2E0097D817 /* RestaurantReviewTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03FB66227B52B2E0097D817 /* RestaurantReviewTVC.swift */; };
F05B0DC0285B8D290029CD3C /* RestaurantDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F05B0DBF285B8D290029CD3C /* RestaurantDetailModel.swift */; };
F0B279E6282816AA000B35FF /* TermsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0B279E5282816AA000B35FF /* TermsViewController.swift */; };
F0CB983228472BA3002FCD94 /* MypageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0CB983128472BA3002FCD94 /* MypageViewController.swift */; };
F0CB9834284734D1002FCD94 /* ChangeProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0CB9833284734D1002FCD94 /* ChangeProfileViewController.swift */; };
Expand Down Expand Up @@ -129,12 +129,12 @@
F03D976527DDAC330011FA3D /* BestBoardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BestBoardViewController.swift; sourceTree = "<group>"; };
F03D976727DDC4A10011FA3D /* BestBoardTVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BestBoardTVC.swift; sourceTree = "<group>"; };
F03FB65227A6DDA40097D817 /* RestaurantDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestaurantDetailViewController.swift; sourceTree = "<group>"; };
F03FB65527A6EBB90097D817 /* RestaurantImageCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestaurantImageCVC.swift; sourceTree = "<group>"; };
F03FB65927A93C3A0097D817 /* RestaurantDetailTVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestaurantDetailTVC.swift; sourceTree = "<group>"; };
F03FB65C27A95D620097D817 /* RestauranthashTagCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestauranthashTagCVC.swift; sourceTree = "<group>"; };
F03FB65E27B025460097D817 /* RestaurantMenuTVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestaurantMenuTVC.swift; sourceTree = "<group>"; };
F03FB66027B0333D0097D817 /* UILabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UILabel.swift; sourceTree = "<group>"; };
F03FB66227B52B2E0097D817 /* RestaurantReviewTVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestaurantReviewTVC.swift; sourceTree = "<group>"; };
F05B0DBF285B8D290029CD3C /* RestaurantDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestaurantDetailModel.swift; sourceTree = "<group>"; };
F0B279E5282816AA000B35FF /* TermsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TermsViewController.swift; sourceTree = "<group>"; };
F0CB983128472BA3002FCD94 /* MypageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MypageViewController.swift; sourceTree = "<group>"; };
F0CB9833284734D1002FCD94 /* ChangeProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeProfileViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -291,7 +291,6 @@
F03FB65427A6EB930097D817 /* Cell */ = {
isa = PBXGroup;
children = (
F03FB65527A6EBB90097D817 /* RestaurantImageCVC.swift */,
F03FB65927A93C3A0097D817 /* RestaurantDetailTVC.swift */,
F03FB65C27A95D620097D817 /* RestauranthashTagCVC.swift */,
F03FB65E27B025460097D817 /* RestaurantMenuTVC.swift */,
Expand Down Expand Up @@ -489,6 +488,7 @@
FD9C6F4927C108AC005D88A6 /* RecommendView */ = {
isa = PBXGroup;
children = (
F05B0DBF285B8D290029CD3C /* RestaurantDetailModel.swift */,
FDE3072928446E1400EA15CF /* RecommendDetail */,
FD94861527A95987009BE666 /* RecommendSectionView.swift */,
FD9C6F3927BFDA4F005D88A6 /* RecommendCollectionViewCell.swift */,
Expand Down Expand Up @@ -591,8 +591,8 @@
FDE3072928446E1400EA15CF /* RecommendDetail */ = {
isa = PBXGroup;
children = (
FDEA5E3727EF10BF008EFD5E /* RecommendDetailViewController.swift */,
FDEA5E3D27F04620008EFD5E /* RecommendDetailViewModel.swift */,
FDEA5E3727EF10BF008EFD5E /* RecommendDetailViewController.swift */,
);
path = RecommendDetail;
sourceTree = "<group>";
Expand Down Expand Up @@ -826,6 +826,7 @@
F0224C36282963560092683A /* InputSchoolViewController.swift in Sources */,
FD9D38E828534D76005A0C86 /* SearchLogCell.swift in Sources */,
F0CCC0FA2839B830007DCBD0 /* School.swift in Sources */,
F05B0DC0285B8D290029CD3C /* RestaurantDetailModel.swift in Sources */,
FDB7906D2805A704008621D1 /* RestaurantTableViewCell.swift in Sources */,
F0CCC0EB2838D09E007DCBD0 /* UIButton.swift in Sources */,
FD63339027A0DADC004783E3 /* TabBarController.swift in Sources */,
Expand All @@ -850,7 +851,6 @@
FDEA5E4427F83294008EFD5E /* FilterHeaderView.swift in Sources */,
FD94861E27A959EF009BE666 /* SeperatorView.swift in Sources */,
FD9D4F7227B503090005205E /* TitleSectionView.swift in Sources */,
F03FB65627A6EBB90097D817 /* RestaurantImageCVC.swift in Sources */,
FD022E4028337E4F00FC32E9 /* MapDetailView.swift in Sources */,
FDE30738284640FF00EA15CF /* RestaurantListCell.swift in Sources */,
F03FB65327A6DDA40097D817 /* RestaurantDetailViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Group 422.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Group 3202.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Group 463.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Group 3090.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions EatDa/Global/Extensions/UIColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ extension UIColor {
class var subTextColor: UIColor { UIColor(hex: 0x6B7280) }
class var timeTextColor: UIColor {UIColor(hex: 0xBBBBBB) }
class var highlightTextColor: UIColor { UIColor(hex: 0x16B96A) }
class var lightGreyColor: UIColor { UIColor(hex: 0xFAFAFA) }
class var pointTextColor: UIColor { UIColor(hex: 0xFFAF38) }

// MARK: 탭바 컬러
class var gray1: UIColor { UIColor(hex: 0xBABABC) }
Expand Down
6 changes: 5 additions & 1 deletion EatDa/Global/Network/Service/RestaurantListNetwork.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ struct RestaurantListNetwork {
// let apiCall = API<[RestaurantListData]>(url: APIConstants.GET_AROUND_RESTAURANT, method: .get, parameters: ["page": 1])
// return apiCall.fetchWithRx()
// }


func getRestaurantDetailValue(_ id: Int) -> Observable<RestaurantDetailModel> {
let apiCall = API<RestaurantDetailModel>(url: APIConstants.GET_RESTAURANT_DETAIL + "\(id)", method: .get, parameters: [:])
return apiCall.fetchWithRx()
}
}
2 changes: 2 additions & 0 deletions EatDa/Global/Network/Util/APIResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ struct APIConstants {
static let GET_SEARCH_RESTAURANT = "/restaurant/search"
static let GET_SEARCH_LOG = "/restaurant/searchLog"

// MARK: DETAIL
static let GET_RESTAURANT_DETAIL = "/restaurant/"
}

class API<T: Decodable> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,57 @@ import Foundation
import UIKit

class RestaurantDetailTVC: UITableViewCell {


let cellTitleLabel = UILabel()
let cellDetailTitleLabel = UILabel()

let cellDetailButton = UIButton()
let cellDetailOpenedLabeView = UILabel()

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

super.init(style: style, reuseIdentifier: reuseIdentifier)

[cellTitleLabel, cellDetailTitleLabel, cellDetailButton, cellDetailOpenedLabeView].forEach{ contentView.addSubview($0) }
cellTitleLabel.textColor = .subTextColor
cellTitleLabel.font = .mySystemFont(ofSize: 13)
cellTitleLabel.snp.makeConstraints {
$0.top.equalToSuperview().offset(16)
$0.leading.equalToSuperview().offset(24)
$0.height.equalTo(20)
}

cellDetailTitleLabel.textColor = .mainTextColor
cellDetailTitleLabel.font = .mySystemFont(ofSize: 13)
cellDetailTitleLabel.textAlignment = .right
cellDetailTitleLabel.snp.makeConstraints {
$0.top.equalToSuperview().offset(16)
$0.trailing.equalToSuperview().offset(-24)
$0.height.equalTo(20)
}

cellDetailButton.setImage(UIImage(named: "termUncheck"), for: .normal)
cellDetailButton.setTitleColor(.mainTextColor, for: .normal)
cellDetailButton.titleLabel?.font = .mySystemFont(ofSize: 13)
cellDetailButton.semanticContentAttribute = .forceRightToLeft
cellDetailButton.snp.makeConstraints {
$0.top.equalToSuperview().offset(16)
$0.trailing.equalToSuperview().offset(-24)
$0.height.equalTo(20)
}

cellDetailOpenedLabeView.textColor = .mainTextColor
cellDetailOpenedLabeView.font = .mySystemFont(ofSize: 12)
cellDetailOpenedLabeView.textAlignment = .right
cellDetailOpenedLabeView.snp.makeConstraints {
$0.top.equalTo(cellDetailButton.snp.bottom).offset(5)
$0.trailing.equalToSuperview().offset(-24)
// $0.bottom.equalToSuperview().offset(-5)
}




}

required init?(coder: NSCoder) {
Expand Down
23 changes: 0 additions & 23 deletions EatDa/Scenes/Common/RestaurantDetail/Cell/RestaurantImageCVC.swift

This file was deleted.

20 changes: 13 additions & 7 deletions EatDa/Scenes/Common/RestaurantDetail/Cell/RestaurantMenuTVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,34 @@ class RestaurantMenuTVC: UITableViewCell {
let menuTitle = UILabel()
let menuDetail = UILabel()
let menuPrice = UILabel()
let reviewDivider = UIView()

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

super.init(style: style, reuseIdentifier: reuseIdentifier)

_ = [menuImage, menuTitle, menuDetail, menuPrice].map{ contentView.addSubview($0)}
_ = [menuImage, menuTitle, menuDetail, menuPrice, reviewDivider].map{ contentView.addSubview($0)}


menuImage.image = UIImage(named: "menu_datail")
menuImage.layer.cornerRadius = 15
menuImage.clipsToBounds = true
menuImage.contentMode = .scaleAspectFill
menuImage.snp.makeConstraints {
$0.centerY.equalToSuperview()
$0.leading.equalToSuperview().offset(28)
$0.width.height.equalTo(104)
$0.top.bottom.equalToSuperview().inset(17)
$0.leading.equalToSuperview().offset(20)
$0.width.height.equalTo(111)
}

menuTitle.font = .boldSystemFont(ofSize: 15)
menuTitle.textColor = UIColor.mainTextColor
menuTitle.text = "대패삼겹살 전골"
menuTitle.snp.makeConstraints {
$0.top.equalTo(menuImage.snp.top)
$0.top.equalTo(menuImage.snp.top).offset(5)
$0.leading.equalTo(menuImage.snp.trailing).offset(18)
}

menuDetail.font = .boldSystemFont(ofSize: 13)
menuDetail.font = .myMediumSystemFont(ofSize: 13)
menuDetail.textColor = UIColor.subTextColor
menuDetail.text = "주호식당 시그니처 메뉴\n대패 삼겹살 전골입니다"
menuDetail.numberOfLines = 2
Expand All @@ -54,10 +55,15 @@ class RestaurantMenuTVC: UITableViewCell {
menuPrice.textColor = UIColor.mainTextColor
menuPrice.text = "14,000원"
menuPrice.snp.makeConstraints {
$0.bottom.equalTo(menuImage.snp.bottom)
$0.bottom.equalTo(menuImage.snp.bottom).offset(-5)
$0.leading.equalTo(menuImage.snp.trailing).offset(18)
}

reviewDivider.backgroundColor = .seperatorColor
reviewDivider.snp.makeConstraints { make in
make.leading.trailing.bottom.equalToSuperview()
make.height.equalTo(1)
}

}

Expand Down
Loading

0 comments on commit 04f7eb0

Please sign in to comment.