Skip to content

Commit

Permalink
Merge pull request #208 from Pepsi-Club/design/#203
Browse files Browse the repository at this point in the history
Design/#203
  • Loading branch information
isakatty authored Apr 11, 2024
2 parents c9a0a7e + f4b03bc commit d546af7
Show file tree
Hide file tree
Showing 17 changed files with 175 additions and 94 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "bigBusStop.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
6 changes: 3 additions & 3 deletions Projects/DesignSystem/Sources/BottomButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public final class BottomButton: UIButton {
) {
super.init(frame: .zero)
var config = UIButton.Configuration.filled()
let font = DesignSystemFontFamily.NanumSquareNeoOTF.regular.font(
let font = DesignSystemFontFamily.NanumSquareNeoOTF.bold.font(
size: 18
)
config.cornerStyle = .capsule
Expand All @@ -36,13 +36,13 @@ public final class BottomButton: UIButton {
string: title,
attributes: [
.font: font,
.foregroundColor: DesignSystemAsset.gray4.color
.foregroundColor: DesignSystemAsset.gray1.color
]
),
for: .disabled
)
configuration = config
tintColor = DesignSystemAsset.bottonBtnColor.color
tintColor = DesignSystemAsset.weekDayBlue.color
}

required init?(coder: NSCoder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class EmptyRegularAlarmView: UIView {
)
label.textColor = DesignSystemAsset.gray6.color
label.textAlignment = .center
label.numberOfLines = 2
label.numberOfLines = 3
let message1 = NSAttributedString(
string: "특정 시간대에 자주 타는 버스가 있다면?\n",
attributes: [
Expand All @@ -42,8 +42,18 @@ final class EmptyRegularAlarmView: UIView {
.foregroundColor: DesignSystemAsset.bottonBtnColor.color
]
)
let padding = NSAttributedString(
string: "\n",
attributes: [
.font: DesignSystemFontFamily.NanumSquareNeoOTF.bold.font(
size: 6
),
.foregroundColor: DesignSystemAsset.bottonBtnColor.color
]
)
let attributedString = NSMutableAttributedString()
attributedString.append(message1)
attributedString.append(padding)
attributedString.append(message2)
label.attributedText = attributedString
return label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ final class AddRegularAlarmViewController: UIViewController {

private let titleLabel: UILabel = {
let label = UILabel()
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.regular.font(
size: 22
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.extraBold.font(
size: 23
)
label.textAlignment = .left
label.textColor = .black
Expand All @@ -32,11 +32,11 @@ final class AddRegularAlarmViewController: UIViewController {
private let firstDescriptionLabel: UILabel = {
let label = UILabel()
label.text = "1. 정류장 및 버스 등록하기"
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.regular.font(
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.bold.font(
size: 16
)
label.textAlignment = .left
label.textColor = .black
label.textColor = DesignSystemAsset.settingColor.color
return label
}()

Expand All @@ -55,11 +55,11 @@ final class AddRegularAlarmViewController: UIViewController {
private let secondDescriptionLabel: UILabel = {
let label = UILabel()
label.text = "2. 시간 등록하기"
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.regular.font(
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.bold.font(
size: 16
)
label.textAlignment = .left
label.textColor = .black
label.textColor = DesignSystemAsset.settingColor.color
return label
}()

Expand All @@ -74,11 +74,11 @@ final class AddRegularAlarmViewController: UIViewController {
private let thirdDescriptionLabel: UILabel = {
let label = UILabel()
label.text = "3. 요일 등록하기"
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.regular.font(
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.bold.font(
size: 16
)
label.textAlignment = .left
label.textColor = .black
label.textColor = DesignSystemAsset.settingColor.color
return label
}()

Expand Down Expand Up @@ -298,8 +298,10 @@ final class AddRegularAlarmViewController: UIViewController {
var color: UIColor
if response.weekday.contains(btn.tag) {
color = DesignSystemAsset.weekDayBlue.color
btn.setTitleColor(.white, for: .normal)
} else {
color = DesignSystemAsset.weekDayGray.color
btn.setTitleColor(.black, for: .normal)
}
btn.backgroundColor = color
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public final class RegularAlarmViewController: UIViewController {

private let titleLabel: UILabel = {
let label = UILabel()
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.regular.font(
size: 22
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.extraBold.font(
size: 25
)
label.text = "정기 알람"
label.textColor = .black
Expand Down
21 changes: 11 additions & 10 deletions Projects/Feature/HomeFeature/Sources/View/FavoritesHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ internal final class FavoritesHeaderView: UITableViewHeaderFooterView {
var disposeBag = DisposeBag()
private let busStopNameLabel: UILabel = {
let label = UILabel()
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.regular.font(
size: 18
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.bold.font(
size: 16
)
label.textAlignment = .left
label.textColor = .black
label.textColor = DesignSystemAsset.settingColor.color
return label
}()

Expand Down Expand Up @@ -60,6 +60,14 @@ internal final class FavoritesHeaderView: UITableViewHeaderFooterView {
}

NSLayoutConstraint.activate([
busStopNameLabel.leadingAnchor.constraint(
equalTo: directionLabel.leadingAnchor
),
busStopNameLabel.bottomAnchor.constraint(
equalTo: directionLabel.topAnchor,
constant: -5
),

directionLabel.leadingAnchor.constraint(
equalTo: contentView.leadingAnchor,
constant: 20
Expand All @@ -68,13 +76,6 @@ internal final class FavoritesHeaderView: UITableViewHeaderFooterView {
equalTo: contentView.bottomAnchor,
constant: -10
),

busStopNameLabel.leadingAnchor.constraint(
equalTo: directionLabel.leadingAnchor
),
busStopNameLabel.bottomAnchor.constraint(
equalTo: directionLabel.topAnchor
),
])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import Domain
class FavoritesTVCell: UITableViewCell {
private let routeLabel: UILabel = {
let label = UILabel()
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.heavy.font(
size: 20
)
label.font = .nanumHeavy(size: 18)
label.textColor = DesignSystemAsset.limeGreen.color
label.adjustsFontSizeToFitWidth = true
label.minimumScaleFactor = 0.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ public final class BusStopInformationView: UIView {
private let symbolSize = 50

private let busStopSymbol: UIImageView = {
let image = UIImageView(
image: UIImage(systemName: "mappin.and.ellipse")!
)
image.tintColor = DesignSystemAsset.gray5.color
return image
let imageView = UIImageView()
imageView.image = DesignSystemAsset.bigBusStop.image
return imageView
}()

private let busStopNameLabel: UILabel = {
Expand All @@ -37,34 +35,54 @@ public final class BusStopInformationView: UIView {
private let busStopDescription: UILabel = {
let label = UILabel()
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.light.font(
size: 13
)
size: 13
)
label.adjustsFontForContentSizeCategory = true
label.minimumScaleFactor = 0.8
label.textColor = .black
return label
}()

private let distanceStringLabel: UILabel = {
let label = UILabel()
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.light.font(
size: 13
)
label.text = "현재 위치에서 약 "
label.textColor = .black
return label
}()

private let distanceFromBusStopLabel: UILabel = {
let label = UILabel()
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.regular.font(
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.bold.font(
size: 13
)
label.textColor = .black
label.textColor = DesignSystemAsset.lightRed.color
return label
}()

private let distanceStringLabel2: UILabel = {
let label = UILabel()
label.font = DesignSystemFontFamily.NanumSquareNeoOTF.light.font(
size: 13
)
label.text = " 떨어져 있어요"
label.textColor = .black
return label
}()

private let separationView: UIView = {
let view = UIView()
view.backgroundColor = DesignSystemAsset.gray5.color
view.backgroundColor = .black
return view
}()

private lazy var busStopNameStackView: UIStackView = {
let stackView = UIStackView(
arrangedSubviews: [
busStopNameLabel,
busStopDescription
busStopDescription,
]
)
stackView.axis = .vertical
Expand All @@ -73,6 +91,20 @@ public final class BusStopInformationView: UIView {
stackView.spacing = 3
return stackView
}()

private lazy var distancStackView: UIStackView = {
let stackView = UIStackView(
arrangedSubviews: [
distanceStringLabel,
distanceFromBusStopLabel,
distanceStringLabel2
]
)
stackView.axis = .horizontal
stackView.alignment = .leading
stackView.spacing = 1
return stackView
}()

// MARK: - Life Cycle

Expand All @@ -93,7 +125,7 @@ public final class BusStopInformationView: UIView {
[
busStopSymbol,
busStopNameStackView,
distanceFromBusStopLabel,
distancStackView,
separationView,
].forEach {
self.addSubview($0)
Expand All @@ -117,6 +149,10 @@ public final class BusStopInformationView: UIView {
busStopSymbol.widthAnchor.constraint(
equalToConstant: CGFloat(symbolSize)
),
busStopSymbol.bottomAnchor.constraint(
equalTo: separationView.topAnchor,
constant: 0
),

// busStopNameStackView
busStopNameStackView.topAnchor.constraint(
Expand All @@ -142,29 +178,25 @@ public final class BusStopInformationView: UIView {
),
separationView.leftAnchor.constraint(
equalTo: self.leftAnchor,
constant: 20
constant: 15
),
separationView.rightAnchor.constraint(
equalTo: self.rightAnchor,
constant: -10
),
separationView.heightAnchor.constraint(
equalToConstant: 1
equalToConstant: 1
),

// distanceFromBusStopLabel
distanceFromBusStopLabel.topAnchor.constraint(
distancStackView.topAnchor.constraint(
equalTo: separationView.bottomAnchor,
constant: 10
),
distanceFromBusStopLabel.leftAnchor.constraint(
distancStackView.leftAnchor.constraint(
equalTo: self.leftAnchor,
constant: 20 + CGFloat(symbolSize) + 15
),
distanceFromBusStopLabel.rightAnchor.constraint(
equalTo: self.rightAnchor,
constant: -10
),
)
])

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ public final class NearMapViewController: UIViewController {
),
busStopInformationView.leadingAnchor.constraint(
equalTo: safeArea.leadingAnchor,
constant: 10
constant: 7
),
busStopInformationView.trailingAnchor.constraint(
equalTo: safeArea.trailingAnchor,
constant: -10
constant: -7
),
busStopInformationView.heightAnchor.constraint(
equalToConstant: 130
Expand All @@ -117,11 +117,11 @@ public final class NearMapViewController: UIViewController {
),
naverMap.leadingAnchor.constraint(
equalTo: safeArea.leadingAnchor,
constant: 5
constant: 7
),
naverMap.trailingAnchor.constraint(
equalTo: safeArea.trailingAnchor,
constant: -5
constant: -7
),
naverMap.bottomAnchor.constraint(
equalTo: busStopInformationView.topAnchor,
Expand Down
Loading

0 comments on commit d546af7

Please sign in to comment.