Skip to content

Commit

Permalink
Merge pull request #215 from devxsby/chore/#214-현재달수정
Browse files Browse the repository at this point in the history
[Chore] Custom Month View 현재 달 수정 (#214)
  • Loading branch information
devxsby committed Aug 1, 2022
2 parents 7c58744 + b5c0c21 commit 44b4157
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ final class CustomMonthView: UIView {

// MARK: - Properties
weak var delegate: CustomMonthViewDelegate?
var currentMonth: Int = Calendar.current.component(.month, from: Date())
var isMonthViewEnabled: Bool = false

// MARK: - UI
lazy var monthLabel = UILabel().then {
$0.text = "2022 . 07"
if currentMonth < 10 {
$0.text = "2022 . 0" + "\(currentMonth)"
} else {
$0.text = "2022 . " + "\(currentMonth)"
}
$0.textColor = .hpWhite
$0.font = UIFont.font(.gmarketSansBold, ofSize: 16)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,11 @@ extension CustomPopUpController {
switch response {
case .success:
self.dismiss(animated: true) {
LoadingIndicator.hideLoading()
self.delegate?.popUpDidDismiss()
}
default:
break
self.showAlert(title: "네트워크 오류로 인해\n데이터를 불러올 수 없습니다.\n다시 시도해 주세요.")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Then

final class HappicReportController: UIViewController {
// MARK: - Properties
var currentMonth: String = "7" {
var currentMonth: String = String(Calendar.current.component(.month, from: Date())) {
didSet {
setCustomMonthViewText(month: currentMonth)
setCustomMonthPickerViewSelected(month: currentMonth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ final class HaruHappicDetailController: UIViewController {
}

private lazy var dateLabel = UILabel().then {
$0.text = "2022 . 07 . 20"
$0.textColor = .hpWhite
$0.font = UIFont.font(.pretendardBold, ofSize: 18)
}
Expand All @@ -68,21 +67,10 @@ final class HaruHappicDetailController: UIViewController {
return collectionView
}()

private lazy var whenLabel = UILabel().then {
$0.text = "#오후2시"
}

private lazy var whereLabel = UILabel().then {
$0.text = "#집구석구석"
}

private lazy var whoLabel = UILabel().then {
$0.text = "#햄식달식이"
}

private lazy var whatLabel = UILabel().then {
$0.text = "#짱짱귀여워"
}
private lazy var whenLabel = UILabel()
private lazy var whereLabel = UILabel()
private lazy var whoLabel = UILabel()
private lazy var whatLabel = UILabel()

private lazy var tagStackView = UIStackView(arrangedSubviews: [whenLabel, whereLabel, whoLabel, whatLabel]).then {
$0.axis = .horizontal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ extension TabBarController {
} else {
self.setActionSheet()
}
LoadingIndicator.hideLoading()
default:
break
self.showAlert(title: "네트워크 오류로 인해\n데이터를 불러올 수 없습니다.\n다시 시도해 주세요.")
}
}
}
Expand Down

0 comments on commit 44b4157

Please sign in to comment.