์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- ios
- Xcode
- SwiftUI
- ํจ์คํธ์บ ํผ์ค
- Lv2
- visionOS
- swift
- designpattern
- rxcocoa
- BOJ
- MVVM
- Swfit
- RxSwift
- UIKit
- ๋ฐฑ์ค
- node.js
- arkit
- realm
- SnapKit
- Kuring
- BFS
- Flutter
- raywenderlich
- combine
- ํ๋ก๊ทธ๋๋จธ์ค
- tableView
- reactorkit
- CollectionView
- TCA
- XCTest
- Today
- Total
๋ชฉ๋กapple/๐ SwiftUI & Combine (26)
lgvv98
Picker, segmentedStyle (feat. enum CaseIterable) (feat. enum CaseIterable)์ ๊ฒฝ์ฐ์๋ ๋ฐ๋ก enum์ ๋ํด์ ์ฌ์ฉํ๋ ๋ฐฉ์์ ํฌ์คํ ํ ์์ ์ด์ง๋ง, ๊ทธ ์ ์ ์ด๋ป๊ฒ ์ฌ์ฉํ๋์ง ๊ฐ๋ตํ๊ฒ ์ฌ์ฉ๋ฒ? ์ ๋๋ ๋์์์ด์ ์ฐธ๊ณ ํด๋ณด๋ฉด ์ข๋ค. ์ด๋ฒ์๋ ์ฝ๋๋ฅผ ํ๋ฒ ๋ณด์! โ Picker, segmentedStyle์ ๋ํด์ ์์๋ณด์. import SwiftUI struct ContentView: View { @State private var selectionValue = 0 let myColorArray = ["๋ ๋", "๊ทธ๋ฆฐ", "๋ธ๋ฃจ"] func changeColor(index: Int) -> Color { switch index { case 0: retu..
Toast, popup โ ์ด๋ฒ์๋ ์คํ์์ค๋ฅผ ํ์ฉํด์ toast์ popup์ ํ๋ ์์ ์ ์งํํด๋ณด์. ์ด์ ์ ํ๋ฌํฐ๋ ์๋๋ก์ด๋ ๊ฐ๋ฐํ ๋, ์ฃผ๋ก ์ฌ์ฉํ๋ UI์ธ๋ฐ, iOS์๋ ๋น์ทํ๊ฒ ๊ตฌํํ ์ ์๋ค๊ณ ํด์ ๊ณต๋ถํด ๋ณด์๋ค. โ ์คํ์์ค https://github.com/exyte/PopupView GitHub - exyte/PopupView: Toasts and popups library written with SwiftUI Toasts and popups library written with SwiftUI. Contribute to exyte/PopupView development by creating an account on GitHub. github.com ์คํ์์ค์์ SPM์ ์ง์ํ๋ค๊ณ ํ๋ค...
TextField, SecureField โ UIKit์์๋ ์ต์ํ๋ ๊ฒ๋ค์ธ๋ฐ, SwiftUI์์๋ ๋ฏ์ค๋ค. ์ฌ๊ธฐ์ ์ฃผ์ํ ์ ์ TextField์ text๋ Binding์ด๋ผ์ @State์ $์ ์ฃผ์ํ์. TextField๋ ์ฐ๋ฆฌ๊ฐ ๊ธฐ์กด์ ์๋ TextField์ ๊ฐ๋ค. SecureField๋ password๋ฅผ ์ ๋ ฅํ ๋, ๊ธ์๊ฐ ๋ณด์ด์ง ์๊ฒ๋ ๊ฒ์์ ์์ผ๋ก ์จ๊ฒจ์ฃผ๋ ํ๋์ด๋ค. ์ฝ๋๊ฐ ๋ฌด์ฒ ๊ฐ๋จํ๋๊น ์ฑ ์ฝ์ด๋ณด์! โ ์ฝ๋ import SwiftUI struct ContentView: View { @State private var username: String = "" @State private var password: String = "" var body: some View { VStack(spac..
ButtonStyle โ ๋ฒํผ ์คํ์ผ์ ๋ํด์ ์์๋ณด์ ์ด๊ฑด ์ง์ง ์ด๋ ต์ง๊ฐ ์๋ค. ์ ๋ง์ ๋ง E A S Y ํด ! Configuration์ ์์๋ฐ์ ๋ค์ด์ค๋ ๊ฒ์ ์ํ๋ฅผ ๋ฐ์์ ์ฐ๋๊ฒ โ MyBlurButtonStyle import SwiftUI struct MyBlurButtonStyle: ButtonStyle { var color : Color // Configuration ์์์ ์์๋ฐ๋ ์์ฑ ๊ทธ๋๋ก ์ฌ์ฉํ ์ ์๊ฒ ํด์ค func makeBody(configuration: Configuration) -> some View { configuration .label .font(.system(size: 20)) .foregroundColor(Color.white) .padding() .background..
QRcodeReader โ QRcodeReader๋ฅผ ์์๋ณด์. ์ฝ๋๋ ์ด๋ ต์ง ์๋ค. ๋์ฌ๊ฒจ ๋ณผ ์ ์ ํ๋์ ํ์ผ์์ ์ฌ๋ฌ๊ฐ์ ๋ทฐ๋ฅผ ์์ฑํ๋ ๊ฒ์ ๋ณผ ์ ์๊ฒ ๋ค ๐ ์๋๋ ์คํ์์ค !_! https://github.com/twostraws/CodeScanner GitHub - twostraws/CodeScanner: A SwiftUI view that is able to scan barcodes, QR codes, and more, and send back what was found. A SwiftUI view that is able to scan barcodes, QR codes, and more, and send back what was found. - GitHub - twostraws/CodeScan..
State/ Binding / EnvironmentObject โ ์ค๋์ ์ด ์ธ๊ฐ์ง์ ๋ํด์ ์์๋ณด์. @State: ๊ฐ์ด ๋ณ๊ฒฝ๋์์ ๋, ํ๋ฉด์ ๋ค์ ๋ณด์ฌ์ฃผ์ด์ผ ํ ๋. @Binding: state๊ฐ์ ์น๊ตฌ๋ค์ view - view ๊ฐ์ ๊ณต์ ํด์ผ ํ๋ ๊ฒฝ์ฐ. @EnvironmentObject: parent๋ก child(ํ์) view์ ๊ณต์ ํด์ผ ํ๋ ๊ฒฝ์ฐ. ์ฐ์ State์ Binding์ ๋ํด์ ์ดํดํด๋ณด์. โ ์์ ์ฝ๋ struct FirstView: View { @State var appTitle = tabIndex.first.rawValue @State var count = 0 enum tabIndex: String { case first = "1๋ฒ๋ทฐ ์ ๋๋ค." case second = "2๋ฒ๋ทฐ..