-
Notifications
You must be signed in to change notification settings - Fork 25
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
날씨앱 [STEP 1] Wan #22
Open
hsw1920
wants to merge
21
commits into
yagom-academy:rft_2_wannn
Choose a base branch
from
hsw1920:rft_2_wannn_step1
base: rft_2_wannn
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
날씨앱 [STEP 1] Wan #22
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
15d047f
Step1: 폴더링 작업
hsw1920 9fb6d13
Step1: 스토리보드 제거
hsw1920 f7f07ab
Step1: DateFormatter 싱글톤으로 분리
hsw1920 dcdb313
Step1: 모델 분리
hsw1920 2f354d0
Step1: ViewController의 프로퍼티 분리
hsw1920 940321c
Step1: cell identifier 추가
hsw1920 a5b648b
Step1: TempUnit 변수명 명확하게 변경
hsw1920 94fb5cd
Step1: tempUnit의 값 변경의 책임을 자신이 하도록 변경
hsw1920 f2576d2
Step1: ImageServier 분리
hsw1920 6852563
Step1: imageService 분리
hsw1920 b88e253
Step1: 접근제어자, 인스턴스 강제 언래핑 수정
hsw1920 c0aae9c
Step1: 사용하지 않는 변수 삭제
hsw1920 7584f4b
Step1: DetailView 인스턴스 생성시 의존성 주입
hsw1920 73d1d7d
Step1: DetailView의 Image 패치를 ImageService에 맡기도록 의존성주입
hsw1920 79b5e62
Step1: DetailView를 Controller와 분리
hsw1920 4336d9b
Step1: WeatherViewModel 삭제
hsw1920 00efcbb
Step1: DetailViewController 수정
hsw1920 d318a58
Step1: 개행수정, 사용하지 않는 변수 처리
hsw1920 3bd5a10
Step1: WeatherDetail에 Weather의 imageService 주입
hsw1920 d811f9c
Step1: tableView configure 추가
hsw1920 e6e69e0
Step1: WeatherJSON 캡슐화
hsw1920 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
51 changes: 0 additions & 51 deletions
51
WeatherForecast/WeatherForecast/Base.lproj/Main.storyboard
This file was deleted.
Oops, something went wrong.
This file contains 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
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
WeatherForecast/WeatherForecast/Resource/SceneDelegate.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// WeatherForecast - SceneDelegate.swift | ||
// Created by yagom. | ||
// Copyright © yagom. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class SceneDelegate: UIResponder, UIWindowSceneDelegate { | ||
|
||
var window: UIWindow? | ||
|
||
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | ||
|
||
guard let scene = (scene as? UIWindowScene) else { return } | ||
window = UIWindow(windowScene: scene) | ||
|
||
let weatherService: WeatherJSONService = WeatherJSONService() | ||
let imageService: WeatherImageService = WeatherImageService() | ||
let tempUnit = TempUnit.fahrenheit | ||
|
||
let viewController = WeatherViewController(tempUnit: tempUnit, | ||
weatherService: weatherService, | ||
imageService: imageService) | ||
let navigationController = UINavigationController(rootViewController: viewController) | ||
window?.rootViewController = navigationController | ||
window?.makeKeyAndVisible() | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
WeatherForecast/WeatherForecast/Source/Model/TempUnit.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// TempUnit.swift | ||
// WeatherForecast | ||
// | ||
// Created by 홍승완 on 2024/03/12. | ||
// | ||
|
||
|
||
// MARK: - Temperature Unit | ||
enum TempUnit: String { | ||
case celsius, fahrenheit | ||
|
||
var symbol: String { | ||
switch self { | ||
case .celsius: | ||
return "℃" | ||
case .fahrenheit: | ||
return "℉" | ||
} | ||
} | ||
|
||
var description: String { | ||
switch self { | ||
case .celsius: | ||
return "섭씨" | ||
case .fahrenheit: | ||
return "화씨" | ||
} | ||
} | ||
|
||
mutating func toggle() { | ||
switch self { | ||
case .celsius: | ||
self = .fahrenheit | ||
case .fahrenheit: | ||
self = .celsius | ||
} | ||
} | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
온도 단위(섭씨, 화씨)를 변경하는 책임을 잘 할당해 보셨네요.👍