Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion FoodDiary/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ let project = Project(
],
settings: .settings(
base: [
"MARKETING_VERSION": "1.0.0",
"MARKETING_VERSION": "1.1.0",
"CURRENT_PROJECT_VERSION": "26050725",
"BASE_URL": "$(BASE_URL)",
"SENTRY_DSN": "$(SENTRY_DSN)",
"TARGETED_DEVICE_FAMILY": "1"
Expand Down
2 changes: 1 addition & 1 deletion FoodDiary/App/Resources/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.09803921568627451" green="0.09411764705882353" blue="0.12941176470588237" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" red="0.95294117647058818" green="0.96470588235294119" blue="0.97647058823529409" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="char-img-001" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="char-cx-001"/>
<constraint firstItem="char-img-001" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="char-cy-001"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF9",
"green" : "0xF6",
"red" : "0xF3"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xE0",
"green" : "0xE0",
"red" : "0xE0"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x2C",
"green" : "0x2C",
"red" : "0x2C"
}
},
"idiom" : "universal"
}
],
"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.
28 changes: 28 additions & 0 deletions FoodDiary/DesignSystem/Sources/Components/SearchTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,34 @@ public final class SearchTextField: UITextField {
}
}

public func applyColors(
backgroundColor: UIColor,
textColor: UIColor,
placeholderColor: UIColor,
iconColor: UIColor,
borderColor: UIColor? = nil,
borderWidth: CGFloat = 0
) {
self.backgroundColor = backgroundColor
self.textColor = textColor
layer.borderColor = borderColor?.cgColor
layer.borderWidth = borderWidth

if let placeholder = attributedPlaceholder?.string {
attributedPlaceholder = NSAttributedString(
string: placeholder,
attributes: [
.font: DesignSystemFontFamily.Pretendard.regular.font(size: 14),
.foregroundColor: placeholderColor
]
)
}

if let iconButton = rightView as? UIButton {
iconButton.tintColor = iconColor
}
}

