์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- XCTest
- arkit
- realm
- BFS
- CollectionView
- SnapKit
- raywenderlich
- visionOS
- tableView
- TCA
- RxSwift
- node.js
- ํจ์คํธ์บ ํผ์ค
- swift
- Xcode
- designpattern
- rxcocoa
- SwiftUI
- Lv2
- Kuring
- ํ๋ก๊ทธ๋๋จธ์ค
- ๋ฐฑ์ค
- Swfit
- combine
- BOJ
- UIKit
- ios
- reactorkit
- MVVM
- Flutter
- Today
- Total
๋ชฉ๋กButton (4)
lgvv98
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..
โ ์ด๋ฒ ์๊ฐ์๋ extension Reactive์ ๋ํด์ ์์๋ณผ ์์ ์ด์ผ. ์ฐ๋ฆฌ๊ฐ ์ค์นํ RxSwfit ์์๋ Reactive.swift ํ์ผ์ด ์๋๋ฐ, custom point๋ก ์ฌ์ฉํ๋ผ๊ณ ํ๋ค. ๐ Reactive.swift Use `Reactive` proxy as customization point for constrained protocol extensions. General pattern would be: // 1. Extend Reactive protocol with constrain on Base // Read as: Reactive Extension where Base is a SomeType extension Reactive where Base: SomeType { // 2. Put ..
โ ์ด๋ฒ ์๊ฐ์๋ TableView์์ UIButton์ด ๋ฐ์ํ์ง ์์ ๋๋ฅผ ์์๋ณด์. ์ ๊ธฐ ๋ณด์ด๋ ์์ ํ๊ธฐ์ ์ฑ๋ฆฐ์ง ์์์ด UIButton์ด๋ค. IBAction์ผ๋ก ์ฐ๊ฒฐํ๋๊น ์ ๋๋๋ฐ, rx๋ฅผ ์ฌ์ฉํ๋๊น ์๋๋ ๋ฌธ์ ๋ฐ๊ฒฌ ์๋์ ์ฝ๋๋ฅผ ๋ณด๋ฉด ์ฝ๊ฒ ๋ฌธ์ ํด๊ฒฐ์ ๋ฐฉ๋ฒ์ ์ดํดํ ์ ์๋ค. // ์ฒ์์ ์์ฑํ ์ฝ๋ -> ๋ฐ์ ์์ REditButton.rx.tap .subscribe { self.REditButton.tintColor = .blue self.REditButton.setTitle(" ๋์ ์ค... ", for: .normal) } // ๋๋ฒ์งธ๋ก ์์ฑํ ์ฝ๋ -> ์ฌ์ ํ ๋ฐ์ ์์ REditButton.rx.controlEvent(.allTouchEvents) .subscribe { self.RE..
โ ์ด๋ฒ์๊ฐ์๋ ๋ฒํผ์ ๋ฐ๊พธ๋ ๋ฐฉ๋ฒ์ ๋ํด์ ์์๋ณผ๊ฑฐ์ผ. ๋ฒํผ์ ํด๋ฆญํ์๋, ํด๋ฆญํ๋ค๋ ๋ค๋ฅธ ์ด๋ฏธ์ง๋ก ๋ณด์ฌ์ง๋ค๊ณ ์ฌ์ฉ์๋ค์ด ์ธ์ํ๋๋ฐ ๋ ๋์์ด ๋๊ฒ ์ง? Xcode์์๋ ๋คํํ๋ ๊ทธ๋ฐ ๊ธฐ๋ฅ๋ค์ ์ ๊ณตํ๊ณ ์์ด. State Config ์ชฝ์ ๋ณด๋ฉด Default๋ก ์ค์ ๋ ์ํ๋ฅผ ํ์ธํ ์๊ฐ ์๋๋ฐ, ์ ๋ถ๋ถ์ ์ ๋ , ํ์ด๋ผ์ดํธ ๋ฑ ์์ ๋กญ๊ฒ ๋ณ๊ฒฝํด์ฃผ๋ฉด ๋! ๊ทธ๋ผ ๋ฒํผ์ ๋๋ ์๋, ์ฝ๋๋ก ์ด๋ป๊ฒ ์๋๋๋์ง ์ดํด๋ณผ๊น? ๋์ถฉ ์ด๋ ๊ฒ ์๋ํด. ์ฌ๊ธฐ์ ๋์ฌ๊ฒจ ๋ณผ ๊ฒ์ checkButton์ด ์ด๋ป๊ฒ ์์ฑ๋์ด์ ํ๋ํ๋์ง์ ์ฃผ๋ชฉํด๋ณด์ ์ฒดํฌ ๋ฒํผ์ด ์ ํ๋์์๋, ์ฒดํฌ๋ฒํผ์ ์ํ๋ฅผ ๋ฐ๋๋ก ๋ณ๊ฒฝํ๊ณ let isDone ๋ณ์์ ์ฒดํฌ ๋ฒํผ์ ์ํ๋ฅผ ๋ฃ๋๋ค..! ๊ทธ๋ฌ๋ฉด ์๊ฐ๋ณด๋ค ๊ฐ๋จํ ๋๋! ์ฒดํฌ๋ฒํผ๊ณผ ๊ด๋ จํ UI๋ค๋ ์๋๋ฐ, ์ด ๋ถ๋ถ..