Skip to content

Commit

Permalink
♻️ ::[#184] HomeFeature / 공백제거
Browse files Browse the repository at this point in the history
  • Loading branch information
junseopark0331 committed Jan 3, 2024
1 parent bed3483 commit 45fc15d
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,20 @@ final class MealContentStackView: UIStackView {
self.isLayoutMarginsRelativeArrangement = true
self.alignment = .leading
}

@available(*, unavailable)
required init(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
public func updateContent(meals: [String]) {
self.removeAllChildren()
var mealViews: [DotoriLabel] = []

if meals.isEmpty {
let emptyLabels = (1...6).map { _ in DotoriLabel("") }
mealViews.append(DotoriLabel("급식이 없습니다."))
mealViews.append(contentsOf: emptyLabels)
} else {
mealViews = meals.map { DotoriLabel($0) }
}

for (index, view) in mealViews.enumerated() {
UIView.animate(withDuration: 0.5, delay: 0.05 * Double(index), options: [], animations: {
view.alpha = 1.0
Expand Down

0 comments on commit 45fc15d

Please sign in to comment.