Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View의 StateProtocol 분리 #209

Open
baekteun opened this issue Oct 25, 2023 · 0 comments
Open

View의 StateProtocol 분리 #209

baekteun opened this issue Oct 25, 2023 · 0 comments
Labels
1️⃣Priority: High 우선순위 상 🔨 Refactor 코드 리팩토링

Comments

@baekteun
Copy link
Member

public func updateContent(meals: [String]) {
self.removeAllChildren()
guard !meals.isEmpty else { return }
let mealViews = meals.map { DotoriLabel($0) }
mealViews.forEach { view in
view.alpha = 0.0
self.addArrangedSubview(view)
}
for (index, view) in mealViews.enumerated() {
UIView.animate(withDuration: 0.5, delay: 0.05 * Double(index), options: [], animations: {
view.alpha = 1.0
}, completion: nil)
}
}

일부 View들이 StateProtocol이나 ActionProtocol이 정의가 안되어있음. 가독성을 위해 정의하는거 어떤가요

@baekteun baekteun added 🔨 Refactor 코드 리팩토링 1️⃣Priority: High 우선순위 상 labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1️⃣Priority: High 우선순위 상 🔨 Refactor 코드 리팩토링
Projects
None yet
Development

No branches or pull requests

1 participant