@objc private func searchIconTapped() {
onSearchIconTapped?()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public final class AddressSearchViewController: UIViewController, UITextFieldDel
private lazy var closeButton: UIButton = {
let button = UIButton(type: .system)
button.setImage(UIImage(systemName: "xmark"), for: .normal)
button.tintColor = .white
button.tintColor = .gray850
button.addTarget(self, action: #selector(closeButtonTapped), for: .touchUpInside)
return button
}()
Expand All @@ -68,25 +68,22 @@ public final class AddressSearchViewController: UIViewController, UITextFieldDel

private let guideLabel: UILabel = {
let label = UILabel()
label.setText("이 식당을 찾고 계신가요?", style: .hd16)
label.setText("이 식당을 찾고 계신가요?", style: .hd16, color: .gray850)
return label
}()

private let resultsContainerView: UIView = {
let view = UIView()
view.backgroundColor = .clear
view.layer.borderColor = UIColor.sd800.cgColor
view.layer.borderWidth = 1

view.layer.cornerRadius = 12
view.backgroundColor = .gray040
view.layer.cornerRadius = 10
view.clipsToBounds = true
view.isHidden = true
return view
}()

private let emptyResultLabel: UILabel = {
let label = UILabel()
label.setText("검색 결과가 없습니다.", style: .p14, color: .gray400)
label.setText("검색 결과가 없습니다.", style: .p14, color: .gray500)
label.textAlignment = .center
label.isHidden = true
return label
Expand All @@ -95,8 +92,8 @@ public final class AddressSearchViewController: UIViewController, UITextFieldDel
private lazy var resultsTableView: UITableView = {
let tv = UITableView()
tv.backgroundColor = .clear
tv.separatorColor = .sd600
tv.separatorInset = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)
tv.separatorColor = .gray150
tv.separatorInset = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
tv.delegate = tableViewHandler
tv.dataSource = tableViewHandler
tv.register(
Expand Down Expand Up @@ -157,7 +154,13 @@ public final class AddressSearchViewController: UIViewController, UITextFieldDel
// MARK: - Setup

private func setupUI() {
view.backgroundColor = .sdBase
view.backgroundColor = .white
searchTextField.applyColors(
backgroundColor: .gray040,
textColor: .gray850,
placeholderColor: .gray600,
iconColor: .gray850
)

view.addSubview(closeButton)
view.addSubview(searchTextField)
Expand Down Expand Up @@ -236,10 +239,10 @@ public final class AddressSearchViewController: UIViewController, UITextFieldDel

switch state.mode {
case .suggestions:
guideLabel.setText("이 식당을 찾고 계신가요?", style: .hd16)
guideLabel.setText("이 식당을 찾고 계신가요?", style: .hd16, color: .gray850)
displayResults = state.suggestions
case .searchResults:
guideLabel.setText("검색 결과", style: .hd16)
guideLabel.setText("검색 결과", style: .hd16, color: .gray850)
displayResults = state.searchResults
}

Expand All @@ -250,13 +253,23 @@ public final class AddressSearchViewController: UIViewController, UITextFieldDel
if displayResults.isEmpty {
switch state.mode {
case .suggestions:
emptyResultLabel.setText("추천 목록이 없습니다.", style: .p14, color: .gray400)
emptyResultLabel.setText("추천 목록이 없습니다.", style: .p14, color: .gray500)
case .searchResults:
emptyResultLabel.setText("검색 결과가 없습니다.", style: .p14, color: .gray400)
emptyResultLabel.setText("검색 결과가 없습니다.", style: .p14, color: .gray500)
}
}
emptyResultLabel.isHidden = !displayResults.isEmpty

let isSearching = !(state.searchKeyword.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
searchTextField.applyColors(
backgroundColor: .gray040,
textColor: .gray850,
placeholderColor: .gray600,
iconColor: .gray850,
borderColor: isSearching ? .primary : nil,
borderWidth: isSearching ? 1 : 0
)

Task { @MainActor [weak self] in
guard let self else { return }
self.containerHeightConstraint?.update(offset: self.view.bounds.height)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class AddressSearchResultCell: UITableViewCell {
let button = UIButton(type: .system)
var config = UIButton.Configuration.plain()
config.attributedTitle = {
var attributed = AttributedString(Typography.p14.styled("선택", color: .white))
var attributed = AttributedString(Typography.p12.styled("선택", color: .gray850))
attributed.underlineStyle = .single
return attributed
}()
Expand Down Expand Up @@ -104,8 +104,8 @@ final class AddressSearchResultCell: UITableViewCell {
// MARK: - Configure

func configure(with result: AddressSearchResult) {
placeNameLabel.setText(result.placeName, style: .hd16)
roadAddressLabel.setText(result.roadAddress, style: .p14, color: .gray400)
placeNameLabel.setText(result.placeName, style: .hd16, color: .gray850)
roadAddressLabel.setText(result.roadAddress, style: .p14, color: .gray800)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public extension UIColor {
static let gray300 = DesignSystemAsset.gray300.color
static let gray200 = DesignSystemAsset.gray200.color
static let gray100 = DesignSystemAsset.gray100.color
static let gray040 = DesignSystemAsset.gray040.color
static let gray150 = DesignSystemAsset.gray150.color
static let gray050 = DesignSystemAsset.gray050.color
static let gray020 = DesignSystemAsset.gray020.color
static let gray850 = DesignSystemAsset.gray850.color
}
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public final class DetailViewController: UIViewController {
}

private func formatRecordForShare(_ name: String, _ url: String) -> String {
return "\(name) 맛을 기억하시나요?\n\n\(url)"
return "\(name) 맛을 기억하시나요?\n뭐먹었지에서 확인해보세요.\n\(url)\n\n 나도 시작하기\nhttps://mumuk.ai.kr/"
}

private func presentShareSheet(items: [Any]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ final class ImagePickerSectionHeaderView: UICollectionReusableView {
}

func configure(title: String, guideText: String? = nil) {
titleLabel.setText(title, style: .hd16, color: .white)
titleLabel.setText(title, style: .hd16, color: .gray900)

if let guideText {
guideLabel.setText(guideText, style: .p14, color: .gray400)
guideLabel.setText(guideText, style: .p14, color: .gray500)
guideLabel.isHidden = false
} else {
guideLabel.isHidden = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public final class ImagePickerViewController:
}

let label = UILabel()
label.setText("오늘은 촬영된 사진이 없어요", style: .p12, color: .gray050)
label.setText("오늘은 촬영된 사진이 없어요", style: .p12, color: .gray500)
label.textAlignment = .center

let stackView = UIStackView(arrangedSubviews: [imageView, label])
Expand Down Expand Up @@ -178,6 +178,7 @@ public final class ImagePickerViewController:
setupUI()
setupConstraints()
loadPhotos()
navigationController?.navigationBar.tintColor = .gray900

resultPublisher
.compactMap { if case .selected(let a) = $0 { return a } else { return nil } }
Expand Down Expand Up @@ -240,12 +241,12 @@ public final class ImagePickerViewController:
target: self,
action: #selector(selectAllButtonTapped)
)
selectAllButton.tintColor = .white
selectAllButton.tintColor = .gray900
navigationItem.rightBarButtonItem = selectAllButton
}

private func setupUI() {
view.backgroundColor = DesignSystemAsset.sdBase.color
view.backgroundColor = .white

view.addSubview(collectionView)
view.addSubview(emptyView)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ final class ProfileHeaderView: UIView {
iv.layer.cornerRadius = 36
iv.clipsToBounds = true
iv.layer.borderWidth = 3
iv.layer.borderColor = UIColor.sd800.cgColor
iv.layer.borderColor = UIColor.white.cgColor

return iv
}()

private let greetingLabel: UILabel = {
let label = UILabel()
label.setText("안녕하세요,", style: .p12, color: .gray050)
label.setText("안녕하세요,", style: .p12, color: .gray500)
label.textAlignment = .center
return label
}()

private let nameLabel: UILabel = {
let label = UILabel()
label.setText("홍길동님", style: .hd18, color: .white)
label.setText("홍길동님", style: .hd18, color: .gray900)
label.textAlignment = .center
return label
}()
Expand All @@ -55,12 +55,12 @@ final class ProfileHeaderView: UIView {

private let separatorView: UIView = {
let view = UIView()
view.backgroundColor = .sd800
view.backgroundColor = .gray150
return view
}()

func configure(nickname: String) {
nameLabel.setText("\(nickname)님", style: .hd18, color: .white)
nameLabel.setText("\(nickname)님", style: .hd18, color: .gray900)
}

override init(frame: CGRect) {
Expand All @@ -75,21 +75,21 @@ final class ProfileHeaderView: UIView {
}

private func setupUI() {
backgroundColor = .sd700
backgroundColor = .gray040
[contentStackView, separatorView].forEach { addSubview($0) }
}

private func setupConstraints() {
self.snp.makeConstraints {
$0.height.equalTo(280)
$0.height.equalTo(248)
}

characterImageView.snp.makeConstraints {
$0.size.equalTo(72)
}

contentStackView.snp.makeConstraints {
$0.centerY.equalToSuperview().offset(40)
$0.centerY.equalToSuperview()
$0.centerX.equalToSuperview()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class WithdrawalFooterView: UIView {

private let withdrawalLabel: UILabel = {
let label = UILabel()
let base = Typography.p12.styled("탈퇴", color: .gray050)
let base = Typography.p12.styled("탈퇴", color: .gray900)
let mutable = NSMutableAttributedString(attributedString: base)
mutable.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: NSRange(location: 0, length: mutable.length))
label.attributedText = mutable
Expand All @@ -27,7 +27,7 @@ final class WithdrawalFooterView: UIView {
addSubview(withdrawalLabel)

withdrawalLabel.snp.makeConstraints {
$0.trailing.equalToSuperview().offset(-28)
$0.trailing.equalToSuperview().offset(-16)
$0.centerY.equalToSuperview()
}

Expand Down
Loading
Loading