Skip to content

Commit

Permalink
Merge pull request #81 from Team-Clody/fix/#79-release
Browse files Browse the repository at this point in the history
Fix [#79] 캘린더 셀이 제대로 안 뜨는 문제 해결 (아이폰 13 프로 맥스 기종에서 발생)
  • Loading branch information
kim-seonwoo authored Aug 29, 2024
2 parents 7cbb146 + b226dc0 commit 3287b92
Show file tree
Hide file tree
Showing 44 changed files with 101 additions and 127 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
{
"images" : [
{
"filename" : "Group 2085664794.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
"filename" : "clover0.svg",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
@@ -1,19 +1,8 @@
{
"images" : [
{
"filename" : "Group 2085664795.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
"filename" : "clover1.svg",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
@@ -1,19 +1,8 @@
{
"images" : [
{
"filename" : "Group 2085664795.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
"filename" : "clover2.svg",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
@@ -1,19 +1,8 @@
{
"images" : [
{
"filename" : "Group 2085664796.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
"filename" : "clover3.svg",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
@@ -1,19 +1,8 @@
{
"images" : [
{
"filename" : "Group 2085664796.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
"filename" : "clover4.svg",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
@@ -1,19 +1,8 @@
{
"images" : [
{
"filename" : "Group 2085664797.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
"filename" : "clover5.svg",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
{
"images" : [
{
"filename" : "btn_clover.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
"filename" : "cloverToday.svg",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
{
"images" : [
{
"filename" : "ic_todayclover_yet.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
"filename" : "cloverTodayDone.svg",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class CalendarDateCell: FSCalendarCell {
// MARK: - UI Components

private var cloverImageView = UIImageView()
var clendarDateLabel = UILabel()
var calendarDateLabel = UILabel()
private let newImageView = UIImageView()
let backgroundSelectView = UIView()

Expand All @@ -43,8 +43,8 @@ final class CalendarDateCell: FSCalendarCell {
$0.contentMode = .scaleAspectFit
}

clendarDateLabel.do {
$0.attributedText = UIFont.pretendardString(text: "20", style: .detail1_medium)
calendarDateLabel.do {
$0.attributedText = UIFont.pretendardString(text: "", style: .detail1_medium)
$0.textColor = .grey05
}

Expand All @@ -56,7 +56,7 @@ final class CalendarDateCell: FSCalendarCell {

backgroundSelectView.do {
$0.backgroundColor = .grey02
$0.layer.cornerRadius = ScreenUtils.getHeight(8)
$0.layer.cornerRadius = ScreenUtils.getHeight(20) / 2
}
}

Expand All @@ -65,14 +65,14 @@ final class CalendarDateCell: FSCalendarCell {
cloverImageView,
newImageView,
backgroundSelectView,
clendarDateLabel
calendarDateLabel
)
}

func setLayout() {
cloverImageView.snp.makeConstraints {
$0.centerX.equalToSuperview()
$0.top.equalToSuperview()
$0.top.equalToSuperview().inset(ScreenUtils.getHeight(1))
$0.width.equalTo(ScreenUtils.getWidth(26))
$0.height.equalTo(ScreenUtils.getHeight(25))
}
Expand All @@ -84,25 +84,24 @@ final class CalendarDateCell: FSCalendarCell {
}

backgroundSelectView.snp.makeConstraints {
$0.bottom.equalToSuperview().inset(ScreenUtils.getHeight(6))
$0.top.equalTo(cloverImageView.snp.bottom).offset(ScreenUtils.getHeight(6))
$0.centerX.equalTo(cloverImageView)
$0.horizontalEdges.equalTo(cloverImageView)
$0.height.equalTo(ScreenUtils.getHeight(16))
$0.leading.equalTo(cloverImageView).offset(-ScreenUtils.getWidth(1))
$0.trailing.equalTo(cloverImageView).offset(ScreenUtils.getWidth(1))
$0.height.equalTo(ScreenUtils.getHeight(20))
}

clendarDateLabel.snp.makeConstraints {
calendarDateLabel.snp.makeConstraints {
$0.center.equalTo(backgroundSelectView)
}
}

}

extension CalendarDateCell {

func configure(isToday: Bool, isSelected: Bool, isDeleted: Bool, date: String, data: MonthlyDiary) {
// 캘린더 분기처리 로직
cloverImageView.image = UIImage(named: "clover\(data.diaryCount)")
clendarDateLabel.textColor = .grey05
backgroundSelectView.isHidden = true

if data.replyStatus == "READY_NOT_READ" {
Expand Down Expand Up @@ -132,15 +131,14 @@ extension CalendarDateCell {
cloverImageView.image = (data.replyStatus == "READY_READ") ? UIImage(named: "clover\(data.diaryCount)") : .cloverTodayDone
}
}
clendarDateLabel.textColor = .black
}

// 선택된 날짜 처리
if isSelected {
backgroundSelectView.isHidden = false
clendarDateLabel.textColor = .white
calendarDateLabel.attributedText = UIFont.pretendardString(text: date, style: .detail1_medium, color: .white)
} else {
calendarDateLabel.attributedText = UIFont.pretendardString(text: date, style: .detail1_medium, color: isToday ? .black : .grey05)
}

self.clendarDateLabel.text = date
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ final class CalendarView: BaseView {
$0.translatesAutoresizingMaskIntoConstraints = false
$0.locale = Locale(identifier: "ko_KR")
$0.headerHeight = 0
$0.weekdayHeight = 50
$0.rowHeight = 71
$0.weekdayHeight = ScreenUtils.getHeight(32)
$0.rowHeight = ScreenUtils.getHeight(71)
$0.scrollEnabled = false

$0.appearance.weekdayFont = .pretendard(.body3_medium)
$0.appearance.weekdayFont = .pretendard(.body4_medium)
$0.appearance.weekdayTextColor = .grey06
}

Expand Down Expand Up @@ -158,7 +158,7 @@ final class CalendarView: BaseView {

calendarNavigationView.snp.makeConstraints {
$0.top.equalToSuperview()
$0.width.equalToSuperview()
$0.horizontalEdges.equalToSuperview()
$0.height.equalTo(ScreenUtils.getHeight(44))
}

Expand All @@ -174,9 +174,9 @@ final class CalendarView: BaseView {
}

mainCalendarView.snp.makeConstraints {
$0.top.equalTo(cloverBackgroundView.snp.bottom).offset(ScreenUtils.getHeight(5))
$0.horizontalEdges.equalToSuperview().inset(ScreenUtils.getWidth(24))
$0.height.equalTo(ScreenUtils.getHeight(399))
$0.top.equalTo(cloverBackgroundView.snp.bottom).offset(ScreenUtils.getHeight(6))
$0.horizontalEdges.equalToSuperview().inset(24)
$0.height.equalTo(ScreenUtils.getHeight(71)*5 + ScreenUtils.getHeight(32))
}

dividerView.snp.makeConstraints {
Expand Down

0 comments on commit 3287b92

Please sign in to comment.