Open
Conversation
Yeonnies
approved these changes
Dec 26, 2025
Collaborator
Yeonnies
left a comment
There was a problem hiding this comment.
솔직히 코드 너무 훌륭한데요
DI 컨테이너까지 사용하실 줄 몰랐고 MVVM 분리가 명확했고 네이밍도 명확하네요
진짜 배워갑니다.. 엄청 성장하신거 같아요..
--편지--
원래부터 잘하는 줄은 알고 있었지만 진짜 잘하네..
사실 첨에 태도가 좀 맘에 안들었는데 피드백 듣고 항상 열심히 해줘서 고맙다!
스매싱 가서도 열심히 하거라~ 스유로 하니까 걍 날라다니네
|
|
||
| import Foundation | ||
|
|
||
| final class AppDIContainer { |
| HStack(spacing: 12) { | ||
| ForEach(row, id: \.self) { button in | ||
| CalculatorButtonView(button: button) { | ||
| viewModel.buttonPressed(button) |
Collaborator
There was a problem hiding this comment.
지금 이거 뎁스 너무 깊지 않나요.. 저는 이런 경우 익스텐션에 뷰를 만들거덩여.. 물론 코드 스타일이니 갠취지만 훨씬 가독성이 좋아집니다
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
작업 내용
TDD 방식으로 iOS 계산기 앱을 구현했습니다. SwiftUI와 MVVM 아키텍처를 사용했고, 테스트 가능한 코드를 위해 의존성 주입 패턴을 적용했습니다.
구현 기능
기본 기능
핵심 기능: 연속 계산
일반 계산기처럼 연속으로 계산이 가능합니다.
예시: 24 + 36 + 20 = 80
아키텍처
MVVM 패턴으로 View, ViewModel, Model을 분리했습니다.
의존성 주입
프로토콜을 사용해서 ViewModel이 Calculator를 주입받도록 했습니다.