The Composable Architecture (省略すると TCA) は、コンポジション、テスト、開発者にとっての使いやすさを考慮し、一貫性のある理解しやすい方法でアプリケーションを構築するためのライブラリです。SwiftUI、UIKit などで使用することができ、Apple のどのプラットフォーム (iOS, macOS, tvOS, watchOS) でも使用
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
import SwiftUI | |
protocol PickerEnum: Hashable, Identifiable, CaseIterable where AllCases: RandomAccessCollection { | |
var displayName: String { get } | |
} | |
struct ListPicker<Selections>: View where Selections: PickerEnum { | |
@Binding var selection: Selections | |
var body: some View { | |
ForEach(Selections.allCases, id: \.self) { sel in |
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
test |