์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- algorithm
- dfs
- SwiftUI
- ๊ธฐ์ด๋ฌธ๋ฒ
- duno
- HAVIT
- IOS
- GroupBy
- binarySearch
- ์ด์งํ์
- Til
- DynamicProgramming
- BFS
- algoritm
- discardableResult
- 0์ด๋์ด์๋๊ธธ
- ์ฐ์ํ์ค๋ถ๋ถ์์ด์ํฉ
- ํ๋ก๊ทธ๋๋จธ์ค
- Swift
- APPJAM
- GCD
- SQL
- ๋ค์ด๋๋ฏนํ๋ก๊ทธ๋๋ฐ
- SOPT
- ๋์ ๊ณํ๋ฒ
- ๊ณ ๋์ kit
- SwiftUI ํํ ๋ฆฌ์ผ
- SwiftUI Tutorials
- concurrency
- URLSession
- Today
- Total
๋ชฉ๋กTotal (69)
suvera-dev ๐ฅฆ
4์ผ์ฐจ - for ๋ฐ๋ณต๋ฌธ for index in 0...5 { print("ํธํธ index: \(index)") } for index in 0..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cg1xDv/btrsvex0FJ5/iOIRKPbdAp3QwtPjPtnmK0/img.png)
์ค์ ๋ฌธ์ ํ์ด 2๏ธโฃ ๋ฌธ์ 2 : ์ซ์ ์นด๋ ๊ฒ์ - ์ฌ๋ฌ ๊ฐ์ ์ซ์ ์นด๋ ์ค์์ ๊ฐ์ฅ ๋์ ์ซ์๊ฐ ์ฐ์ธ ์นด๋ ํ ์ฅ์ ๋ฝ๋ ๊ฒ์ - ๊ฒ์ ๋ฃฐ์ ๋ค์๊ณผ ๊ฐ๋ค. - 1. ์ซ์๊ฐ ์ฐ์ธ ์นด๋๋ค์ด N x M ํํ๋ก ๋์ฌ ์๋ค. ์ด๋ N์ ํ์ ๊ฐ์๋ฅผ ์๋ฏธํ๋ฉฐ, M์ ์ด์ ๊ฐ์๋ฅผ ์๋ฏธํ๋ค. - 2. ๋จผ์ ๋ฝ๊ณ ์ ํ๋ ์นด๋๊ฐ ํฌํจ๋์ด ์๋ ํ์ ์ ํํ๋ค - 3. ๊ทธ ๋ค์ ์ ํ๋ ํ์ ํฌํจ๋ ์นด๋๋ค ์ค ๊ฐ์ฅ ์ซ์๊ฐ ๋ฎ์ ์นด๋๋ฅผ ๋ฝ์์ผ ํ๋ค - 4. ๋ฐ๋ผ์ ์ฒ์์ ์นด๋๋ฅผ ๊ณจ๋ผ๋ผ ํ์ ์ ํ ํ ๋, ์ดํ์ ํด๋น ํ์์ ๊ฐ์ฅ ์ซ์๊ฐ ๋ฎ์ ์นด๋๋ฅผ ๋ฝ์ ๊ฒ์ ๊ณ ๋ คํ์ฌ ์ต์ข ์ ์ผ๋ก ๊ฐ์ฅ ๋์ ์ซ์์ ์นด๋๋ฅผ ๋ฝ์ ์ ์๋๋ก ์ ๋ต์ ์ธ์์ผ ํ๋ค. ๐ฅฆ ๋ฌธ์ ํด๊ฒฐ ์์ด๋์ด : ๊ฐ ํ๋ง๋ค ๊ฐ์ฅ ์์ ์๋ฅผ ์ฐพ์ ๋ค์ ๊ทธ ์ ์ค์์ ๊ฐ์ฅ ..
1) ๋ฐ๋์ ๋ฉ์ธํ์์ ์ฒ๋ฆฌํด์ผํ๋ ์์ : UI๊ด๋ จ์ผ๋ค์ '๋ฉ์ธํ' ์์ ์ฒ๋ฆฌํด์ผ ํ๋ค. DispatchQueue.global().async{ // ์ด๋ฏธ์ง ๋ค์ด๋ก๋ ๋ฑ ๊ด๋ จ ์ฝ๋ // ์ค๋๊ฑธ๋ฆฌ๋ ์์ ์ด๋, ๋น๋๊ธฐ๋ก ๋ถ์ฐํด์ ์์ ์ ์ฒ๋ฆฌํ๊ณ ์ถ์ ์ฝ๋ 1 ์ฝ๋ 2 ... DispatchQueue.main.async{ // ๋ค์ด๋ก๋ํ ์ด๋ฏธ์ง๋ฅผ ํ์ํ๋ ์ฝ๋ // UI ๊ด๋ จ ์์ ์ ๋ค์ ๋ฉ์ธํ๋ก self.imageView.image = image } } ๋ด๋ถ์ ์ผ๋ก ๋น๋๊ธฐ ์ฒ๋ฆฌ๊ฐ ๋์ด์๋ URLSession ์ฝ๋์์๋ ๋ค์ main ํ๋ก ๋ณด๋ธ๋ค. // ์ด๋ฏธ์ง์บ์ ์ฒ๋ฆฌํ๋ ์์ var imageCache = [String: UIImage]() class CustomImageView: UIImageView { v..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bHVpAu/btrswU6HAu7/qlmod8f4of1c7aKUFZkhQK/img.gif)
UIButton.ConfigurationUpdateHandler : A closure to update the configuration of a button. ๋ฒํผ์ ๊ตฌ์ฑ์ ์ ๋ฐ์ดํธ ํ๊ธฐ ์ํ ํด๋ก์ private let nextButton: UIButton = { // ๋ฒํผ์ ์์ฑ์ ์ ์ํด์ฃผ๋ ์ฝ๋ ์๋ต let buttonStateHandler: UIButton.ConfigurationUpdateHandler = { button in switch button.state { case .normal: button.configuration?.background.backgroundColor = .havitPurple case .disabled: button.configuration?.background.bac..