์ „์ฒด ๊ธ€

UIKit์œผ๋กœ ๊ฐœ๋ฐœํ•˜๋‹ค๊ฐ€ ํ˜„์žฌ๋Š” SwiftUI๋กœ ์„œ๋น„์Šค ๊ฐœ๋ฐœํ•˜๊ณ  ์žˆ๋Š” Fram์ž…๋‹ˆ๋‹ค SwiftUI์™€ Combine์— ๋Œ€ํ•ด ์•Œ๊ฒŒ ๋œ ๊ฒƒ๊ณผ ๊ธฐ์ˆ ์„ ๊ณต์œ ํ•˜๋Š” ๋ธ”๋กœ๊ทธ ์ž…๋‹ˆ๋‹ค. ์ฃผ์˜ : ์ ์—ˆ๋˜๊ฑฐ ๋˜ ์ ์„ ์ˆ˜ ์žˆ์Œ
.onAppear { if [์กฐ๊ฑด์‹] { DispatchQueue.main.async { isShowView = true } } } .fullScreenCover(isPresented: $isShowView) { ChildView() } iOS 16, iOS 17์—์„œ๋Š” ์ž˜ ๋™์ž‘ํ•˜๋Š”๋ฐ iOS 15์—์„œ๋Š” DispatchQueue.main ์œผ๋กœ ํ•ด์ค˜์•ผ fullScreenCover๊ฐ€ ์ •์ƒ ๋™์ž‘ํ•œ๋‹ค. ๊ตฌ์ฒด์ ์ธ ์ด์œ ๋Š” ์•„์ง ์ž˜ ๋ชจ๋ฅด๊ฒ ๋‹ต... ใ… ใ… 
TCA๋ฅผ ๊ณต๋ถ€ํ•˜๋‹ค ๋ณด๋‹ˆ SwiftUI ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ UIKit์—์„œ๋„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” Dependency๋ฅผ ์ œ๊ณตํ•˜๊ธธ๋ž˜ ๋”ฐ๋กœ ๊ธ€์„ ์ ์–ด์•ผ ๊ฒ ๋”๋ผ๊ตฌ์š”! ์˜์กด์„ฑ์„ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ Swinject, Niddle, Factory ๋“ฑ์˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์žˆ๋Š”๋ฐ TCA์˜ Depdency๋„ ํ›Œ๋ฅญํ•˜๊ณ  ์‚ฌ์šฉํ•˜๊ธฐ ํŽธ๋ฆฌํ•œ ์˜์กด์„ฑ ๊ด€๋ฆฌ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ๊ณต์‹ ๋ฌธ์„œ์˜ ๊ณต์‹ ๋ฒˆ์—ญ์€ ์•„๋ž˜ ์‚ฌ์ดํŠธ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š” Chapter 5. Dependency | Built with Notion 5.1 TCA์™€ Dependency axiomatic-fuschia-666.notion.site ๊ณต์‹ ๋ฌธ์„œ๋ฅผ ๋ณด์‹œ๋ ค๋ฉด ์ด ์‚ฌ์ดํŠธ๋กœ ์ด๋™ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. Documentation pointfreeco.github.io TCA์—์„œ๋Š” DI(Dependency Inje..
SwiftUI TCA ์žฅ์  - State ์˜ ๋ณ€๊ฒฝ -> UI์— ์ฆ‰์‹œ ๋ฐ˜์˜ - ์ฝ”๋“œ ์ž‘์„ฑ์ด ๊ฐ„๋‹จํ•จ - State ๋ณ€๊ฒฝ ๋กœ์ง ๊ด€๋ฆฌ ์šฉ์ด - ๋ณต์žกํ•œ State์™€ ์ด์— ๋”ฐ๋ฅธ Side Effect ์ฒ˜๋ฆฌ ์šฉ์ด ๋‹จ์  - State ๊ด€๋ฆฌ๊ฐ€ ๋ณต์žกํ•ด ์งˆ์ˆ˜๋ก State ๋ณ€ํ™”์— ๋”ฐ๋ฅธ side effect๋ฅผ ๊ด€๋ฆฌํ•˜๊ธฐ ์–ด๋ ค์›€ - ์–ด๋ ค์šด ๊ตฌํ˜„ ๋‚œ์ด๋„ ๐ŸฅŠ ๐Ÿ˜ซ TCA Binding public func binding( get: @escaping (_ state: ViewState) -> Value, send valueToAction: @escaping (_ value: Value) -> ViewAction ) -> Binding { ObservedObject(wrappedValue: self) .projectedValue[get: ...
๋‘ ์ˆ˜์˜ ๋‚˜๋ˆ—์…ˆ Int((Double(num1) / Double(num2)) * 1000) ์ˆซ์ž ๋น„๊ตํ•˜๊ธฐ num1 == num2 ? 1 : -1 ๋ถ„์ˆ˜์˜ ๋ง์…ˆ let result1 = (numer1 * denom2) + (numer2 * denom1) //32 let result2 = (denom1 * denom2) //16 let gcd = (1...min(result1, result2)).reversed().first { result1 % $0 == 0 && result2 % $0 == 0 } ?? 1 return [result1/gcd, result2/gcd] ๋ฐฐ์—ด ๋‘ ๋ฐฐ ๋งŒ๋“ค๊ธฐ numbers.map { $0 * 2 } ๋‚˜๋จธ์ง€ ๊ตฌํ•˜๊ธฐ num1 % num2 ์ค‘์•™๊ฐ’ ๊ตฌํ•˜๊ธฐ array.sorted()[ar..
๋ณ„๋‹ค๋ฅธ ์„ค๋ช… ์—†์ด๋„ ์‚ฌ์šฉ์ž๊ฐ€ ํ•ด๋‹น UI๊ฐ€ ๋ฌด์—‡์„ ์˜๋ฏธํ•˜๋Š”์ง€, ์–ด๋–ค ๊ธฐ๋Šฅ์„ ํฌํ•จํ•˜๋Š”์ง€ ์•Œ๊ฒŒ๋” ux๊ฐ€ ๊ณ ๋ ค ๋˜๋ฉด ์ข‹๊ฒ ์ง€๋งŒ ์„ค๋ช…์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ๋„ ์žˆ์–ด์š”. ์ด ์„ค๋ช…์„ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด TipKit์„ ์‚ฌ์šฉํ•ด ๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์‚ฌ์ด๋“œ ํ”„๋กœ์ ํŠธ๋ผ minimum target iOS 17๋กœ ์„ค์ •ํ•ด ๋†“๊ณ  ํ•ด๋ณด๊ณ  ์‹ถ์€๊ฑฐ ๋‹ค ํ•ด๋ณด๊ณ  ์žˆ์–ด์š” ์•„์ด ์ข‹์•„๋ผ TipKit๊ณผ ๊ฐ™์€ ToolTip์ด ํ•„์š”ํ•œ๋ฐ ๋ฒ„์ „์ด ์•ˆ๋˜์‹œ๋ฉด ์•„๋ž˜ ๊ธ€์—์„œ ํˆด ํŒ ๊ทธ๋ฆฌ๋Š” ๋ฐฉ๋ฒ• ์ฐธ๊ณ ํ•ด ๋ณด์„ธ์š”! > 2023.11.06 - [SwiftUI] - [SwiftUI] Shape path๋กœ Tooltip ๊ทธ๋ฆฌ๊ธฐ What is TipKit Tipkit์€ iOS 17 ๋ถ€ํ„ฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ํ”„๋ ˆ์ž„์›Œํฌ๋กœ ์• ํ”Œ์ด ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์•ฑ์—์„œ ์‚ฌ์šฉ์ž์—๊ฒŒ ์„ค๋ช…์ด๋‚˜ ์•ˆ๋‚ด๋ฅผ ํ‘œ์‹œํ•˜๋Š”๋ฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์–ด..
๋‘ ์ˆ˜์˜ ํ•ฉ func solution(_ num1:Int, _ num2:Int) -> Int { return num1 + num2 } ๋‘ ์ˆ˜์˜ ์ฐจ func solution(_ num1:Int, _ num2:Int) -> Int { return num1 - num2 } func solution(_ num1: Int, _ num2: Int) -> Int { num1 - num2 } ๋‘ ์ˆ˜์˜ ๊ณฑ func solution(_ num1:Int, _ num2:Int) -> Int { num1 * num2 } ๋ชซ ๊ตฌํ•˜๊ธฐ func solution(_ num1:Int, _ num2:Int) -> Int { num1 / num2 } ๋ฌธ์ž์—ด ์ถœ๋ ฅํ•˜๊ธฐ let s1 = readLine()! print(s1) if let str..
Scope๋ž€? ์ด์ „ ํ‘œํ˜„ ๋ฐฉ์‹ struct Scope where Child : ReducerProtocol ํ˜„์žฌ ํ‘œํ˜„ ๋ฐฉ์‹ struct Scope: Reducer parent domain์„ child domain์œผ๋กœ ๋ณ€๊ฒฝ -> ํ•˜์œ„ ๋„๋ฉ”์ธ์—์„œ child reduce๋ฅผ ์‹คํ–‰ ์‹œํ‚ด ํฐ ๊ทœ๋ชจ์˜ feature์„ ์ž‘์€ ๋‹จ์œ„๋กœ ์ชผ๊ฐœ๊ฑฐ๋‚˜ ํ•ฉ์น  ์ˆ˜ ์žˆ์Œ ์ž‘์€ ๋‹จ์œ„์˜ feature๋Š” ํฐ ๊ทœ๋ชจ์˜ feature ๋ณด๋‹ค ์ดํ•ดํ•˜๊ธฐ ์‰ฌ์šฐ๋ฉฐ test ๋ฐ ๋ชจ๋“ˆํ™”๋œ ๋ฐฉ์‹์œผ๋กœ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์Œ Scope ์ƒ์„ฑ @inlinable public init( state toChildState: WritableKeyPath, action toChildAction: AnyCasePath, @ReducerBuilder child: () -> Child..
์ถœ์ฒ˜ ๋ฐ ์ฐธ๊ณ  ์‚ฌ์ดํŠธ https://axiomatic-fuschia-666.notion.site/Chapter-3-TCA-2-c56b24efb2154dad9ed8e54139247024 Chapter 3. TCA์˜ ๊ธฐ๋ณธ๊ฐœ๋…(2) ์•ž์„  ์žฅ์—์„œ ์šฐ๋ฆฌ๋Š” ์•ฑ์˜ ์ƒํƒœ๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” State์™€ ์ด๋ฅผ ๋ณ€๊ฒฝํ•  ์ˆ˜๋‹จ์ธ Action, ๊ทธ Action์˜ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๊ณ  ์ƒํƒœ์˜ ๋ณ€๊ฒฝ์„ ์ฒ˜๋ฆฌํ•˜๋Š” Reducer์„ ์•Œ์•„๋ณด๋ฉฐ, TCA์—์„œ์˜ ๋ฐ์ดํ„ฐํ๋ฆ„์— ๋Œ€ํ•ด์„œ ์‚ดํŽด๋ณด์•˜์Šต๋‹ˆ axiomatic-fuschia-666.notion.site What is Store ๋Ÿฐ ํƒ€์ž„๋™์•ˆ Reducer์˜ ์ธ์Šคํ„ด์Šค๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ์ฐธ์กฐ ํƒ€์ž… ๊ฐ์ฒด ์•ฑ์˜ State, Action์„ ๊ด€๋ฆฌ State์˜ ๋ณ€ํ™” ๊ฐ์ง€ ์•ก์…˜ ์ฒ˜๋ฆฌ let store: Store public ty..
fram
FramiOS ๐Ÿฎ