├── SwiftUICatalog ├── Assets.xcassets │ ├── Contents.json │ ├── Crown.imageset │ │ ├── gold.png │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Gesture │ ├── Sample │ │ ├── SequenceGestureSample.swift │ │ ├── GestureMaskSample.swift │ │ ├── TapGestureSample.swift │ │ ├── MagnificationGestureSample.swift │ │ ├── RotationGestureSample.swift │ │ ├── LongPressGestureSample.swift │ │ ├── DragGestureSample.swift │ │ ├── ExclusiveGestureSample.swift │ │ └── SimultaneousGestureSample.swift │ └── Gesture.swift ├── View Layout and Presentation │ ├── Sample │ │ ├── EmptyViewSample.swift │ │ ├── AnyViewSample.swift │ │ ├── NavigationViewContentSample.swift │ │ ├── List.swift │ │ ├── TupleViewSample.swift │ │ ├── HStack.swift │ │ ├── ZStack.swift │ │ ├── VStack.swift │ │ ├── TabViewPresentationSample.swift │ │ ├── SpacerSample.swift │ │ ├── DividerSample.swift │ │ ├── NavigationViewSample.swift │ │ ├── AlertSample.swift │ │ ├── TabViewSample.swift │ │ ├── Form.swift │ │ ├── ActionSheetSample.swift │ │ ├── Group.swift │ │ ├── ScrollView.swift │ │ └── EquatableViewSample.swift │ └── ViewLayoutAndPresentationList.swift ├── Views and Controls │ ├── Sample │ │ ├── TextSample.swift │ │ ├── FontSample.swift │ │ ├── ButtonSample.swift │ │ ├── NavigationLinkSample.swift │ │ ├── StepperSample.swift │ │ ├── ToggleSample.swift │ │ ├── DatePickerSample.swift │ │ ├── SliderSample.swift │ │ ├── ViewBuilderSample.swift │ │ ├── TextFieldSample.swift │ │ ├── ImageSample.swift │ │ ├── SecureFieldSample.swift │ │ ├── ViewModifierSample.swift │ │ ├── PickerSample.swift │ │ ├── EditButtonSample.swift │ │ └── SegmentedPickerSample.swift │ └── ViewAndControls.swift ├── Drawing and Animation │ ├── Sample │ │ ├── ColorSample.swift │ │ ├── RectangleSample.swift │ │ ├── CircleSample.swift │ │ ├── CapsuleSample.swift │ │ ├── EllipseSample.swift │ │ ├── EdgeSample.swift │ │ ├── ImagePaintSample.swift │ │ ├── PathSample.swift │ │ ├── RoundedRectangleSample.swift │ │ ├── OffsetShapeSample.swift │ │ ├── RotatedShapeSample.swift │ │ ├── ScaledShapeSample.swift │ │ ├── AngularGradientSample.swift │ │ ├── RadialGradientSample.swift │ │ ├── LinearGradientSample.swift │ │ ├── TransformedShapeSample.swift │ │ ├── GeometryReaderSample.swift │ │ ├── WithAnimationSample.swift │ │ ├── AnimationSample.swift │ │ ├── AnimatableSample.swift │ │ └── AnimatablePairSample.swift │ └── DrawingAndAnimation.swift ├── Base.lproj │ └── LaunchScreen.storyboard ├── Info.plist ├── AppDelegate.swift ├── ContentView.swift └── SceneDelegate.swift ├── SwiftUICatalog.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── kahayash.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ └── kahayash.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── SwiftUICatalogTests ├── Info.plist └── SwiftUICatalogTests.swift ├── SwiftUICatalogUITests ├── Info.plist └── SwiftUICatalogUITests.swift ├── LICENSE └── README.md /SwiftUICatalog/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SwiftUICatalog/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SwiftUICatalog/Assets.xcassets/Crown.imageset/gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kazuhiro4949/SwiftUICatalog/HEAD/SwiftUICatalog/Assets.xcassets/Crown.imageset/gold.png -------------------------------------------------------------------------------- /SwiftUICatalog.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftUICatalog.xcodeproj/xcuserdata/kahayash.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /SwiftUICatalog.xcodeproj/project.xcworkspace/xcuserdata/kahayash.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kazuhiro4949/SwiftUICatalog/HEAD/SwiftUICatalog.xcodeproj/project.xcworkspace/xcuserdata/kahayash.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SwiftUICatalog.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SwiftUICatalog/Assets.xcassets/Crown.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "gold.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /SwiftUICatalog.xcodeproj/xcuserdata/kahayash.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SwiftUICatalog.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Sample/SequenceGestureSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SequenceGestureSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Created by Kazuhiro Hayashi on 8/9/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct SequenceGestureSample: View { 12 | var body: some View { 13 | Text(/*@START_MENU_TOKEN@*/"Hello World!"/*@END_MENU_TOKEN@*/) 14 | } 15 | } 16 | 17 | #if DEBUG 18 | struct SequenceGestureSample_Previews: PreviewProvider { 19 | static var previews: some View { 20 | SequenceGestureSample() 21 | } 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /SwiftUICatalogTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SwiftUICatalogUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Sample/GestureMaskSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GestureMaskSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Created by Kazuhiro Hayashi on 8/9/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct GestureMaskSample: View { 12 | @State var color = Color.blue 13 | 14 | var body: some View { 15 | let tap = TapGesture() 16 | .onEnded { _ in 17 | self.color = self.color == .blue ? .red : .blue 18 | } 19 | 20 | return Circle() 21 | .foregroundColor(color) 22 | .gesture(tap, including: GestureMask.all) 23 | } 24 | } 25 | 26 | #if DEBUG 27 | struct GestureMaskSample_Previews: PreviewProvider { 28 | static var previews: some View { 29 | GestureMaskSample() 30 | } 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Sample/TapGestureSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TapGestureSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Created by Kazuhiro Hayashi on 8/9/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct TapGestureSample: View { 12 | @State var color = Color.blue 13 | 14 | var body: some View { 15 | let tap = TapGesture() 16 | .onEnded { _ in 17 | self.color = self.color == .blue ? .red : .blue 18 | } 19 | 20 | return Circle() 21 | .fill(color) 22 | .frame(width: 100, height: 100, alignment: .center) 23 | .gesture(tap) 24 | } 25 | } 26 | 27 | #if DEBUG 28 | struct TapGestureSample_Previews: PreviewProvider { 29 | static var previews: some View { 30 | TapGestureSample() 31 | } 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Sample/MagnificationGestureSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MagnificationGestureSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Created by Kazuhiro Hayashi on 8/9/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct MagnificationGestureSample: View { 12 | @State var scale: CGFloat = 1 13 | 14 | var body: some View { 15 | let gesture = MagnificationGesture(minimumScaleDelta: 1) 16 | .onChanged { (value) in 17 | self.scale = value 18 | } 19 | .onEnded { (value) in 20 | self.scale = value 21 | } 22 | 23 | return Circle().foregroundColor(.red).scaleEffect(scale).gesture(gesture) 24 | } 25 | } 26 | 27 | #if DEBUG 28 | struct MagnificationGestureSample_Previews: PreviewProvider { 29 | static var previews: some View { 30 | MagnificationGestureSample() 31 | } 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Sample/RotationGestureSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RotationGestureSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Created by Kazuhiro Hayashi on 8/9/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct RotationGestureSample: View { 12 | @State var angle: Angle = Angle(degrees: 0) 13 | var body: some View { 14 | let gesture = RotationGesture(minimumAngleDelta: Angle(degrees: 0)).onChanged { value in 15 | self.angle = value 16 | }.onEnded { (value) in 17 | self.angle = value 18 | } 19 | return Rectangle() 20 | .frame(width: 200, height: 200) 21 | .foregroundColor(.yellow) 22 | .rotationEffect(angle, anchor: .center) 23 | .gesture(gesture) 24 | } 25 | } 26 | 27 | #if DEBUG 28 | struct RotationGestureSample_Previews: PreviewProvider { 29 | static var previews: some View { 30 | RotationGestureSample() 31 | } 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Sample/LongPressGestureSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LongPressGestureSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Created by Kazuhiro Hayashi on 8/9/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct LongPressGestureSample: View { 12 | @GestureState var isDetectingLongPress = false 13 | 14 | var body: some View { 15 | let press = LongPressGesture(minimumDuration: 1) 16 | .updating($isDetectingLongPress) { currentState, gestureState, transaction in 17 | gestureState = currentState 18 | } 19 | 20 | return Circle() 21 | .fill(isDetectingLongPress ? Color.yellow : Color.green) 22 | .frame(width: 100, height: 100, alignment: .center) 23 | .gesture(press) 24 | } 25 | } 26 | 27 | #if DEBUG 28 | struct LongPressGestureSample_Previews: PreviewProvider { 29 | static var previews: some View { 30 | LongPressGestureSample() 31 | } 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /SwiftUICatalogTests/SwiftUICatalogTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUICatalogTests.swift 3 | // SwiftUICatalogTests 4 | // 5 | // Created by Kazuhiro Hayashi on 8/4/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import SwiftUICatalog 11 | 12 | class SwiftUICatalogTests: XCTestCase { 13 | 14 | override func setUp() { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() { 23 | // This is an example of a functional test case. 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testPerformanceExample() { 28 | // This is an example of a performance test case. 29 | self.measure { 30 | // Put the code you want to measure the time of here. 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Kazuhiro Hayashi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Sample/DragGestureSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DragGestureSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Created by Kazuhiro Hayashi on 8/9/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DragGestureSample: View { 12 | @State var offset: CGSize = .zero 13 | @State var color: Color = .red 14 | var body: some View { 15 | let gesture = DragGesture(minimumDistance: 10, coordinateSpace: .local) 16 | .onChanged({ (value) in 17 | self.color = .blue 18 | self.offset = CGSize(width: self.offset.width + value.translation.width, height: self.offset.height + value.translation.height) 19 | }) 20 | .onEnded { (value) in 21 | self.color = .red 22 | self.offset = CGSize(width: self.offset.width + value.translation.width, height: self.offset.height + value.translation.height) 23 | } 24 | return Circle() 25 | .fill(color) 26 | .frame(width: 100, height: 100, alignment: .center) 27 | .gesture(gesture) 28 | .offset(offset) 29 | } 30 | } 31 | 32 | #if DEBUG 33 | struct DragGestureSample_Previews: PreviewProvider { 34 | static var previews: some View { 35 | DragGestureSample() 36 | } 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Sample/ExclusiveGestureSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExclusiveGestureSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Created by Kazuhiro Hayashi on 8/9/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ExclusiveGestureSample: View { 12 | @State var scale: CGFloat = 1 13 | @State var angle: Angle = Angle(degrees: 0) 14 | 15 | var body: some View { 16 | let rotationGesture = RotationGesture(minimumAngleDelta: Angle(degrees: 0)).onChanged { value in 17 | self.angle = value 18 | }.onEnded { (value) in 19 | self.angle = value 20 | } 21 | let magnificationGesture = MagnificationGesture(minimumScaleDelta: 1) 22 | .onChanged { (value) in 23 | self.scale = value 24 | } 25 | .onEnded { (value) in 26 | self.scale = value 27 | } 28 | 29 | 30 | let exclusiveGesture = ExclusiveGesture(rotationGesture, magnificationGesture) 31 | return Rectangle() 32 | .frame(width: 200, height: 200) 33 | .foregroundColor(.green) 34 | .rotationEffect(angle, anchor: .center) 35 | .scaleEffect(scale) 36 | .gesture(exclusiveGesture) 37 | } 38 | } 39 | 40 | #if DEBUG 41 | struct ExclusiveGestureSample_Previews: PreviewProvider { 42 | static var previews: some View { 43 | ExclusiveGestureSample() 44 | } 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Sample/SimultaneousGestureSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SimultaneousGestureSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Created by Kazuhiro Hayashi on 8/9/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct SimultaneousGestureSample: View { 12 | @State var scale: CGFloat = 1 13 | @State var angle: Angle = Angle(degrees: 0) 14 | 15 | var body: some View { 16 | let rotationGesture = RotationGesture(minimumAngleDelta: Angle(degrees: 0)).onChanged { value in 17 | self.angle = value 18 | }.onEnded { (value) in 19 | self.angle = value 20 | } 21 | let magnificationGesture = MagnificationGesture(minimumScaleDelta: 1) 22 | .onChanged { (value) in 23 | self.scale = value 24 | } 25 | .onEnded { (value) in 26 | self.scale = value 27 | } 28 | 29 | 30 | let sequenceGesture = SimultaneousGesture(rotationGesture, magnificationGesture) 31 | return Rectangle() 32 | .frame(width: 200, height: 200) 33 | .foregroundColor(.green) 34 | .rotationEffect(angle, anchor: .center) 35 | .scaleEffect(scale) 36 | .gesture(sequenceGesture) 37 | } 38 | } 39 | 40 | #if DEBUG 41 | struct SimultaneousGestureSample_Previews: PreviewProvider { 42 | static var previews: some View { 43 | SimultaneousGestureSample() 44 | } 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /SwiftUICatalogUITests/SwiftUICatalogUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUICatalogUITests.swift 3 | // SwiftUICatalogUITests 4 | // 5 | // Created by Kazuhiro Hayashi on 8/4/1 R. 6 | // Copyright © 1 Reiwa Kazuhiro Hayashi. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SwiftUICatalogUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | 16 | // In UI tests it is usually best to stop immediately when a failure occurs. 17 | continueAfterFailure = false 18 | 19 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 20 | } 21 | 22 | override func tearDown() { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | } 25 | 26 | func testExample() { 27 | // UI tests must launch the application that they test. 28 | let app = XCUIApplication() 29 | app.launch() 30 | 31 | // Use recording to get started writing UI tests. 32 | // Use XCTAssert and related functions to verify your tests produce the correct results. 33 | } 34 | 35 | func testLaunchPerformance() { 36 | // This measures how long it takes to launch your application from the home screen. 37 | measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { 38 | XCUIApplication().launch() 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SwiftUICatalog/View Layout and Presentation/Sample/EmptyViewSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EmptyViewSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct EmptyViewSample: View { 28 | var body: some View { 29 | EmptyView() 30 | } 31 | } 32 | 33 | #if DEBUG 34 | struct EmptyViewSample_Previews: PreviewProvider { 35 | static var previews: some View { 36 | EmptyViewSample() 37 | } 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/TextSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct TextSample: View { 28 | var body: some View { 29 | Text(/*@START_MENU_TOKEN@*/"Hello World!"/*@END_MENU_TOKEN@*/) 30 | } 31 | } 32 | 33 | #if DEBUG 34 | struct TextSample_Previews: PreviewProvider { 35 | static var previews: some View { 36 | TextSample() 37 | } 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/ColorSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ColorSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct ColorSample: View { 28 | var body: some View { 29 | Color.blue 30 | .navigationBarTitle("Color") 31 | } 32 | } 33 | 34 | #if DEBUG 35 | struct ColorSample_Previews: PreviewProvider { 36 | static var previews: some View { 37 | ColorSample() 38 | } 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/FontSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FontSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct FontSample: View { 28 | var body: some View { 29 | Text("30pt System Font") 30 | .font(Font.system(size: 30)) 31 | } 32 | } 33 | 34 | #if DEBUG 35 | struct FontSample_Previews: PreviewProvider { 36 | static var previews: some View { 37 | FontSample() 38 | } 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /SwiftUICatalog/View Layout and Presentation/Sample/AnyViewSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnyViewSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct AnyViewSample: View { 28 | var body: some View { 29 | AnyView(Rectangle().frame(width: 50, height: 50).foregroundColor(.red)) 30 | } 31 | } 32 | 33 | #if DEBUG 34 | struct AnyViewSample_Previews: PreviewProvider { 35 | static var previews: some View { 36 | AnyViewSample() 37 | } 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/RectangleSample.swift: -------------------------------------------------------------------------------- 1 | // SwiftUICatalog 2 | // 3 | // Copyright (c) 2019 Kazuhiro Hayashi 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import SwiftUI 24 | 25 | struct RectangleSample: View { 26 | var body: some View { 27 | Rectangle().frame(width: 200, height: 200).foregroundColor(.red) 28 | .navigationBarTitle("Rectangle") 29 | } 30 | } 31 | 32 | #if DEBUG 33 | struct RectangleSample_Previews: PreviewProvider { 34 | static var previews: some View { 35 | RectangleSample() 36 | } 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/ButtonSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct ButtonSample: View { 28 | var body: some View { 29 | Button("Button") { 30 | print("Tapped") 31 | } 32 | .foregroundColor(.blue) 33 | } 34 | } 35 | 36 | #if DEBUG 37 | struct ButtonSample_Previews: PreviewProvider { 38 | static var previews: some View { 39 | ButtonSample() 40 | } 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/CircleSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct CircleSample: View { 28 | var body: some View { 29 | Circle().frame(width: 200, height: 200).foregroundColor(.red) 30 | .navigationBarTitle("Circle") 31 | } 32 | } 33 | 34 | #if DEBUG 35 | struct CircleSample_Previews: PreviewProvider { 36 | static var previews: some View { 37 | CircleSample() 38 | } 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/NavigationLinkSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationLinkSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct NavigationLinkSample: View { 28 | var body: some View { 29 | NavigationLink("NavigationLink", destination: NavigationLinkSample()) 30 | } 31 | } 32 | 33 | #if DEBUG 34 | struct NavigationLinkSample_Previews: PreviewProvider { 35 | static var previews: some View { 36 | NavigationLinkSample() 37 | } 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/CapsuleSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CapsuleSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct CapsuleSample: View { 28 | var body: some View { 29 | Capsule().frame(width: 100, height: 200).foregroundColor(.red) 30 | .navigationBarTitle("Capsule") 31 | } 32 | } 33 | 34 | #if DEBUG 35 | struct CapsuleSample_Previews: PreviewProvider { 36 | static var previews: some View { 37 | CapsuleSample() 38 | } 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/EllipseSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EllipseSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct EllipseSample: View { 28 | var body: some View { 29 | Ellipse().frame(width: 100, height: 200).foregroundColor(.red) 30 | .navigationBarTitle("Ellipse") 31 | } 32 | } 33 | 34 | #if DEBUG 35 | struct EllipseSample_Previews: PreviewProvider { 36 | static var previews: some View { 37 | EllipseSample() 38 | } 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/StepperSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StepperSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct StepperSample: View { 28 | @State var value: Int = 0 29 | 30 | var body: some View { 31 | Stepper(value: $value, in: 0...10, label: { Text("value: \(value)")}).frame(width: 200) 32 | } 33 | } 34 | 35 | #if DEBUG 36 | struct StepperSample_Previews: PreviewProvider { 37 | static var previews: some View { 38 | StepperSample() 39 | } 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/ToggleSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ToggleSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct ToggleSample: View { 28 | @State var isOn: Bool = false 29 | 30 | var body: some View { 31 | Toggle(isOn: $isOn) { 32 | return Text("Label") 33 | }.frame(width: 100) 34 | } 35 | } 36 | 37 | #if DEBUG 38 | struct ToggleSample_Previews: PreviewProvider { 39 | static var previews: some View { 40 | ToggleSample() 41 | } 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /SwiftUICatalog/View Layout and Presentation/Sample/NavigationViewContentSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationViewContentSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct NavigationViewContentSample: View { 28 | var body: some View { 29 | NavigationLink("push", destination: NavigationViewSample()) 30 | } 31 | } 32 | 33 | #if DEBUG 34 | struct NavigationViewContentSample_Previews: PreviewProvider { 35 | static var previews: some View { 36 | NavigationViewContentSample() 37 | } 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/DatePickerSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DatePickerSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct DatePickerSample: View { 28 | @State var selection: Date = Date() 29 | 30 | var body: some View { 31 | DatePicker("Date Picker", selection: $selection).frame(width: 200) 32 | } 33 | } 34 | 35 | 36 | #if DEBUG 37 | struct DatePickerSample_Previews: PreviewProvider { 38 | static var previews: some View { 39 | DatePickerSample() 40 | } 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/EdgeSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EdgeSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct EdgeSample: View { 28 | var body: some View { 29 | Rectangle().frame(width: 200, height: 200).foregroundColor(.red) 30 | .padding(Edge.Set.leading, 100) 31 | .navigationBarTitle("Edge") 32 | } 33 | } 34 | 35 | #if DEBUG 36 | struct EdgeSample_Previews: PreviewProvider { 37 | static var previews: some View { 38 | EdgeSample() 39 | } 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/SliderSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SliderSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct SliderSample: View { 28 | @State var value: Float = 0 29 | 30 | var body: some View { 31 | HStack { 32 | Text("\(value)") 33 | Slider(value: $value).frame(width: 200) 34 | } 35 | } 36 | } 37 | 38 | #if DEBUG 39 | struct SliderSample_Previews: PreviewProvider { 40 | static var previews: some View { 41 | SliderSample() 42 | } 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/ImagePaintSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImagePaintSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct ImagePaintSample: View { 28 | var body: some View { 29 | Rectangle() 30 | .fill(ImagePaint(image: Image(uiImage: UIImage(named: "Crown")!))) 31 | .navigationBarTitle("ImagePaint") 32 | } 33 | } 34 | 35 | #if DEBUG 36 | struct ImagePaintSample_Previews: PreviewProvider { 37 | static var previews: some View { 38 | ImagePaintSample() 39 | } 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /SwiftUICatalog/View Layout and Presentation/Sample/List.swift: -------------------------------------------------------------------------------- 1 | // 2 | // List.swift 3 | // 4 | // ViewModifierSample.swift 5 | // SwiftUICatalog 6 | // 7 | // Copyright (c) 2019 Kazuhiro Hayashi 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import SwiftUI 28 | 29 | struct ListSample: View { 30 | var body: some View { 31 | List { 32 | ForEach((0..<100), id: \.self) { 33 | Text("\($0)") 34 | } 35 | }.navigationBarTitle("List") 36 | } 37 | } 38 | 39 | #if DEBUG 40 | struct List_Previews: PreviewProvider { 41 | static var previews: some View { 42 | ListSample() 43 | } 44 | } 45 | #endif 46 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/PathSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PathSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct PathSample: View { 28 | var body: some View { 29 | Path { (path) in 30 | path.move(to: CGPoint(x: 20, y: 0)) 31 | path.addLine(to: CGPoint(x: 20, y: 300)) 32 | path.addLine(to: CGPoint(x: 300, y: 300)) 33 | } 34 | } 35 | } 36 | #if DEBUG 37 | struct PathSample_Previews: PreviewProvider { 38 | static var previews: some View { 39 | PathSample() 40 | } 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/RoundedRectangleSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RoundedRectangleSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct RoundedRectangleSample: View { 28 | var body: some View { 29 | RoundedRectangle(cornerRadius: 10).frame(width: 200, height: 200).foregroundColor(.red) 30 | .navigationBarTitle("RoundedRectangle") 31 | } 32 | } 33 | 34 | #if DEBUG 35 | struct RoundedRectangleSample_Previews: PreviewProvider { 36 | static var previews: some View { 37 | RoundedRectangleSample() 38 | } 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /SwiftUICatalog/View Layout and Presentation/Sample/TupleViewSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TupleViewSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct TupleViewSample: View { 28 | var body: some View { 29 | TupleView( 30 | (Rectangle().frame(width: 50, height: 50).foregroundColor(.red), 31 | Rectangle().frame(width: 50, height: 50).foregroundColor(.blue)) 32 | ) 33 | } 34 | } 35 | 36 | #if DEBUG 37 | struct TupleViewSample_Previews: PreviewProvider { 38 | static var previews: some View { 39 | TupleViewSample() 40 | } 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/OffsetShapeSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OffsetShapeSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct OffsetShapeSample: View { 28 | var body: some View { 29 | OffsetShape(shape: Rectangle(), offset: CGSize(width: 100, height: 100)) 30 | .frame(width: 200, height: 200).foregroundColor(.red) 31 | .navigationBarTitle("OffsetShape") 32 | } 33 | } 34 | 35 | #if DEBUG 36 | struct OffsetShapeSample_Previews: PreviewProvider { 37 | static var previews: some View { 38 | OffsetShapeSample() 39 | } 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/ViewBuilderSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewBuilderSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct ViewBuilderSample: View { 28 | var body: some View { 29 | ViewBuilder.buildBlock( 30 | Rectangle().frame(width: 50, height: 50).foregroundColor(.red), 31 | Rectangle().frame(width: 50, height: 50).foregroundColor(.blue) 32 | ) 33 | } 34 | } 35 | 36 | #if DEBUG 37 | struct ViewBuilderSample_Previews: PreviewProvider { 38 | static var previews: some View { 39 | ViewBuilderSample() 40 | } 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /SwiftUICatalog/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/RotatedShapeSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RotatedShapeSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct RotatedShapeSample: View { 28 | var body: some View { 29 | RotatedShape( 30 | shape: Rectangle(), 31 | angle: Angle(radians: Double.pi/4) 32 | ).frame(width: 200, height: 200).foregroundColor(.red) 33 | .navigationBarTitle("RotatedShape") 34 | } 35 | } 36 | #if DEBUG 37 | struct RotatedShapeSample_Previews: PreviewProvider { 38 | static var previews: some View { 39 | RotatedShapeSample() 40 | } 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/ScaledShapeSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScaledShapeSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct ScaledShapeSample: View { 28 | var body: some View { 29 | ScaledShape( 30 | shape: Rectangle(), 31 | scale: CGSize(width: 2, height: 2) 32 | ).frame(width: 200, height: 200).foregroundColor(.red) 33 | .navigationBarTitle("ScaledShape") 34 | } 35 | } 36 | 37 | #if DEBUG 38 | struct ScaledShapeSample_Previews: PreviewProvider { 39 | static var previews: some View { 40 | ScaledShapeSample() 41 | } 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/AngularGradientSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AngularGradientSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct AngularGradientSample: View { 28 | var body: some View { 29 | AngularGradient( 30 | gradient: Gradient(colors: [Color.red, Color.blue]), 31 | center: UnitPoint(x: 1, y: 0.5) 32 | ) 33 | .navigationBarTitle("AngularGradient") 34 | } 35 | } 36 | 37 | #if DEBUG 38 | struct AngularGradientSample_Previews: PreviewProvider { 39 | static var previews: some View { 40 | AngularGradientSample() 41 | } 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/TextFieldSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextFieldSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct TextFieldSample: View { 28 | @State var inputText: String = "" 29 | 30 | var body: some View { 31 | VStack { 32 | TextField("text field", text: $inputText) 33 | .frame(width: 200, height: 50) 34 | 35 | Text("input: " + inputText) 36 | } 37 | } 38 | } 39 | 40 | #if DEBUG 41 | struct TextFieldSample_Previews: PreviewProvider { 42 | static var previews: some View { 43 | TextFieldSample() 44 | } 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/ImageSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct ImageSample: View { 28 | let imgFromSfSymbol = UIImage( 29 | systemName: "photo.fill", 30 | withConfiguration: UIImage.SymbolConfiguration(pointSize: 50) 31 | )!.withRenderingMode(.alwaysTemplate) 32 | 33 | var body: some View { 34 | Image(uiImage: imgFromSfSymbol) 35 | .foregroundColor(.red) 36 | } 37 | } 38 | 39 | #if DEBUG 40 | struct ImageSample_Previews: PreviewProvider { 41 | static var previews: some View { 42 | ImageSample() 43 | } 44 | } 45 | #endif 46 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/RadialGradientSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RadialGradientSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct RadialGradientSample: View { 28 | var body: some View { 29 | RadialGradient( 30 | gradient: Gradient(colors: [Color.red, Color.blue]), 31 | center: .center, 32 | startRadius: 0, 33 | endRadius: 400) 34 | .navigationBarTitle("RadialGradient") 35 | } 36 | } 37 | 38 | #if DEBUG 39 | struct RadialGradientSample_Previews: PreviewProvider { 40 | static var previews: some View { 41 | RadialGradientSample() 42 | } 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/SecureFieldSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecureFieldSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct SecureFieldSample: View { 28 | @State var inputText: String = "" 29 | 30 | var body: some View { 31 | VStack { 32 | SecureField("secure field", text: $inputText) 33 | .frame(width: 200, height: 50) 34 | 35 | Text("input: " + inputText) 36 | } 37 | } 38 | } 39 | 40 | 41 | #if DEBUG 42 | struct SecureFieldSample_Previews: PreviewProvider { 43 | static var previews: some View { 44 | SecureFieldSample() 45 | } 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/ViewModifierSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewModifierSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct ViewModifierSample: View { 28 | var body: some View { 29 | Rectangle().modifier(Green50x50Modifier()) 30 | } 31 | 32 | struct Green50x50Modifier: ViewModifier { 33 | func body(content: Content) -> some View { 34 | content.foregroundColor(.green).frame(width: 50, height: 50) 35 | } 36 | } 37 | } 38 | 39 | #if DEBUG 40 | struct ViewModifierSample_Previews: PreviewProvider { 41 | static var previews: some View { 42 | ViewModifierSample() 43 | } 44 | } 45 | #endif 46 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/LinearGradientSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LinearGradientSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct LinearGradientSample: View { 28 | var body: some View { 29 | LinearGradient( 30 | gradient: Gradient(colors: [Color.red, Color.blue]), 31 | startPoint: UnitPoint(x: 0.5, y: 0), 32 | endPoint: UnitPoint(x: 0.5, y: 1) 33 | ) 34 | .navigationBarTitle("LinearGradient") 35 | } 36 | } 37 | 38 | #if DEBUG 39 | struct LinearGradientSample_Previews: PreviewProvider { 40 | static var previews: some View { 41 | LinearGradientSample() 42 | } 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /SwiftUICatalog/Views and Controls/Sample/PickerSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PickerSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct PickerSample: View { 28 | var elems = ["Short", "Tall", "Grande", "Venti"] 29 | @State var selection: Int = 0 30 | 31 | var body: some View { 32 | Picker(selection: $selection, label: Text("Label")) { 33 | ForEach(0.. 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UISceneConfigurationName 35 | Default Configuration 36 | UISceneDelegateClassName 37 | $(PRODUCT_MODULE_NAME).SceneDelegate 38 | 39 | 40 | 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UISupportedInterfaceOrientations~ipad 55 | 56 | UIInterfaceOrientationPortrait 57 | UIInterfaceOrientationPortraitUpsideDown 58 | UIInterfaceOrientationLandscapeLeft 59 | UIInterfaceOrientationLandscapeRight 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /SwiftUICatalog/View Layout and Presentation/Sample/Group.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Group.swift 3 | // 4 | // ViewModifierSample.swift 5 | // SwiftUICatalog 6 | // 7 | // Copyright (c) 2019 Kazuhiro Hayashi 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import SwiftUI 28 | 29 | struct GroupSample: View { 30 | var body: some View { 31 | Group { 32 | Group { 33 | Rectangle().frame(width: 50, height: 50).foregroundColor(.red) 34 | Rectangle().frame(width: 50, height: 50).foregroundColor(.blue) 35 | Rectangle().frame(width: 50, height: 50).foregroundColor(.green) 36 | } 37 | Group { 38 | Circle().frame(width: 50, height: 50).foregroundColor(.red) 39 | Circle().frame(width: 50, height: 50).foregroundColor(.blue) 40 | Circle().frame(width: 50, height: 50).foregroundColor(.green) 41 | } 42 | }.navigationBarTitle("Group") 43 | } 44 | } 45 | 46 | 47 | #if DEBUG 48 | struct Group_Previews: PreviewProvider { 49 | static var previews: some View { 50 | GroupSample() 51 | } 52 | } 53 | #endif 54 | -------------------------------------------------------------------------------- /SwiftUICatalog/View Layout and Presentation/Sample/ScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ScrollView.swift 3 | // 4 | // ViewModifierSample.swift 5 | // SwiftUICatalog 6 | // 7 | // Copyright (c) 2019 Kazuhiro Hayashi 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import SwiftUI 28 | 29 | struct ScrollViewVerticalSample: View { 30 | var body: some View { 31 | ScrollView { 32 | Rectangle().frame(width: 300, height: 300).foregroundColor(.red) 33 | Rectangle().frame(width: 300, height: 300).foregroundColor(.blue) 34 | Rectangle().frame(width: 300, height: 300).foregroundColor(.green) 35 | }.navigationBarTitle("ScrollView - Vertical") 36 | } 37 | } 38 | 39 | struct ScrollViewHorizontalSample: View { 40 | var body: some View { 41 | ScrollView(.horizontal) { 42 | HStack { 43 | Rectangle().frame(width: 300, height: 300).foregroundColor(.red) 44 | Rectangle().frame(width: 300, height: 300).foregroundColor(.blue) 45 | Rectangle().frame(width: 300, height: 300).foregroundColor(.green) 46 | } 47 | }.navigationBarTitle("ScrollView - Horizontal") 48 | } 49 | } 50 | 51 | #if DEBUG 52 | struct ScrollView_Previews: PreviewProvider { 53 | static var previews: some View { 54 | ScrollViewVerticalSample() 55 | } 56 | } 57 | #endif 58 | -------------------------------------------------------------------------------- /SwiftUICatalog/View Layout and Presentation/Sample/EquatableViewSample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EquatableViewSample.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct EquatableViewSample: View { 28 | @State var increment1: Int = 0 29 | @State var increment2: Int = 0 30 | 31 | var body: some View { 32 | VStack { 33 | HStack { 34 | Button("left increment") { 35 | self.increment1 += 1 36 | } 37 | Button("right increment") { 38 | self.increment2 += 1 39 | } 40 | } 41 | 42 | EquatableView(content: ComparedView(increment1: increment1, increment2: increment2)) 43 | } 44 | } 45 | } 46 | 47 | struct ComparedView: View, Equatable { 48 | var increment1: Int 49 | var increment2: Int 50 | 51 | static func == (lhs: ComparedView, rhs: ComparedView) -> Bool { 52 | return lhs.increment1 == rhs.increment2 53 | } 54 | 55 | var body: some View { 56 | Text("increment1: \(increment1), increment2: \(increment2)") 57 | } 58 | } 59 | 60 | #if DEBUG 61 | struct EquatableViewSample_Previews: PreviewProvider { 62 | static var previews: some View { 63 | EquatableViewSample() 64 | } 65 | } 66 | #endif 67 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/Sample/AnimatableSample.swift: -------------------------------------------------------------------------------- 1 | // SwiftUICatalog 2 | // 3 | // Copyright (c) 2019 Kazuhiro Hayashi 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import SwiftUI 24 | 25 | struct AnimatableSample: View { 26 | @State var color: Color = .red 27 | 28 | var body: some View { 29 | VStack { 30 | ColorAnimate( 31 | shape: Rectangle(), 32 | color: color 33 | ).frame(width: 200, height: 200) 34 | .animation(Animation.easeInOut(duration: 1).repeatForever(autoreverses: true)) 35 | 36 | Button("Animation") { 37 | self.color = .blue 38 | } 39 | } 40 | .navigationBarTitle("Animation") 41 | } 42 | 43 | struct ColorAnimate: View, Animatable { 44 | var body: some View { 45 | shape.foregroundColor(color) 46 | } 47 | 48 | var shape: S 49 | var color: Color 50 | 51 | var animatableData: Color { 52 | get { 53 | color 54 | } 55 | set { 56 | color = newValue 57 | } 58 | } 59 | } 60 | } 61 | 62 | #if DEBUG 63 | struct AnimatableSample_Previews: PreviewProvider { 64 | static var previews: some View { 65 | AnimatableSample() 66 | } 67 | } 68 | #endif 69 | -------------------------------------------------------------------------------- /SwiftUICatalog/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // SwiftUICatalog 2 | // 3 | // Copyright (c) 2019 Kazuhiro Hayashi 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import UIKit 24 | 25 | @UIApplicationMain 26 | class AppDelegate: UIResponder, UIApplicationDelegate { 27 | 28 | 29 | 30 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 31 | // Override point for customization after application launch. 32 | return true 33 | } 34 | 35 | // MARK: UISceneSession Lifecycle 36 | 37 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 38 | // Called when a new scene session is being created. 39 | // Use this method to select a configuration to create the new scene with. 40 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 41 | } 42 | 43 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 44 | // Called when the user discards a scene session. 45 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 46 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 47 | } 48 | 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /SwiftUICatalog/Gesture/Gesture.swift: -------------------------------------------------------------------------------- 1 | // SwiftUICatalog 2 | // 3 | // Copyright (c) 2019 Kazuhiro Hayashi 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import SwiftUI 24 | 25 | struct GestureSection: View { 26 | var body: some View { 27 | List { 28 | Section(header: Text("Basic Gestures")) { 29 | NavigationLink("TapGesture", destination: TapGestureSample()) 30 | NavigationLink("LongPressGesture", destination: LongPressGestureSample()) 31 | NavigationLink("DragGesture", destination: DragGestureSample()) 32 | NavigationLink("MagnificationGesture", destination: MagnificationGestureSample()) 33 | NavigationLink("RotationGesture", destination: RotationGestureSample()) 34 | } 35 | Section(header: Text("Combined Gestures")) { 36 | NavigationLink("SequenceGesture", destination: SequenceGestureSample()) 37 | NavigationLink("SimultaneousGesture", destination: SimultaneousGestureSample()) 38 | NavigationLink("ExclusiveGesture", destination: ExclusiveGestureSample()) 39 | } 40 | Section(header: Text("Custom Gestures")) { 41 | Text("Gesture") 42 | Text("AnyGesture") 43 | } 44 | Section(header: Text("Dynamic View Properties")) { 45 | Text("GestureState") 46 | Text("GestureStateGesture") 47 | } 48 | Section(header: Text("Gesture Support")) { 49 | NavigationLink("GestureMask", destination: GestureMaskSample()) 50 | Text("GestureStateGesture") 51 | } 52 | }.navigationBarTitle("Gesture") 53 | } 54 | } 55 | 56 | #if DEBUG 57 | struct Gesture_Previews: PreviewProvider { 58 | static var previews: some View { 59 | GestureSection() 60 | } 61 | } 62 | #endif 63 | -------------------------------------------------------------------------------- /SwiftUICatalog/ContentView.swift: -------------------------------------------------------------------------------- 1 | // SwiftUICatalog 2 | // 3 | // Copyright (c) 2019 Kazuhiro Hayashi 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import SwiftUI 24 | 25 | 26 | struct ContentView: View { 27 | var body: some View { 28 | TabView { 29 | NavigationView { 30 | ComponentList() 31 | } 32 | .tabItem { 33 | Image(systemName: "rectangle.grid.1x2.fill") 34 | Text("Component") 35 | }.tag(0) 36 | 37 | 38 | NavigationView { 39 | Text("View Modification") 40 | .navigationBarTitle("View Modification") 41 | }.tabItem { 42 | Image(systemName: "wrench.fill") 43 | Text("View Modification") 44 | }.tag(1) 45 | } 46 | .edgesIgnoringSafeArea(.top) 47 | } 48 | } 49 | 50 | struct ComponentList: View { 51 | var body: some View { 52 | List { 53 | Section(header: Text("User Interface")) { 54 | NavigationLink("Views and Controls", destination: ViewAndControls()) 55 | NavigationLink("View Layout and Presentation", destination: ViewLayoutAndPresentationList()) 56 | NavigationLink("Drawing and Animation", destination: DrawingAndAnimation()) 57 | Text("Framework Integration") 58 | } 59 | Section(header: Text("Data and Events")) { 60 | Text("State and Data Flow") 61 | NavigationLink("Gestures", destination: GestureSection()) 62 | } 63 | Section(header: Text("Preview in Xcode")) { 64 | Text("Previews") 65 | } 66 | }.navigationBarTitle("Component") 67 | } 68 | } 69 | 70 | 71 | #if DEBUG 72 | struct ContentView_Previews: PreviewProvider { 73 | static var previews: some View { 74 | ContentView() 75 | } 76 | } 77 | #endif 78 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftUICatalog 2 | 3 | Can you imagine how UI works from the API reference? 4 | 5 | I created a catalog app showing minimum implementation and execution result for each the API. 6 | 7 | SwiftUI has many references to get started. 8 | SwiftUI Tutorial is the best tool to know how much potential SwiftUI has. 9 | But it is a littel complex to research how to use each the API. 10 | 11 | This app currently targets iOS and refers to https://developer.apple.com/documentation/swiftui 12 | 13 | # Requirement 14 | - iOS 13+ 15 | - Xcode 11.0 beta5 16 | 17 | # Feature 18 | - [x] Showing appearance of each SwiftUI component 19 | - [x] Implementing minimum sample codes of each API 20 | 21 | # Usage 22 | 1. Clone this repository 23 | 2. Open the project in Xcode 11.0 beta5 24 | 3. Browse APIs like the doc 25 | 26 | # Example 27 | For example, SegmentedControl is implemented using Picker. 28 | 29 | ```swift 30 | struct SegmentedPickerSample: View { 31 | var elems = ["Short", "Tall", "Grande", "Venti"] 32 | @State var selection: Int = 0 33 | 34 | var body: some View { 35 | Picker(selection: $selection, label: Text("Picker")) { 36 | ForEach(0..: View, Animatable { 48 | var body: some View { 49 | shape.scale(rotate.value).foregroundColor(color.color) 50 | } 51 | 52 | var shape: S 53 | var color: ColorAnimate 54 | var rotate: RotateAnimate 55 | 56 | var animatableData: AnimatablePair { 57 | get { 58 | AnimatablePair(color.animatableData, rotate.animatableData) 59 | } 60 | set { 61 | color.animatableData = newValue.first 62 | rotate.animatableData = newValue.second 63 | } 64 | } 65 | } 66 | 67 | struct ColorAnimate: Animatable { 68 | var color: Color 69 | 70 | var animatableData: Color { 71 | get { 72 | color 73 | } 74 | set { 75 | color = newValue 76 | } 77 | } 78 | } 79 | 80 | struct RotateAnimate: Animatable { 81 | var value: CGFloat 82 | 83 | var animatableData: CGFloat { 84 | get { 85 | value 86 | } 87 | set { 88 | value = newValue 89 | } 90 | } 91 | } 92 | } 93 | 94 | #if DEBUG 95 | struct AnimatablePairSample_Previews: PreviewProvider { 96 | static var previews: some View { 97 | AnimatablePairSample() 98 | } 99 | } 100 | #endif 101 | -------------------------------------------------------------------------------- /SwiftUICatalog/View Layout and Presentation/ViewLayoutAndPresentationList.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUIView.swift 3 | // SwiftUICatalog 4 | // 5 | // Copyright (c) 2019 Kazuhiro Hayashi 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import SwiftUI 26 | 27 | struct ViewLayoutAndPresentationList: View { 28 | var body: some View { 29 | List { 30 | Section(header: Text("Stacks")) { 31 | NavigationLink("HStack", destination: HStackSample()) 32 | NavigationLink("VStack", destination: VStackSample()) 33 | NavigationLink("ZStack", destination: ZStackSample()) 34 | } 35 | Section(header: Text("Lists and Scroll Views")) { 36 | NavigationLink("List", destination: ListSample()) 37 | NavigationLink("ScrollView - Vertical", destination: ScrollViewVerticalSample()) 38 | NavigationLink("ScrollView - Horizontal", destination: ScrollViewHorizontalSample()) 39 | } 40 | Section(header: Text("Container Views")) { 41 | NavigationLink("Form", destination: FormSample()) 42 | NavigationLink("Group", destination: GroupSample()) 43 | Text("GroupBox") 44 | NavigationLink("Section", destination: FormSample()) 45 | } 46 | Section(header: Text("Spacers and Dividers")) { 47 | NavigationLink("Spacer", destination: SpacerSample()) 48 | NavigationLink("Divider", destination: DividerSample()) 49 | } 50 | Section(header: Text("Architectural Views")) { 51 | NavigationLink("NavigationView", destination: NavigationViewSample()) 52 | NavigationLink("TabView", destination: TabViewPresentationSample()) 53 | } 54 | Section(header: Text("Presentation")) { 55 | NavigationLink("Alert", destination: AlertSample()) 56 | NavigationLink("ActionSheet", destination: ActionSheetSample()) 57 | } 58 | Section(header: Text("Conditionally Visible Items")) { 59 | Text("ConditionalContent") 60 | NavigationLink("EmptyView", destination: EmptyViewSample()) 61 | NavigationLink("EquatableView", destination: EquatableViewSample()) 62 | } 63 | Section(header: Text("Infrequently Used Views")) { 64 | NavigationLink("AnyView", destination: AnyViewSample()) 65 | NavigationLink("TupleView", destination: TupleViewSample()) 66 | } 67 | }.navigationBarTitle("View Layout and Presentation") 68 | } 69 | } 70 | 71 | #if DEBUG 72 | struct SwiftUIView_Previews: PreviewProvider { 73 | static var previews: some View { 74 | ViewLayoutAndPresentationList() 75 | } 76 | } 77 | #endif 78 | -------------------------------------------------------------------------------- /SwiftUICatalog/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // SwiftUICatalog 2 | // 3 | // Copyright (c) 2019 Kazuhiro Hayashi 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import UIKit 24 | import SwiftUI 25 | 26 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 27 | 28 | var window: UIWindow? 29 | 30 | 31 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 32 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 33 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 34 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 35 | 36 | // Use a UIHostingController as window root view controller 37 | if let windowScene = scene as? UIWindowScene { 38 | let window = UIWindow(windowScene: windowScene) 39 | window.rootViewController = UIHostingController(rootView: ContentView()) 40 | self.window = window 41 | window.makeKeyAndVisible() 42 | } 43 | } 44 | 45 | func sceneDidDisconnect(_ scene: UIScene) { 46 | // Called as the scene is being released by the system. 47 | // This occurs shortly after the scene enters the background, or when its session is discarded. 48 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 49 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 50 | } 51 | 52 | func sceneDidBecomeActive(_ scene: UIScene) { 53 | // Called when the scene has moved from an inactive state to an active state. 54 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 55 | } 56 | 57 | func sceneWillResignActive(_ scene: UIScene) { 58 | // Called when the scene will move from an active state to an inactive state. 59 | // This may occur due to temporary interruptions (ex. an incoming phone call). 60 | } 61 | 62 | func sceneWillEnterForeground(_ scene: UIScene) { 63 | // Called as the scene transitions from the background to the foreground. 64 | // Use this method to undo the changes made on entering the background. 65 | } 66 | 67 | func sceneDidEnterBackground(_ scene: UIScene) { 68 | // Called as the scene transitions from the foreground to the background. 69 | // Use this method to save data, release shared resources, and store enough scene-specific state information 70 | // to restore the scene back to its current state. 71 | } 72 | 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /SwiftUICatalog/Drawing and Animation/DrawingAndAnimation.swift: -------------------------------------------------------------------------------- 1 | // SwiftUICatalog 2 | // 3 | // Copyright (c) 2019 Kazuhiro Hayashi 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import SwiftUI 24 | 25 | struct DrawingAndAnimation: View { 26 | var body: some View { 27 | List { 28 | Section(header: Text("Essentials")) { 29 | Text("Shape") 30 | Text("SpapeView") 31 | } 32 | Section(header: Text("Animation")) { 33 | NavigationLink("Animation", destination: AnimationSample()) 34 | NavigationLink("Animatable", destination: AnimatableSample()) 35 | Text("AnimatableModifier") 36 | NavigationLink("withAnimation", destination: WithAnimationSample()) 37 | NavigationLink("AnimatablePair", destination: AnimatablePairSample()) 38 | Text("EmptyAnimatableData") 39 | Text("AnyTransition") 40 | } 41 | Section(header: Text("Shapes")) { 42 | NavigationLink("Rectangle", destination: RectangleSample()) 43 | NavigationLink("Edge", destination: EdgeSample()) 44 | NavigationLink("RoundedRectangle", destination: RoundedRectangleSample()) 45 | NavigationLink("Circle", destination: CircleSample()) 46 | NavigationLink("Ellipse", destination: EllipseSample()) 47 | NavigationLink("Capsule", destination: CapsuleSample()) 48 | NavigationLink("Path", destination: PathSample()) 49 | } 50 | Section(header: Text("Transformed Shapes")) { 51 | Text("InsettableShape") 52 | NavigationLink("ScaledShape", destination: ScaledShapeSample()) 53 | NavigationLink("RotatedShape", destination: RotatedShapeSample()) 54 | NavigationLink("OffsetShape", destination: OffsetShapeSample()) 55 | NavigationLink("TransformedShape", destination: TransformedShapeSample()) 56 | Text("SizedShape") 57 | Text("StrokedShape") 58 | Text("TrimmedShape") 59 | } 60 | Section(header: Text("Paints, Styles, and Gradients")) { 61 | Group { 62 | NavigationLink("Color", destination: ColorSample()) 63 | NavigationLink("ImagePaint", destination: ImagePaintSample()) 64 | Text("Gradient") 65 | NavigationLink("LinearGradient", destination: LinearGradientSample()) 66 | NavigationLink("AngularGradient", destination: AngularGradientSample()) 67 | NavigationLink("RadialGradient", destination: RadialGradientSample()) 68 | Text("ForegroundStyle") 69 | Text("FillStyle") 70 | Text("ShapeStyle") 71 | 72 | } 73 | Group { 74 | Text("StrokeStyle") 75 | Text("RoundedCornerStyle") 76 | Text("SelectionShapeStyle") 77 | Text("SeparatorShapeStyle") 78 | Text("StrokeStyle") 79 | Text("AnchorShapedStyle") 80 | } 81 | } 82 | Section(header: Text("Paints, Styles, and Gradients")) { 83 | Group { 84 | Text("GeometryProxy") 85 | NavigationLink("GeometryReader", destination: GeometryReaderSample()) 86 | Text("GeometryEffect") 87 | Text("Angle") 88 | Text("Length") 89 | Text("Anchor") 90 | } 91 | Group { 92 | Text("UnitPoint") 93 | Text("CoordinateSpace") 94 | Text("ProjectionTransform") 95 | Text("VectorArithmetic") 96 | } 97 | } 98 | }.navigationBarTitle("Drawing and Animation") 99 | } 100 | } 101 | 102 | 103 | #if DEBUG 104 | struct DrawingAndAnimation_Previews: PreviewProvider { 105 | static var previews: some View { 106 | DrawingAndAnimation() 107 | } 108 | } 109 | #endif 110 | -------------------------------------------------------------------------------- /SwiftUICatalog.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2B067BA022F98B12004A8051 /* ViewLayoutAndPresentationList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B067B9F22F98B12004A8051 /* ViewLayoutAndPresentationList.swift */; }; 11 | 2B067BA222F98B46004A8051 /* HStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B067BA122F98B46004A8051 /* HStack.swift */; }; 12 | 2B067BA422F98BD5004A8051 /* VStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B067BA322F98BD5004A8051 /* VStack.swift */; }; 13 | 2B067BA622F98C08004A8051 /* ZStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B067BA522F98C08004A8051 /* ZStack.swift */; }; 14 | 2B067BA822F98C31004A8051 /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B067BA722F98C30004A8051 /* List.swift */; }; 15 | 2B067BAA22F98C56004A8051 /* ScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B067BA922F98C56004A8051 /* ScrollView.swift */; }; 16 | 2B067BAC22F98D1C004A8051 /* Form.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B067BAB22F98D1C004A8051 /* Form.swift */; }; 17 | 2B067BAE22F98D63004A8051 /* Group.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B067BAD22F98D63004A8051 /* Group.swift */; }; 18 | 2B067BB122F98E30004A8051 /* ViewAndControls.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B067BB022F98E2F004A8051 /* ViewAndControls.swift */; }; 19 | 2B22A61622F6988B00128814 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B22A61522F6988B00128814 /* AppDelegate.swift */; }; 20 | 2B22A61822F6988B00128814 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B22A61722F6988B00128814 /* SceneDelegate.swift */; }; 21 | 2B22A61A22F6988B00128814 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B22A61922F6988B00128814 /* ContentView.swift */; }; 22 | 2B22A61C22F6988E00128814 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B22A61B22F6988E00128814 /* Assets.xcassets */; }; 23 | 2B22A61F22F6988E00128814 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B22A61E22F6988E00128814 /* Preview Assets.xcassets */; }; 24 | 2B22A62222F6988E00128814 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B22A62022F6988E00128814 /* LaunchScreen.storyboard */; }; 25 | 2B22A62D22F6988E00128814 /* SwiftUICatalogTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B22A62C22F6988E00128814 /* SwiftUICatalogTests.swift */; }; 26 | 2B22A63822F6988F00128814 /* SwiftUICatalogUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B22A63722F6988F00128814 /* SwiftUICatalogUITests.swift */; }; 27 | 2B4F675222FA5BD200EF5403 /* AnimationSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B4F675122FA5BD200EF5403 /* AnimationSample.swift */; }; 28 | 2B66DE8822FA5C5700DEE894 /* AnimatableSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE8722FA5C5600DEE894 /* AnimatableSample.swift */; }; 29 | 2B66DE8A22FA5C6900DEE894 /* WithAnimationSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE8922FA5C6900DEE894 /* WithAnimationSample.swift */; }; 30 | 2B66DE8C22FA5C8400DEE894 /* AnimatablePairSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE8B22FA5C8400DEE894 /* AnimatablePairSample.swift */; }; 31 | 2B66DE8E22FA5CBC00DEE894 /* RectangleSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE8D22FA5CBC00DEE894 /* RectangleSample.swift */; }; 32 | 2B66DE9022FA5CD000DEE894 /* EdgeSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE8F22FA5CD000DEE894 /* EdgeSample.swift */; }; 33 | 2B66DE9222FA5CE700DEE894 /* RoundedRectangleSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE9122FA5CE700DEE894 /* RoundedRectangleSample.swift */; }; 34 | 2B66DE9422FA5D1B00DEE894 /* CircleSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE9322FA5D1B00DEE894 /* CircleSample.swift */; }; 35 | 2B66DE9622FA5D2D00DEE894 /* EllipseSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE9522FA5D2D00DEE894 /* EllipseSample.swift */; }; 36 | 2B66DE9822FA5D4200DEE894 /* CapsuleSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE9722FA5D4200DEE894 /* CapsuleSample.swift */; }; 37 | 2B66DE9A22FA5D5600DEE894 /* PathSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE9922FA5D5600DEE894 /* PathSample.swift */; }; 38 | 2B66DE9C22FA5DBA00DEE894 /* ScaledShapeSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE9B22FA5DBA00DEE894 /* ScaledShapeSample.swift */; }; 39 | 2B66DE9E22FA5E0800DEE894 /* RotatedShapeSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE9D22FA5E0800DEE894 /* RotatedShapeSample.swift */; }; 40 | 2B66DEA022FA5E5500DEE894 /* OffsetShapeSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DE9F22FA5E5500DEE894 /* OffsetShapeSample.swift */; }; 41 | 2B66DEA222FA5E7F00DEE894 /* TransformedShapeSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DEA122FA5E7F00DEE894 /* TransformedShapeSample.swift */; }; 42 | 2B66DEA422FA5EBF00DEE894 /* ColorSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DEA322FA5EBF00DEE894 /* ColorSample.swift */; }; 43 | 2B66DEA622FA5ED600DEE894 /* ImagePaintSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DEA522FA5ED600DEE894 /* ImagePaintSample.swift */; }; 44 | 2B66DEA822FA5EE400DEE894 /* LinearGradientSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DEA722FA5EE400DEE894 /* LinearGradientSample.swift */; }; 45 | 2B66DEAA22FA5EEF00DEE894 /* AngularGradientSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DEA922FA5EEF00DEE894 /* AngularGradientSample.swift */; }; 46 | 2B66DEAC22FA5EFA00DEE894 /* RadialGradientSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DEAB22FA5EFA00DEE894 /* RadialGradientSample.swift */; }; 47 | 2B66DEB222FA5F7E00DEE894 /* GeometryReaderSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DEB122FA5F7E00DEE894 /* GeometryReaderSample.swift */; }; 48 | 2B66DEB422FA60C900DEE894 /* TextSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B66DEB322FA60C900DEE894 /* TextSample.swift */; }; 49 | 2B69101222F9B3F300149C5F /* DrawingAndAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B69101122F9B3F300149C5F /* DrawingAndAnimation.swift */; }; 50 | 2B69101522F9B6C600149C5F /* Gesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B69101422F9B6C600149C5F /* Gesture.swift */; }; 51 | 2BCE76C522FD66E7007ED1A3 /* TapGestureSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BCE76C422FD66E7007ED1A3 /* TapGestureSample.swift */; }; 52 | 2BCE76C722FD66F4007ED1A3 /* LongPressGestureSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BCE76C622FD66F4007ED1A3 /* LongPressGestureSample.swift */; }; 53 | 2BCE76C922FD6707007ED1A3 /* DragGestureSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BCE76C822FD6707007ED1A3 /* DragGestureSample.swift */; }; 54 | 2BCE76CB22FD6712007ED1A3 /* MagnificationGestureSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BCE76CA22FD6712007ED1A3 /* MagnificationGestureSample.swift */; }; 55 | 2BCE76CD22FD671B007ED1A3 /* RotationGestureSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BCE76CC22FD671B007ED1A3 /* RotationGestureSample.swift */; }; 56 | 2BCE76CF22FD6725007ED1A3 /* SequenceGestureSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BCE76CE22FD6725007ED1A3 /* SequenceGestureSample.swift */; }; 57 | 2BCE76D122FD672F007ED1A3 /* SimultaneousGestureSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BCE76D022FD672F007ED1A3 /* SimultaneousGestureSample.swift */; }; 58 | 2BCE76D322FD6738007ED1A3 /* ExclusiveGestureSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BCE76D222FD6738007ED1A3 /* ExclusiveGestureSample.swift */; }; 59 | 2BCE76DD22FD678B007ED1A3 /* GestureMaskSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BCE76DC22FD678B007ED1A3 /* GestureMaskSample.swift */; }; 60 | 2BE6426122FA613E002B4E09 /* TextFieldSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6426022FA613E002B4E09 /* TextFieldSample.swift */; }; 61 | 2BE6426322FA6157002B4E09 /* SecureFieldSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6426222FA6157002B4E09 /* SecureFieldSample.swift */; }; 62 | 2BE6426522FA6164002B4E09 /* FontSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6426422FA6164002B4E09 /* FontSample.swift */; }; 63 | 2BE6426722FA6170002B4E09 /* ImageSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6426622FA6170002B4E09 /* ImageSample.swift */; }; 64 | 2BE6426922FA6182002B4E09 /* ButtonSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6426822FA6182002B4E09 /* ButtonSample.swift */; }; 65 | 2BE6426B22FA618C002B4E09 /* NavigationLinkSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6426A22FA618C002B4E09 /* NavigationLinkSample.swift */; }; 66 | 2BE6426D22FA6194002B4E09 /* EditButtonSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6426C22FA6194002B4E09 /* EditButtonSample.swift */; }; 67 | 2BE6426F22FA61A3002B4E09 /* ToggleSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6426E22FA61A3002B4E09 /* ToggleSample.swift */; }; 68 | 2BE6427122FA61B1002B4E09 /* PickerSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6427022FA61B1002B4E09 /* PickerSample.swift */; }; 69 | 2BE6427322FA61BB002B4E09 /* DatePickerSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6427222FA61BB002B4E09 /* DatePickerSample.swift */; }; 70 | 2BE6427522FA61C5002B4E09 /* SliderSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6427422FA61C5002B4E09 /* SliderSample.swift */; }; 71 | 2BE6427722FA61D0002B4E09 /* StepperSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6427622FA61D0002B4E09 /* StepperSample.swift */; }; 72 | 2BE6427922FA61DF002B4E09 /* SegmentedPickerSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6427822FA61DF002B4E09 /* SegmentedPickerSample.swift */; }; 73 | 2BE6427B22FA61ED002B4E09 /* ViewBuilderSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6427A22FA61ED002B4E09 /* ViewBuilderSample.swift */; }; 74 | 2BE6427D22FA61FA002B4E09 /* ViewModifierSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6427C22FA61FA002B4E09 /* ViewModifierSample.swift */; }; 75 | 2BE6427F22FA621A002B4E09 /* SpacerSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6427E22FA621A002B4E09 /* SpacerSample.swift */; }; 76 | 2BE6428122FA6231002B4E09 /* DividerSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6428022FA6231002B4E09 /* DividerSample.swift */; }; 77 | 2BE6428322FA623A002B4E09 /* NavigationViewSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6428222FA623A002B4E09 /* NavigationViewSample.swift */; }; 78 | 2BE6428522FA624B002B4E09 /* NavigationViewContentSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6428422FA624B002B4E09 /* NavigationViewContentSample.swift */; }; 79 | 2BE6428722FA6255002B4E09 /* TabViewPresentationSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6428622FA6255002B4E09 /* TabViewPresentationSample.swift */; }; 80 | 2BE6428922FA6263002B4E09 /* TabViewSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6428822FA6263002B4E09 /* TabViewSample.swift */; }; 81 | 2BE6428B22FA6271002B4E09 /* EmptyViewSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6428A22FA6271002B4E09 /* EmptyViewSample.swift */; }; 82 | 2BE6428D22FA627B002B4E09 /* AnyViewSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6428C22FA627B002B4E09 /* AnyViewSample.swift */; }; 83 | 2BE6428F22FA6291002B4E09 /* TupleViewSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6428E22FA6291002B4E09 /* TupleViewSample.swift */; }; 84 | 2BE6429122FA629F002B4E09 /* EquatableViewSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6429022FA629F002B4E09 /* EquatableViewSample.swift */; }; 85 | 2BE6429522FA62D8002B4E09 /* AlertSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6429422FA62D8002B4E09 /* AlertSample.swift */; }; 86 | 2BE6429722FA62E5002B4E09 /* ActionSheetSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BE6429622FA62E5002B4E09 /* ActionSheetSample.swift */; }; 87 | /* End PBXBuildFile section */ 88 | 89 | /* Begin PBXContainerItemProxy section */ 90 | 2B22A62922F6988E00128814 /* PBXContainerItemProxy */ = { 91 | isa = PBXContainerItemProxy; 92 | containerPortal = 2B22A60A22F6988B00128814 /* Project object */; 93 | proxyType = 1; 94 | remoteGlobalIDString = 2B22A61122F6988B00128814; 95 | remoteInfo = SwiftUICatalog; 96 | }; 97 | 2B22A63422F6988F00128814 /* PBXContainerItemProxy */ = { 98 | isa = PBXContainerItemProxy; 99 | containerPortal = 2B22A60A22F6988B00128814 /* Project object */; 100 | proxyType = 1; 101 | remoteGlobalIDString = 2B22A61122F6988B00128814; 102 | remoteInfo = SwiftUICatalog; 103 | }; 104 | /* End PBXContainerItemProxy section */ 105 | 106 | /* Begin PBXFileReference section */ 107 | 2B067B9F22F98B12004A8051 /* ViewLayoutAndPresentationList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewLayoutAndPresentationList.swift; sourceTree = ""; }; 108 | 2B067BA122F98B46004A8051 /* HStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HStack.swift; sourceTree = ""; }; 109 | 2B067BA322F98BD5004A8051 /* VStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VStack.swift; sourceTree = ""; }; 110 | 2B067BA522F98C08004A8051 /* ZStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZStack.swift; sourceTree = ""; }; 111 | 2B067BA722F98C30004A8051 /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; 112 | 2B067BA922F98C56004A8051 /* ScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollView.swift; sourceTree = ""; }; 113 | 2B067BAB22F98D1C004A8051 /* Form.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Form.swift; sourceTree = ""; }; 114 | 2B067BAD22F98D63004A8051 /* Group.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Group.swift; sourceTree = ""; }; 115 | 2B067BB022F98E2F004A8051 /* ViewAndControls.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewAndControls.swift; sourceTree = ""; }; 116 | 2B22A61222F6988B00128814 /* SwiftUICatalog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftUICatalog.app; sourceTree = BUILT_PRODUCTS_DIR; }; 117 | 2B22A61522F6988B00128814 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 118 | 2B22A61722F6988B00128814 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 119 | 2B22A61922F6988B00128814 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 120 | 2B22A61B22F6988E00128814 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 121 | 2B22A61E22F6988E00128814 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 122 | 2B22A62122F6988E00128814 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 123 | 2B22A62322F6988E00128814 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 124 | 2B22A62822F6988E00128814 /* SwiftUICatalogTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftUICatalogTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 125 | 2B22A62C22F6988E00128814 /* SwiftUICatalogTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUICatalogTests.swift; sourceTree = ""; }; 126 | 2B22A62E22F6988E00128814 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 127 | 2B22A63322F6988F00128814 /* SwiftUICatalogUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftUICatalogUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 128 | 2B22A63722F6988F00128814 /* SwiftUICatalogUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUICatalogUITests.swift; sourceTree = ""; }; 129 | 2B22A63922F6988F00128814 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 130 | 2B4F675122FA5BD200EF5403 /* AnimationSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationSample.swift; sourceTree = ""; }; 131 | 2B66DE8722FA5C5600DEE894 /* AnimatableSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatableSample.swift; sourceTree = ""; }; 132 | 2B66DE8922FA5C6900DEE894 /* WithAnimationSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WithAnimationSample.swift; sourceTree = ""; }; 133 | 2B66DE8B22FA5C8400DEE894 /* AnimatablePairSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatablePairSample.swift; sourceTree = ""; }; 134 | 2B66DE8D22FA5CBC00DEE894 /* RectangleSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RectangleSample.swift; sourceTree = ""; }; 135 | 2B66DE8F22FA5CD000DEE894 /* EdgeSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EdgeSample.swift; sourceTree = ""; }; 136 | 2B66DE9122FA5CE700DEE894 /* RoundedRectangleSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundedRectangleSample.swift; sourceTree = ""; }; 137 | 2B66DE9322FA5D1B00DEE894 /* CircleSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleSample.swift; sourceTree = ""; }; 138 | 2B66DE9522FA5D2D00DEE894 /* EllipseSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EllipseSample.swift; sourceTree = ""; }; 139 | 2B66DE9722FA5D4200DEE894 /* CapsuleSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapsuleSample.swift; sourceTree = ""; }; 140 | 2B66DE9922FA5D5600DEE894 /* PathSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PathSample.swift; sourceTree = ""; }; 141 | 2B66DE9B22FA5DBA00DEE894 /* ScaledShapeSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScaledShapeSample.swift; sourceTree = ""; }; 142 | 2B66DE9D22FA5E0800DEE894 /* RotatedShapeSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RotatedShapeSample.swift; sourceTree = ""; }; 143 | 2B66DE9F22FA5E5500DEE894 /* OffsetShapeSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffsetShapeSample.swift; sourceTree = ""; }; 144 | 2B66DEA122FA5E7F00DEE894 /* TransformedShapeSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransformedShapeSample.swift; sourceTree = ""; }; 145 | 2B66DEA322FA5EBF00DEE894 /* ColorSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorSample.swift; sourceTree = ""; }; 146 | 2B66DEA522FA5ED600DEE894 /* ImagePaintSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImagePaintSample.swift; sourceTree = ""; }; 147 | 2B66DEA722FA5EE400DEE894 /* LinearGradientSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinearGradientSample.swift; sourceTree = ""; }; 148 | 2B66DEA922FA5EEF00DEE894 /* AngularGradientSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AngularGradientSample.swift; sourceTree = ""; }; 149 | 2B66DEAB22FA5EFA00DEE894 /* RadialGradientSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadialGradientSample.swift; sourceTree = ""; }; 150 | 2B66DEB122FA5F7E00DEE894 /* GeometryReaderSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeometryReaderSample.swift; sourceTree = ""; }; 151 | 2B66DEB322FA60C900DEE894 /* TextSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextSample.swift; sourceTree = ""; }; 152 | 2B69101122F9B3F300149C5F /* DrawingAndAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DrawingAndAnimation.swift; sourceTree = ""; }; 153 | 2B69101422F9B6C600149C5F /* Gesture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Gesture.swift; sourceTree = ""; }; 154 | 2BCE76C422FD66E7007ED1A3 /* TapGestureSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapGestureSample.swift; sourceTree = ""; }; 155 | 2BCE76C622FD66F4007ED1A3 /* LongPressGestureSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LongPressGestureSample.swift; sourceTree = ""; }; 156 | 2BCE76C822FD6707007ED1A3 /* DragGestureSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DragGestureSample.swift; sourceTree = ""; }; 157 | 2BCE76CA22FD6712007ED1A3 /* MagnificationGestureSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagnificationGestureSample.swift; sourceTree = ""; }; 158 | 2BCE76CC22FD671B007ED1A3 /* RotationGestureSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RotationGestureSample.swift; sourceTree = ""; }; 159 | 2BCE76CE22FD6725007ED1A3 /* SequenceGestureSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SequenceGestureSample.swift; sourceTree = ""; }; 160 | 2BCE76D022FD672F007ED1A3 /* SimultaneousGestureSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimultaneousGestureSample.swift; sourceTree = ""; }; 161 | 2BCE76D222FD6738007ED1A3 /* ExclusiveGestureSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExclusiveGestureSample.swift; sourceTree = ""; }; 162 | 2BCE76DC22FD678B007ED1A3 /* GestureMaskSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GestureMaskSample.swift; sourceTree = ""; }; 163 | 2BE6426022FA613E002B4E09 /* TextFieldSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldSample.swift; sourceTree = ""; }; 164 | 2BE6426222FA6157002B4E09 /* SecureFieldSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureFieldSample.swift; sourceTree = ""; }; 165 | 2BE6426422FA6164002B4E09 /* FontSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontSample.swift; sourceTree = ""; }; 166 | 2BE6426622FA6170002B4E09 /* ImageSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageSample.swift; sourceTree = ""; }; 167 | 2BE6426822FA6182002B4E09 /* ButtonSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonSample.swift; sourceTree = ""; }; 168 | 2BE6426A22FA618C002B4E09 /* NavigationLinkSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationLinkSample.swift; sourceTree = ""; }; 169 | 2BE6426C22FA6194002B4E09 /* EditButtonSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditButtonSample.swift; sourceTree = ""; }; 170 | 2BE6426E22FA61A3002B4E09 /* ToggleSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToggleSample.swift; sourceTree = ""; }; 171 | 2BE6427022FA61B1002B4E09 /* PickerSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickerSample.swift; sourceTree = ""; }; 172 | 2BE6427222FA61BB002B4E09 /* DatePickerSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePickerSample.swift; sourceTree = ""; }; 173 | 2BE6427422FA61C5002B4E09 /* SliderSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderSample.swift; sourceTree = ""; }; 174 | 2BE6427622FA61D0002B4E09 /* StepperSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepperSample.swift; sourceTree = ""; }; 175 | 2BE6427822FA61DF002B4E09 /* SegmentedPickerSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentedPickerSample.swift; sourceTree = ""; }; 176 | 2BE6427A22FA61ED002B4E09 /* ViewBuilderSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewBuilderSample.swift; sourceTree = ""; }; 177 | 2BE6427C22FA61FA002B4E09 /* ViewModifierSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModifierSample.swift; sourceTree = ""; }; 178 | 2BE6427E22FA621A002B4E09 /* SpacerSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpacerSample.swift; sourceTree = ""; }; 179 | 2BE6428022FA6231002B4E09 /* DividerSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DividerSample.swift; sourceTree = ""; }; 180 | 2BE6428222FA623A002B4E09 /* NavigationViewSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationViewSample.swift; sourceTree = ""; }; 181 | 2BE6428422FA624B002B4E09 /* NavigationViewContentSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationViewContentSample.swift; sourceTree = ""; }; 182 | 2BE6428622FA6255002B4E09 /* TabViewPresentationSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabViewPresentationSample.swift; sourceTree = ""; }; 183 | 2BE6428822FA6263002B4E09 /* TabViewSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabViewSample.swift; sourceTree = ""; }; 184 | 2BE6428A22FA6271002B4E09 /* EmptyViewSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyViewSample.swift; sourceTree = ""; }; 185 | 2BE6428C22FA627B002B4E09 /* AnyViewSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyViewSample.swift; sourceTree = ""; }; 186 | 2BE6428E22FA6291002B4E09 /* TupleViewSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TupleViewSample.swift; sourceTree = ""; }; 187 | 2BE6429022FA629F002B4E09 /* EquatableViewSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EquatableViewSample.swift; sourceTree = ""; }; 188 | 2BE6429422FA62D8002B4E09 /* AlertSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertSample.swift; sourceTree = ""; }; 189 | 2BE6429622FA62E5002B4E09 /* ActionSheetSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionSheetSample.swift; sourceTree = ""; }; 190 | /* End PBXFileReference section */ 191 | 192 | /* Begin PBXFrameworksBuildPhase section */ 193 | 2B22A60F22F6988B00128814 /* Frameworks */ = { 194 | isa = PBXFrameworksBuildPhase; 195 | buildActionMask = 2147483647; 196 | files = ( 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | 2B22A62522F6988E00128814 /* Frameworks */ = { 201 | isa = PBXFrameworksBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | 2B22A63022F6988F00128814 /* Frameworks */ = { 208 | isa = PBXFrameworksBuildPhase; 209 | buildActionMask = 2147483647; 210 | files = ( 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | }; 214 | /* End PBXFrameworksBuildPhase section */ 215 | 216 | /* Begin PBXGroup section */ 217 | 2B067B9E22F98AF3004A8051 /* View Layout and Presentation */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | 2B067B9F22F98B12004A8051 /* ViewLayoutAndPresentationList.swift */, 221 | 2BE6429A22FA6504002B4E09 /* Sample */, 222 | ); 223 | path = "View Layout and Presentation"; 224 | sourceTree = ""; 225 | }; 226 | 2B067BAF22F98E08004A8051 /* Views and Controls */ = { 227 | isa = PBXGroup; 228 | children = ( 229 | 2B067BB022F98E2F004A8051 /* ViewAndControls.swift */, 230 | 2BE6429922FA64EF002B4E09 /* Sample */, 231 | ); 232 | path = "Views and Controls"; 233 | sourceTree = ""; 234 | }; 235 | 2B22A60922F6988B00128814 = { 236 | isa = PBXGroup; 237 | children = ( 238 | 2B22A61422F6988B00128814 /* SwiftUICatalog */, 239 | 2B22A62B22F6988E00128814 /* SwiftUICatalogTests */, 240 | 2B22A63622F6988F00128814 /* SwiftUICatalogUITests */, 241 | 2B22A61322F6988B00128814 /* Products */, 242 | ); 243 | sourceTree = ""; 244 | }; 245 | 2B22A61322F6988B00128814 /* Products */ = { 246 | isa = PBXGroup; 247 | children = ( 248 | 2B22A61222F6988B00128814 /* SwiftUICatalog.app */, 249 | 2B22A62822F6988E00128814 /* SwiftUICatalogTests.xctest */, 250 | 2B22A63322F6988F00128814 /* SwiftUICatalogUITests.xctest */, 251 | ); 252 | name = Products; 253 | sourceTree = ""; 254 | }; 255 | 2B22A61422F6988B00128814 /* SwiftUICatalog */ = { 256 | isa = PBXGroup; 257 | children = ( 258 | 2B22A61522F6988B00128814 /* AppDelegate.swift */, 259 | 2B22A61722F6988B00128814 /* SceneDelegate.swift */, 260 | 2B22A61922F6988B00128814 /* ContentView.swift */, 261 | 2B69101322F9B6BB00149C5F /* Gesture */, 262 | 2B69101022F9B3C600149C5F /* Drawing and Animation */, 263 | 2B067BAF22F98E08004A8051 /* Views and Controls */, 264 | 2B067B9E22F98AF3004A8051 /* View Layout and Presentation */, 265 | 2B22A61B22F6988E00128814 /* Assets.xcassets */, 266 | 2B22A62022F6988E00128814 /* LaunchScreen.storyboard */, 267 | 2B22A62322F6988E00128814 /* Info.plist */, 268 | 2B22A61D22F6988E00128814 /* Preview Content */, 269 | ); 270 | path = SwiftUICatalog; 271 | sourceTree = ""; 272 | }; 273 | 2B22A61D22F6988E00128814 /* Preview Content */ = { 274 | isa = PBXGroup; 275 | children = ( 276 | 2B22A61E22F6988E00128814 /* Preview Assets.xcassets */, 277 | ); 278 | path = "Preview Content"; 279 | sourceTree = ""; 280 | }; 281 | 2B22A62B22F6988E00128814 /* SwiftUICatalogTests */ = { 282 | isa = PBXGroup; 283 | children = ( 284 | 2B22A62C22F6988E00128814 /* SwiftUICatalogTests.swift */, 285 | 2B22A62E22F6988E00128814 /* Info.plist */, 286 | ); 287 | path = SwiftUICatalogTests; 288 | sourceTree = ""; 289 | }; 290 | 2B22A63622F6988F00128814 /* SwiftUICatalogUITests */ = { 291 | isa = PBXGroup; 292 | children = ( 293 | 2B22A63722F6988F00128814 /* SwiftUICatalogUITests.swift */, 294 | 2B22A63922F6988F00128814 /* Info.plist */, 295 | ); 296 | path = SwiftUICatalogUITests; 297 | sourceTree = ""; 298 | }; 299 | 2B69101022F9B3C600149C5F /* Drawing and Animation */ = { 300 | isa = PBXGroup; 301 | children = ( 302 | 2B69101122F9B3F300149C5F /* DrawingAndAnimation.swift */, 303 | 2BE6429822FA64CA002B4E09 /* Sample */, 304 | ); 305 | path = "Drawing and Animation"; 306 | sourceTree = ""; 307 | }; 308 | 2B69101322F9B6BB00149C5F /* Gesture */ = { 309 | isa = PBXGroup; 310 | children = ( 311 | 2B69101422F9B6C600149C5F /* Gesture.swift */, 312 | 2BCE76C322FD66C6007ED1A3 /* Sample */, 313 | ); 314 | path = Gesture; 315 | sourceTree = ""; 316 | }; 317 | 2BCE76C322FD66C6007ED1A3 /* Sample */ = { 318 | isa = PBXGroup; 319 | children = ( 320 | 2BCE76C422FD66E7007ED1A3 /* TapGestureSample.swift */, 321 | 2BCE76C622FD66F4007ED1A3 /* LongPressGestureSample.swift */, 322 | 2BCE76C822FD6707007ED1A3 /* DragGestureSample.swift */, 323 | 2BCE76CA22FD6712007ED1A3 /* MagnificationGestureSample.swift */, 324 | 2BCE76CC22FD671B007ED1A3 /* RotationGestureSample.swift */, 325 | 2BCE76CE22FD6725007ED1A3 /* SequenceGestureSample.swift */, 326 | 2BCE76D022FD672F007ED1A3 /* SimultaneousGestureSample.swift */, 327 | 2BCE76D222FD6738007ED1A3 /* ExclusiveGestureSample.swift */, 328 | 2BCE76DC22FD678B007ED1A3 /* GestureMaskSample.swift */, 329 | ); 330 | path = Sample; 331 | sourceTree = ""; 332 | }; 333 | 2BE6429822FA64CA002B4E09 /* Sample */ = { 334 | isa = PBXGroup; 335 | children = ( 336 | 2B4F675122FA5BD200EF5403 /* AnimationSample.swift */, 337 | 2B66DE8722FA5C5600DEE894 /* AnimatableSample.swift */, 338 | 2B66DE8922FA5C6900DEE894 /* WithAnimationSample.swift */, 339 | 2B66DE8B22FA5C8400DEE894 /* AnimatablePairSample.swift */, 340 | 2B66DE8D22FA5CBC00DEE894 /* RectangleSample.swift */, 341 | 2B66DE8F22FA5CD000DEE894 /* EdgeSample.swift */, 342 | 2B66DE9122FA5CE700DEE894 /* RoundedRectangleSample.swift */, 343 | 2B66DE9322FA5D1B00DEE894 /* CircleSample.swift */, 344 | 2B66DE9522FA5D2D00DEE894 /* EllipseSample.swift */, 345 | 2B66DE9722FA5D4200DEE894 /* CapsuleSample.swift */, 346 | 2B66DE9922FA5D5600DEE894 /* PathSample.swift */, 347 | 2B66DE9B22FA5DBA00DEE894 /* ScaledShapeSample.swift */, 348 | 2B66DE9D22FA5E0800DEE894 /* RotatedShapeSample.swift */, 349 | 2B66DE9F22FA5E5500DEE894 /* OffsetShapeSample.swift */, 350 | 2B66DEA122FA5E7F00DEE894 /* TransformedShapeSample.swift */, 351 | 2B66DEA322FA5EBF00DEE894 /* ColorSample.swift */, 352 | 2B66DEA522FA5ED600DEE894 /* ImagePaintSample.swift */, 353 | 2B66DEA722FA5EE400DEE894 /* LinearGradientSample.swift */, 354 | 2B66DEA922FA5EEF00DEE894 /* AngularGradientSample.swift */, 355 | 2B66DEAB22FA5EFA00DEE894 /* RadialGradientSample.swift */, 356 | 2B66DEB122FA5F7E00DEE894 /* GeometryReaderSample.swift */, 357 | ); 358 | path = Sample; 359 | sourceTree = ""; 360 | }; 361 | 2BE6429922FA64EF002B4E09 /* Sample */ = { 362 | isa = PBXGroup; 363 | children = ( 364 | 2B66DEB322FA60C900DEE894 /* TextSample.swift */, 365 | 2BE6426022FA613E002B4E09 /* TextFieldSample.swift */, 366 | 2BE6426222FA6157002B4E09 /* SecureFieldSample.swift */, 367 | 2BE6426422FA6164002B4E09 /* FontSample.swift */, 368 | 2BE6426622FA6170002B4E09 /* ImageSample.swift */, 369 | 2BE6426822FA6182002B4E09 /* ButtonSample.swift */, 370 | 2BE6426A22FA618C002B4E09 /* NavigationLinkSample.swift */, 371 | 2BE6426C22FA6194002B4E09 /* EditButtonSample.swift */, 372 | 2BE6426E22FA61A3002B4E09 /* ToggleSample.swift */, 373 | 2BE6427022FA61B1002B4E09 /* PickerSample.swift */, 374 | 2BE6427222FA61BB002B4E09 /* DatePickerSample.swift */, 375 | 2BE6427422FA61C5002B4E09 /* SliderSample.swift */, 376 | 2BE6427622FA61D0002B4E09 /* StepperSample.swift */, 377 | 2BE6427822FA61DF002B4E09 /* SegmentedPickerSample.swift */, 378 | 2BE6427A22FA61ED002B4E09 /* ViewBuilderSample.swift */, 379 | 2BE6427C22FA61FA002B4E09 /* ViewModifierSample.swift */, 380 | ); 381 | path = Sample; 382 | sourceTree = ""; 383 | }; 384 | 2BE6429A22FA6504002B4E09 /* Sample */ = { 385 | isa = PBXGroup; 386 | children = ( 387 | 2B067BA122F98B46004A8051 /* HStack.swift */, 388 | 2B067BA322F98BD5004A8051 /* VStack.swift */, 389 | 2B067BA522F98C08004A8051 /* ZStack.swift */, 390 | 2B067BA722F98C30004A8051 /* List.swift */, 391 | 2B067BA922F98C56004A8051 /* ScrollView.swift */, 392 | 2B067BAB22F98D1C004A8051 /* Form.swift */, 393 | 2B067BAD22F98D63004A8051 /* Group.swift */, 394 | 2BE6429422FA62D8002B4E09 /* AlertSample.swift */, 395 | 2BE6429622FA62E5002B4E09 /* ActionSheetSample.swift */, 396 | 2BE6427E22FA621A002B4E09 /* SpacerSample.swift */, 397 | 2BE6428022FA6231002B4E09 /* DividerSample.swift */, 398 | 2BE6428222FA623A002B4E09 /* NavigationViewSample.swift */, 399 | 2BE6428422FA624B002B4E09 /* NavigationViewContentSample.swift */, 400 | 2BE6428622FA6255002B4E09 /* TabViewPresentationSample.swift */, 401 | 2BE6428822FA6263002B4E09 /* TabViewSample.swift */, 402 | 2BE6428A22FA6271002B4E09 /* EmptyViewSample.swift */, 403 | 2BE6428C22FA627B002B4E09 /* AnyViewSample.swift */, 404 | 2BE6428E22FA6291002B4E09 /* TupleViewSample.swift */, 405 | 2BE6429022FA629F002B4E09 /* EquatableViewSample.swift */, 406 | ); 407 | path = Sample; 408 | sourceTree = ""; 409 | }; 410 | /* End PBXGroup section */ 411 | 412 | /* Begin PBXNativeTarget section */ 413 | 2B22A61122F6988B00128814 /* SwiftUICatalog */ = { 414 | isa = PBXNativeTarget; 415 | buildConfigurationList = 2B22A63C22F6988F00128814 /* Build configuration list for PBXNativeTarget "SwiftUICatalog" */; 416 | buildPhases = ( 417 | 2B22A60E22F6988B00128814 /* Sources */, 418 | 2B22A60F22F6988B00128814 /* Frameworks */, 419 | 2B22A61022F6988B00128814 /* Resources */, 420 | ); 421 | buildRules = ( 422 | ); 423 | dependencies = ( 424 | ); 425 | name = SwiftUICatalog; 426 | productName = SwiftUICatalog; 427 | productReference = 2B22A61222F6988B00128814 /* SwiftUICatalog.app */; 428 | productType = "com.apple.product-type.application"; 429 | }; 430 | 2B22A62722F6988E00128814 /* SwiftUICatalogTests */ = { 431 | isa = PBXNativeTarget; 432 | buildConfigurationList = 2B22A63F22F6988F00128814 /* Build configuration list for PBXNativeTarget "SwiftUICatalogTests" */; 433 | buildPhases = ( 434 | 2B22A62422F6988E00128814 /* Sources */, 435 | 2B22A62522F6988E00128814 /* Frameworks */, 436 | 2B22A62622F6988E00128814 /* Resources */, 437 | ); 438 | buildRules = ( 439 | ); 440 | dependencies = ( 441 | 2B22A62A22F6988E00128814 /* PBXTargetDependency */, 442 | ); 443 | name = SwiftUICatalogTests; 444 | productName = SwiftUICatalogTests; 445 | productReference = 2B22A62822F6988E00128814 /* SwiftUICatalogTests.xctest */; 446 | productType = "com.apple.product-type.bundle.unit-test"; 447 | }; 448 | 2B22A63222F6988F00128814 /* SwiftUICatalogUITests */ = { 449 | isa = PBXNativeTarget; 450 | buildConfigurationList = 2B22A64222F6988F00128814 /* Build configuration list for PBXNativeTarget "SwiftUICatalogUITests" */; 451 | buildPhases = ( 452 | 2B22A62F22F6988F00128814 /* Sources */, 453 | 2B22A63022F6988F00128814 /* Frameworks */, 454 | 2B22A63122F6988F00128814 /* Resources */, 455 | ); 456 | buildRules = ( 457 | ); 458 | dependencies = ( 459 | 2B22A63522F6988F00128814 /* PBXTargetDependency */, 460 | ); 461 | name = SwiftUICatalogUITests; 462 | productName = SwiftUICatalogUITests; 463 | productReference = 2B22A63322F6988F00128814 /* SwiftUICatalogUITests.xctest */; 464 | productType = "com.apple.product-type.bundle.ui-testing"; 465 | }; 466 | /* End PBXNativeTarget section */ 467 | 468 | /* Begin PBXProject section */ 469 | 2B22A60A22F6988B00128814 /* Project object */ = { 470 | isa = PBXProject; 471 | attributes = { 472 | LastSwiftUpdateCheck = 1100; 473 | LastUpgradeCheck = 1100; 474 | ORGANIZATIONNAME = "Kazuhiro Hayashi"; 475 | TargetAttributes = { 476 | 2B22A61122F6988B00128814 = { 477 | CreatedOnToolsVersion = 11.0; 478 | }; 479 | 2B22A62722F6988E00128814 = { 480 | CreatedOnToolsVersion = 11.0; 481 | TestTargetID = 2B22A61122F6988B00128814; 482 | }; 483 | 2B22A63222F6988F00128814 = { 484 | CreatedOnToolsVersion = 11.0; 485 | TestTargetID = 2B22A61122F6988B00128814; 486 | }; 487 | }; 488 | }; 489 | buildConfigurationList = 2B22A60D22F6988B00128814 /* Build configuration list for PBXProject "SwiftUICatalog" */; 490 | compatibilityVersion = "Xcode 9.3"; 491 | developmentRegion = en; 492 | hasScannedForEncodings = 0; 493 | knownRegions = ( 494 | en, 495 | Base, 496 | ); 497 | mainGroup = 2B22A60922F6988B00128814; 498 | productRefGroup = 2B22A61322F6988B00128814 /* Products */; 499 | projectDirPath = ""; 500 | projectRoot = ""; 501 | targets = ( 502 | 2B22A61122F6988B00128814 /* SwiftUICatalog */, 503 | 2B22A62722F6988E00128814 /* SwiftUICatalogTests */, 504 | 2B22A63222F6988F00128814 /* SwiftUICatalogUITests */, 505 | ); 506 | }; 507 | /* End PBXProject section */ 508 | 509 | /* Begin PBXResourcesBuildPhase section */ 510 | 2B22A61022F6988B00128814 /* Resources */ = { 511 | isa = PBXResourcesBuildPhase; 512 | buildActionMask = 2147483647; 513 | files = ( 514 | 2B22A62222F6988E00128814 /* LaunchScreen.storyboard in Resources */, 515 | 2B22A61F22F6988E00128814 /* Preview Assets.xcassets in Resources */, 516 | 2B22A61C22F6988E00128814 /* Assets.xcassets in Resources */, 517 | ); 518 | runOnlyForDeploymentPostprocessing = 0; 519 | }; 520 | 2B22A62622F6988E00128814 /* Resources */ = { 521 | isa = PBXResourcesBuildPhase; 522 | buildActionMask = 2147483647; 523 | files = ( 524 | ); 525 | runOnlyForDeploymentPostprocessing = 0; 526 | }; 527 | 2B22A63122F6988F00128814 /* Resources */ = { 528 | isa = PBXResourcesBuildPhase; 529 | buildActionMask = 2147483647; 530 | files = ( 531 | ); 532 | runOnlyForDeploymentPostprocessing = 0; 533 | }; 534 | /* End PBXResourcesBuildPhase section */ 535 | 536 | /* Begin PBXSourcesBuildPhase section */ 537 | 2B22A60E22F6988B00128814 /* Sources */ = { 538 | isa = PBXSourcesBuildPhase; 539 | buildActionMask = 2147483647; 540 | files = ( 541 | 2B66DEA822FA5EE400DEE894 /* LinearGradientSample.swift in Sources */, 542 | 2B067BAE22F98D63004A8051 /* Group.swift in Sources */, 543 | 2BE6429522FA62D8002B4E09 /* AlertSample.swift in Sources */, 544 | 2BE6429722FA62E5002B4E09 /* ActionSheetSample.swift in Sources */, 545 | 2B66DEA222FA5E7F00DEE894 /* TransformedShapeSample.swift in Sources */, 546 | 2BE6427D22FA61FA002B4E09 /* ViewModifierSample.swift in Sources */, 547 | 2B66DE8C22FA5C8400DEE894 /* AnimatablePairSample.swift in Sources */, 548 | 2BE6427B22FA61ED002B4E09 /* ViewBuilderSample.swift in Sources */, 549 | 2BE6429122FA629F002B4E09 /* EquatableViewSample.swift in Sources */, 550 | 2BE6428122FA6231002B4E09 /* DividerSample.swift in Sources */, 551 | 2BCE76CB22FD6712007ED1A3 /* MagnificationGestureSample.swift in Sources */, 552 | 2BE6428522FA624B002B4E09 /* NavigationViewContentSample.swift in Sources */, 553 | 2BE6426122FA613E002B4E09 /* TextFieldSample.swift in Sources */, 554 | 2B66DEAC22FA5EFA00DEE894 /* RadialGradientSample.swift in Sources */, 555 | 2BCE76C922FD6707007ED1A3 /* DragGestureSample.swift in Sources */, 556 | 2B66DE8822FA5C5700DEE894 /* AnimatableSample.swift in Sources */, 557 | 2BE6428D22FA627B002B4E09 /* AnyViewSample.swift in Sources */, 558 | 2BCE76DD22FD678B007ED1A3 /* GestureMaskSample.swift in Sources */, 559 | 2BE6427F22FA621A002B4E09 /* SpacerSample.swift in Sources */, 560 | 2BCE76D322FD6738007ED1A3 /* ExclusiveGestureSample.swift in Sources */, 561 | 2BE6427322FA61BB002B4E09 /* DatePickerSample.swift in Sources */, 562 | 2B66DE9622FA5D2D00DEE894 /* EllipseSample.swift in Sources */, 563 | 2B4F675222FA5BD200EF5403 /* AnimationSample.swift in Sources */, 564 | 2B66DE8A22FA5C6900DEE894 /* WithAnimationSample.swift in Sources */, 565 | 2B22A61622F6988B00128814 /* AppDelegate.swift in Sources */, 566 | 2B66DEB222FA5F7E00DEE894 /* GeometryReaderSample.swift in Sources */, 567 | 2B067BB122F98E30004A8051 /* ViewAndControls.swift in Sources */, 568 | 2BCE76C522FD66E7007ED1A3 /* TapGestureSample.swift in Sources */, 569 | 2B067BA822F98C31004A8051 /* List.swift in Sources */, 570 | 2B22A61822F6988B00128814 /* SceneDelegate.swift in Sources */, 571 | 2BE6428322FA623A002B4E09 /* NavigationViewSample.swift in Sources */, 572 | 2BE6426522FA6164002B4E09 /* FontSample.swift in Sources */, 573 | 2B66DE9422FA5D1B00DEE894 /* CircleSample.swift in Sources */, 574 | 2BE6427922FA61DF002B4E09 /* SegmentedPickerSample.swift in Sources */, 575 | 2BE6428922FA6263002B4E09 /* TabViewSample.swift in Sources */, 576 | 2B69101222F9B3F300149C5F /* DrawingAndAnimation.swift in Sources */, 577 | 2B66DEA022FA5E5500DEE894 /* OffsetShapeSample.swift in Sources */, 578 | 2B66DE9022FA5CD000DEE894 /* EdgeSample.swift in Sources */, 579 | 2BE6426322FA6157002B4E09 /* SecureFieldSample.swift in Sources */, 580 | 2B067BA622F98C08004A8051 /* ZStack.swift in Sources */, 581 | 2BCE76D122FD672F007ED1A3 /* SimultaneousGestureSample.swift in Sources */, 582 | 2B66DE9222FA5CE700DEE894 /* RoundedRectangleSample.swift in Sources */, 583 | 2BCE76CD22FD671B007ED1A3 /* RotationGestureSample.swift in Sources */, 584 | 2B69101522F9B6C600149C5F /* Gesture.swift in Sources */, 585 | 2B067BA222F98B46004A8051 /* HStack.swift in Sources */, 586 | 2B66DEB422FA60C900DEE894 /* TextSample.swift in Sources */, 587 | 2B067BA022F98B12004A8051 /* ViewLayoutAndPresentationList.swift in Sources */, 588 | 2BE6426922FA6182002B4E09 /* ButtonSample.swift in Sources */, 589 | 2BE6427122FA61B1002B4E09 /* PickerSample.swift in Sources */, 590 | 2BE6428F22FA6291002B4E09 /* TupleViewSample.swift in Sources */, 591 | 2B66DE9A22FA5D5600DEE894 /* PathSample.swift in Sources */, 592 | 2B22A61A22F6988B00128814 /* ContentView.swift in Sources */, 593 | 2BE6426D22FA6194002B4E09 /* EditButtonSample.swift in Sources */, 594 | 2B66DE8E22FA5CBC00DEE894 /* RectangleSample.swift in Sources */, 595 | 2B66DEA422FA5EBF00DEE894 /* ColorSample.swift in Sources */, 596 | 2BCE76CF22FD6725007ED1A3 /* SequenceGestureSample.swift in Sources */, 597 | 2BE6427722FA61D0002B4E09 /* StepperSample.swift in Sources */, 598 | 2BE6426F22FA61A3002B4E09 /* ToggleSample.swift in Sources */, 599 | 2B66DE9C22FA5DBA00DEE894 /* ScaledShapeSample.swift in Sources */, 600 | 2BE6428B22FA6271002B4E09 /* EmptyViewSample.swift in Sources */, 601 | 2B067BAC22F98D1C004A8051 /* Form.swift in Sources */, 602 | 2BE6427522FA61C5002B4E09 /* SliderSample.swift in Sources */, 603 | 2BE6426722FA6170002B4E09 /* ImageSample.swift in Sources */, 604 | 2B66DE9822FA5D4200DEE894 /* CapsuleSample.swift in Sources */, 605 | 2B66DEA622FA5ED600DEE894 /* ImagePaintSample.swift in Sources */, 606 | 2BE6428722FA6255002B4E09 /* TabViewPresentationSample.swift in Sources */, 607 | 2B66DEAA22FA5EEF00DEE894 /* AngularGradientSample.swift in Sources */, 608 | 2B66DE9E22FA5E0800DEE894 /* RotatedShapeSample.swift in Sources */, 609 | 2BE6426B22FA618C002B4E09 /* NavigationLinkSample.swift in Sources */, 610 | 2B067BA422F98BD5004A8051 /* VStack.swift in Sources */, 611 | 2BCE76C722FD66F4007ED1A3 /* LongPressGestureSample.swift in Sources */, 612 | 2B067BAA22F98C56004A8051 /* ScrollView.swift in Sources */, 613 | ); 614 | runOnlyForDeploymentPostprocessing = 0; 615 | }; 616 | 2B22A62422F6988E00128814 /* Sources */ = { 617 | isa = PBXSourcesBuildPhase; 618 | buildActionMask = 2147483647; 619 | files = ( 620 | 2B22A62D22F6988E00128814 /* SwiftUICatalogTests.swift in Sources */, 621 | ); 622 | runOnlyForDeploymentPostprocessing = 0; 623 | }; 624 | 2B22A62F22F6988F00128814 /* Sources */ = { 625 | isa = PBXSourcesBuildPhase; 626 | buildActionMask = 2147483647; 627 | files = ( 628 | 2B22A63822F6988F00128814 /* SwiftUICatalogUITests.swift in Sources */, 629 | ); 630 | runOnlyForDeploymentPostprocessing = 0; 631 | }; 632 | /* End PBXSourcesBuildPhase section */ 633 | 634 | /* Begin PBXTargetDependency section */ 635 | 2B22A62A22F6988E00128814 /* PBXTargetDependency */ = { 636 | isa = PBXTargetDependency; 637 | target = 2B22A61122F6988B00128814 /* SwiftUICatalog */; 638 | targetProxy = 2B22A62922F6988E00128814 /* PBXContainerItemProxy */; 639 | }; 640 | 2B22A63522F6988F00128814 /* PBXTargetDependency */ = { 641 | isa = PBXTargetDependency; 642 | target = 2B22A61122F6988B00128814 /* SwiftUICatalog */; 643 | targetProxy = 2B22A63422F6988F00128814 /* PBXContainerItemProxy */; 644 | }; 645 | /* End PBXTargetDependency section */ 646 | 647 | /* Begin PBXVariantGroup section */ 648 | 2B22A62022F6988E00128814 /* LaunchScreen.storyboard */ = { 649 | isa = PBXVariantGroup; 650 | children = ( 651 | 2B22A62122F6988E00128814 /* Base */, 652 | ); 653 | name = LaunchScreen.storyboard; 654 | sourceTree = ""; 655 | }; 656 | /* End PBXVariantGroup section */ 657 | 658 | /* Begin XCBuildConfiguration section */ 659 | 2B22A63A22F6988F00128814 /* Debug */ = { 660 | isa = XCBuildConfiguration; 661 | buildSettings = { 662 | ALWAYS_SEARCH_USER_PATHS = NO; 663 | CLANG_ANALYZER_NONNULL = YES; 664 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 665 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 666 | CLANG_CXX_LIBRARY = "libc++"; 667 | CLANG_ENABLE_MODULES = YES; 668 | CLANG_ENABLE_OBJC_ARC = YES; 669 | CLANG_ENABLE_OBJC_WEAK = YES; 670 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 671 | CLANG_WARN_BOOL_CONVERSION = YES; 672 | CLANG_WARN_COMMA = YES; 673 | CLANG_WARN_CONSTANT_CONVERSION = YES; 674 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 675 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 676 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 677 | CLANG_WARN_EMPTY_BODY = YES; 678 | CLANG_WARN_ENUM_CONVERSION = YES; 679 | CLANG_WARN_INFINITE_RECURSION = YES; 680 | CLANG_WARN_INT_CONVERSION = YES; 681 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 682 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 683 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 684 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 685 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 686 | CLANG_WARN_STRICT_PROTOTYPES = YES; 687 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 688 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 689 | CLANG_WARN_UNREACHABLE_CODE = YES; 690 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 691 | COPY_PHASE_STRIP = NO; 692 | DEBUG_INFORMATION_FORMAT = dwarf; 693 | ENABLE_STRICT_OBJC_MSGSEND = YES; 694 | ENABLE_TESTABILITY = YES; 695 | GCC_C_LANGUAGE_STANDARD = gnu11; 696 | GCC_DYNAMIC_NO_PIC = NO; 697 | GCC_NO_COMMON_BLOCKS = YES; 698 | GCC_OPTIMIZATION_LEVEL = 0; 699 | GCC_PREPROCESSOR_DEFINITIONS = ( 700 | "DEBUG=1", 701 | "$(inherited)", 702 | ); 703 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 704 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 705 | GCC_WARN_UNDECLARED_SELECTOR = YES; 706 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 707 | GCC_WARN_UNUSED_FUNCTION = YES; 708 | GCC_WARN_UNUSED_VARIABLE = YES; 709 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 710 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 711 | MTL_FAST_MATH = YES; 712 | ONLY_ACTIVE_ARCH = YES; 713 | SDKROOT = iphoneos; 714 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 715 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 716 | }; 717 | name = Debug; 718 | }; 719 | 2B22A63B22F6988F00128814 /* Release */ = { 720 | isa = XCBuildConfiguration; 721 | buildSettings = { 722 | ALWAYS_SEARCH_USER_PATHS = NO; 723 | CLANG_ANALYZER_NONNULL = YES; 724 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 725 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 726 | CLANG_CXX_LIBRARY = "libc++"; 727 | CLANG_ENABLE_MODULES = YES; 728 | CLANG_ENABLE_OBJC_ARC = YES; 729 | CLANG_ENABLE_OBJC_WEAK = YES; 730 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 731 | CLANG_WARN_BOOL_CONVERSION = YES; 732 | CLANG_WARN_COMMA = YES; 733 | CLANG_WARN_CONSTANT_CONVERSION = YES; 734 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 735 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 736 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 737 | CLANG_WARN_EMPTY_BODY = YES; 738 | CLANG_WARN_ENUM_CONVERSION = YES; 739 | CLANG_WARN_INFINITE_RECURSION = YES; 740 | CLANG_WARN_INT_CONVERSION = YES; 741 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 742 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 743 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 744 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 745 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 746 | CLANG_WARN_STRICT_PROTOTYPES = YES; 747 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 748 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 749 | CLANG_WARN_UNREACHABLE_CODE = YES; 750 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 751 | COPY_PHASE_STRIP = NO; 752 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 753 | ENABLE_NS_ASSERTIONS = NO; 754 | ENABLE_STRICT_OBJC_MSGSEND = YES; 755 | GCC_C_LANGUAGE_STANDARD = gnu11; 756 | GCC_NO_COMMON_BLOCKS = YES; 757 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 758 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 759 | GCC_WARN_UNDECLARED_SELECTOR = YES; 760 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 761 | GCC_WARN_UNUSED_FUNCTION = YES; 762 | GCC_WARN_UNUSED_VARIABLE = YES; 763 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 764 | MTL_ENABLE_DEBUG_INFO = NO; 765 | MTL_FAST_MATH = YES; 766 | SDKROOT = iphoneos; 767 | SWIFT_COMPILATION_MODE = wholemodule; 768 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 769 | VALIDATE_PRODUCT = YES; 770 | }; 771 | name = Release; 772 | }; 773 | 2B22A63D22F6988F00128814 /* Debug */ = { 774 | isa = XCBuildConfiguration; 775 | buildSettings = { 776 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 777 | CODE_SIGN_STYLE = Automatic; 778 | DEVELOPMENT_ASSET_PATHS = "SwiftUICatalog/Preview\\ Content"; 779 | DEVELOPMENT_TEAM = R33Y42SDDR; 780 | ENABLE_PREVIEWS = YES; 781 | INFOPLIST_FILE = SwiftUICatalog/Info.plist; 782 | LD_RUNPATH_SEARCH_PATHS = ( 783 | "$(inherited)", 784 | "@executable_path/Frameworks", 785 | ); 786 | PRODUCT_BUNDLE_IDENTIFIER = kazuhiro.hayashi.SwiftUICatalog; 787 | PRODUCT_NAME = "$(TARGET_NAME)"; 788 | SWIFT_VERSION = 5.0; 789 | TARGETED_DEVICE_FAMILY = "1,2"; 790 | }; 791 | name = Debug; 792 | }; 793 | 2B22A63E22F6988F00128814 /* Release */ = { 794 | isa = XCBuildConfiguration; 795 | buildSettings = { 796 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 797 | CODE_SIGN_STYLE = Automatic; 798 | DEVELOPMENT_ASSET_PATHS = "SwiftUICatalog/Preview\\ Content"; 799 | DEVELOPMENT_TEAM = R33Y42SDDR; 800 | ENABLE_PREVIEWS = YES; 801 | INFOPLIST_FILE = SwiftUICatalog/Info.plist; 802 | LD_RUNPATH_SEARCH_PATHS = ( 803 | "$(inherited)", 804 | "@executable_path/Frameworks", 805 | ); 806 | PRODUCT_BUNDLE_IDENTIFIER = kazuhiro.hayashi.SwiftUICatalog; 807 | PRODUCT_NAME = "$(TARGET_NAME)"; 808 | SWIFT_VERSION = 5.0; 809 | TARGETED_DEVICE_FAMILY = "1,2"; 810 | }; 811 | name = Release; 812 | }; 813 | 2B22A64022F6988F00128814 /* Debug */ = { 814 | isa = XCBuildConfiguration; 815 | buildSettings = { 816 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 817 | BUNDLE_LOADER = "$(TEST_HOST)"; 818 | CODE_SIGN_STYLE = Automatic; 819 | DEVELOPMENT_TEAM = R33Y42SDDR; 820 | INFOPLIST_FILE = SwiftUICatalogTests/Info.plist; 821 | LD_RUNPATH_SEARCH_PATHS = ( 822 | "$(inherited)", 823 | "@executable_path/Frameworks", 824 | "@loader_path/Frameworks", 825 | ); 826 | PRODUCT_BUNDLE_IDENTIFIER = kazuhiro.hayashi.SwiftUICatalogTests; 827 | PRODUCT_NAME = "$(TARGET_NAME)"; 828 | SWIFT_VERSION = 5.0; 829 | TARGETED_DEVICE_FAMILY = "1,2"; 830 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUICatalog.app/SwiftUICatalog"; 831 | }; 832 | name = Debug; 833 | }; 834 | 2B22A64122F6988F00128814 /* Release */ = { 835 | isa = XCBuildConfiguration; 836 | buildSettings = { 837 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 838 | BUNDLE_LOADER = "$(TEST_HOST)"; 839 | CODE_SIGN_STYLE = Automatic; 840 | DEVELOPMENT_TEAM = R33Y42SDDR; 841 | INFOPLIST_FILE = SwiftUICatalogTests/Info.plist; 842 | LD_RUNPATH_SEARCH_PATHS = ( 843 | "$(inherited)", 844 | "@executable_path/Frameworks", 845 | "@loader_path/Frameworks", 846 | ); 847 | PRODUCT_BUNDLE_IDENTIFIER = kazuhiro.hayashi.SwiftUICatalogTests; 848 | PRODUCT_NAME = "$(TARGET_NAME)"; 849 | SWIFT_VERSION = 5.0; 850 | TARGETED_DEVICE_FAMILY = "1,2"; 851 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUICatalog.app/SwiftUICatalog"; 852 | }; 853 | name = Release; 854 | }; 855 | 2B22A64322F6988F00128814 /* Debug */ = { 856 | isa = XCBuildConfiguration; 857 | buildSettings = { 858 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 859 | CODE_SIGN_STYLE = Automatic; 860 | DEVELOPMENT_TEAM = R33Y42SDDR; 861 | INFOPLIST_FILE = SwiftUICatalogUITests/Info.plist; 862 | LD_RUNPATH_SEARCH_PATHS = ( 863 | "$(inherited)", 864 | "@executable_path/Frameworks", 865 | "@loader_path/Frameworks", 866 | ); 867 | PRODUCT_BUNDLE_IDENTIFIER = kazuhiro.hayashi.SwiftUICatalogUITests; 868 | PRODUCT_NAME = "$(TARGET_NAME)"; 869 | SWIFT_VERSION = 5.0; 870 | TARGETED_DEVICE_FAMILY = "1,2"; 871 | TEST_TARGET_NAME = SwiftUICatalog; 872 | }; 873 | name = Debug; 874 | }; 875 | 2B22A64422F6988F00128814 /* Release */ = { 876 | isa = XCBuildConfiguration; 877 | buildSettings = { 878 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 879 | CODE_SIGN_STYLE = Automatic; 880 | DEVELOPMENT_TEAM = R33Y42SDDR; 881 | INFOPLIST_FILE = SwiftUICatalogUITests/Info.plist; 882 | LD_RUNPATH_SEARCH_PATHS = ( 883 | "$(inherited)", 884 | "@executable_path/Frameworks", 885 | "@loader_path/Frameworks", 886 | ); 887 | PRODUCT_BUNDLE_IDENTIFIER = kazuhiro.hayashi.SwiftUICatalogUITests; 888 | PRODUCT_NAME = "$(TARGET_NAME)"; 889 | SWIFT_VERSION = 5.0; 890 | TARGETED_DEVICE_FAMILY = "1,2"; 891 | TEST_TARGET_NAME = SwiftUICatalog; 892 | }; 893 | name = Release; 894 | }; 895 | /* End XCBuildConfiguration section */ 896 | 897 | /* Begin XCConfigurationList section */ 898 | 2B22A60D22F6988B00128814 /* Build configuration list for PBXProject "SwiftUICatalog" */ = { 899 | isa = XCConfigurationList; 900 | buildConfigurations = ( 901 | 2B22A63A22F6988F00128814 /* Debug */, 902 | 2B22A63B22F6988F00128814 /* Release */, 903 | ); 904 | defaultConfigurationIsVisible = 0; 905 | defaultConfigurationName = Release; 906 | }; 907 | 2B22A63C22F6988F00128814 /* Build configuration list for PBXNativeTarget "SwiftUICatalog" */ = { 908 | isa = XCConfigurationList; 909 | buildConfigurations = ( 910 | 2B22A63D22F6988F00128814 /* Debug */, 911 | 2B22A63E22F6988F00128814 /* Release */, 912 | ); 913 | defaultConfigurationIsVisible = 0; 914 | defaultConfigurationName = Release; 915 | }; 916 | 2B22A63F22F6988F00128814 /* Build configuration list for PBXNativeTarget "SwiftUICatalogTests" */ = { 917 | isa = XCConfigurationList; 918 | buildConfigurations = ( 919 | 2B22A64022F6988F00128814 /* Debug */, 920 | 2B22A64122F6988F00128814 /* Release */, 921 | ); 922 | defaultConfigurationIsVisible = 0; 923 | defaultConfigurationName = Release; 924 | }; 925 | 2B22A64222F6988F00128814 /* Build configuration list for PBXNativeTarget "SwiftUICatalogUITests" */ = { 926 | isa = XCConfigurationList; 927 | buildConfigurations = ( 928 | 2B22A64322F6988F00128814 /* Debug */, 929 | 2B22A64422F6988F00128814 /* Release */, 930 | ); 931 | defaultConfigurationIsVisible = 0; 932 | defaultConfigurationName = Release; 933 | }; 934 | /* End XCConfigurationList section */ 935 | }; 936 | rootObject = 2B22A60A22F6988B00128814 /* Project object */; 937 | } 938 | --------------------------------------------------------------------------------