Repository: artemnovichkov/SwiftUI-by-Examples Branch: master Commit: 50c67d1ae0d3 Files: 43 Total size: 66.9 KB Directory structure: gitextract__fk81ret/ ├── .gitignore ├── Configuration/ │ └── SampleCode.xcconfig ├── LICENSE ├── README.md └── SwiftUI by Examples/ ├── SwiftUI by Examples/ │ ├── AlertView.swift │ ├── AnimationView.swift │ ├── AppDelegate.swift │ ├── Assets.xcassets/ │ │ ├── AppIcon.appiconset/ │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── thumbnails/ │ │ ├── 2612_wide_250x141_2x.imageset/ │ │ │ └── Contents.json │ │ ├── 2640_wide_250x141_2x.imageset/ │ │ │ └── Contents.json │ │ ├── 2645_wide_250x141_2x.imageset/ │ │ │ └── Contents.json │ │ ├── 2649_wide_250x141_2x.imageset/ │ │ │ └── Contents.json │ │ ├── 2672_wide_250x141_2x.imageset/ │ │ │ └── Contents.json │ │ ├── 2676_wide_250x141_2x.imageset/ │ │ │ └── Contents.json │ │ ├── 2682_wide_250x141_2x.imageset/ │ │ │ └── Contents.json │ │ ├── 2684_wide_250x141_2x.imageset/ │ │ │ └── Contents.json │ │ ├── 2949_wide_250x141_2x.imageset/ │ │ │ └── Contents.json │ │ └── Contents.json │ ├── BadgeView.swift │ ├── Base.lproj/ │ │ └── LaunchScreen.storyboard │ ├── ButtonsView.swift │ ├── DatePickerView.swift │ ├── ExampleCell.swift │ ├── ExampleListView.swift │ ├── GestureView.swift │ ├── HexagonParameters.swift │ ├── Info.plist │ ├── Preview Content/ │ │ └── Preview Assets.xcassets/ │ │ └── Contents.json │ ├── SceneDelegate.swift │ ├── SegmentedControlView.swift │ ├── SliderView.swift │ ├── StepperView.swift │ ├── TextFieldView.swift │ ├── TextView.swift │ ├── ToggleView.swift │ ├── Video.swift │ ├── VideoCell.swift │ ├── VideoDetailsView.swift │ └── VideoListView.swift └── SwiftUI by Examples.xcodeproj/ ├── project.pbxproj └── project.xcworkspace/ ├── contents.xcworkspacedata └── xcshareddata/ └── IDEWorkspaceChecks.plist ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore ## Build generated build/ DerivedData/ ## Various settings *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata/ ## Other *.moved-aside *.xccheckout *.xcscmblueprint ## Obj-C/Swift specific *.hmap *.ipa *.dSYM.zip *.dSYM ## Playgrounds timeline.xctimeline playground.xcworkspace # Swift Package Manager # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. # Packages/ # Package.pins # Package.resolved .build/ # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # # Pods/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. # Carthage/Checkouts Carthage/Build # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://docs.fastlane.tools/best-practices/source-control/#source-control fastlane/report.xml fastlane/Preview.html fastlane/screenshots/**/*.png fastlane/test_output ================================================ FILE: Configuration/SampleCode.xcconfig ================================================ // // See LICENSE folder for this sample’s licensing information. // // SampleCode.xcconfig // // The `SAMPLE_CODE_DISAMBIGUATOR` configuration is to make it easier to build // and run a sample code project. Once you set your project's development team, // you'll have a unique bundle identifier. This is because the bundle identifier // is derived based on the 'SAMPLE_CODE_DISAMBIGUATOR' value. Do not use this // approach in your own projects—it's only useful for sample code projects because // they are frequently downloaded and don't have a development team set. SAMPLE_CODE_DISAMBIGUATOR=${DEVELOPMENT_TEAM} ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2019 Artem Novichkov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # SwiftUI by Examples

SwiftUI

Xcode 11 Swift 5.1

SwiftUI is a simple way to build user interfaces across all Apple platforms with the power of Swift. I'm going to fill the repo with useful examples of SwiftUI. Stay tuned!

SwiftUI SwiftUI SwiftUI

## Features - Texts - Text fields - Buttons - Toggle - DatePicker - Slider - Stepper - Segmented Control - Alert - Action sheet - Gestures - Animations - Editable list - Drawing shapes ## Author Artem Novichkov, novichkoff93@gmail.com ## License SwiftUI by Examples is available under the MIT license. See the LICENSE file for more info. ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/AlertView.swift ================================================ // // AlertView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 10/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct AlertView: View { @State var showAlert = false @State var showSheet = false private var alert: Alert { Alert(title: "Title", message: "Message", primaryButton: .destructive(Text("Cancel")), secondaryButton: .default(Text("Done"))) } private var sheet: ActionSheet { ActionSheet(title: "Title", message: "Message", buttons: [.default(Text("Option 1"), onTrigger: { self.showSheet = false }), .default(Text("Option 2")), .cancel()]) } var body: some View { VStack { Button(action: { self.showAlert = true }) { Text("Show alert") } .presentation($showAlert) { alert } Button(action: { self.showSheet = true }) { Text("Show action sheet") } .presentation(showSheet ? sheet : nil) } } } extension ActionSheet { init(title: String, message: String, buttons: [ActionSheet.Button] = [.cancel()]) { self.init(title: Text(title), message: Text(message), buttons: buttons) } } extension Alert { init(title: String, message: String, primaryButton: Alert.Button, secondaryButton: Alert.Button) { self.init(title: Text(title), message: Text(message), primaryButton: primaryButton, secondaryButton: secondaryButton) } } #if DEBUG struct AlertView_Previews: PreviewProvider { static var previews: some View { AlertView() } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/AnimationView.swift ================================================ // // AnimationView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 10/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct AnimationView: View { @State var angle = 0.0 @State var scale = false var body: some View { Button(action: { withAnimation(.basic(duration: 0.3, curve: .easeIn)) { self.angle += 180 self.scale.toggle() } }) { Text("Tap here") .padding() .rotationEffect(.init(degrees: angle)) .scaleEffect(scale ? 1.5 : 1) } } } #if DEBUG struct AnimationView_Previews: PreviewProvider { static var previews: some View { AnimationView() } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/AppDelegate.swift ================================================ // // AppDelegate.swift // SwiftUI by Examples // // Created by Artem Novichkov on 05/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "size" : "20x20", "idiom" : "iphone", "filename" : "Icon-App-20x20@2x.png", "scale" : "2x" }, { "size" : "20x20", "idiom" : "iphone", "filename" : "Icon-App-20x20@3x.png", "scale" : "3x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "Icon-App-29x29@1x.png", "scale" : "1x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "Icon-App-29x29@2x.png", "scale" : "2x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "Icon-App-29x29@3x.png", "scale" : "3x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "Icon-App-40x40@2x.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "Icon-App-40x40@3x.png", "scale" : "3x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "Icon-App-60x60@2x.png", "scale" : "2x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "Icon-App-60x60@3x.png", "scale" : "3x" }, { "size" : "20x20", "idiom" : "ipad", "filename" : "Icon-App-20x20@1x.png", "scale" : "1x" }, { "size" : "20x20", "idiom" : "ipad", "filename" : "Icon-App-20x20@2x.png", "scale" : "2x" }, { "size" : "29x29", "idiom" : "ipad", "filename" : "Icon-App-29x29@1x.png", "scale" : "1x" }, { "size" : "29x29", "idiom" : "ipad", "filename" : "Icon-App-29x29@2x.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "ipad", "filename" : "Icon-App-40x40@1x.png", "scale" : "1x" }, { "size" : "40x40", "idiom" : "ipad", "filename" : "Icon-App-40x40@2x.png", "scale" : "2x" }, { "size" : "76x76", "idiom" : "ipad", "filename" : "Icon-App-76x76@1x.png", "scale" : "1x" }, { "size" : "76x76", "idiom" : "ipad", "filename" : "Icon-App-76x76@2x.png", "scale" : "2x" }, { "size" : "83.5x83.5", "idiom" : "ipad", "filename" : "Icon-App-83.5x83.5@2x.png", "scale" : "2x" }, { "size" : "1024x1024", "idiom" : "ios-marketing", "filename" : "ItunesArtwork@2x.png", "scale" : "1x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2612_wide_250x141_2x.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "2612_wide_250x141_2x.jpg" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2640_wide_250x141_2x.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "2640_wide_250x141_2x.jpg" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2645_wide_250x141_2x.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "2645_wide_250x141_2x.jpg" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2649_wide_250x141_2x.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "2649_wide_250x141_2x.jpg" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2672_wide_250x141_2x.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "2672_wide_250x141_2x.jpg" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2676_wide_250x141_2x.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "2676_wide_250x141_2x.jpg" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2682_wide_250x141_2x.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "2682_wide_250x141_2x.jpg" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2684_wide_250x141_2x.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "2684_wide_250x141_2x.jpg" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2949_wide_250x141_2x.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "2949_wide_250x141_2x.jpg" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/BadgeView.swift ================================================ // // BadgeView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 08/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct BadgeView: View { private static let gradientStart = Color(red: 239.0 / 255, green: 120.0 / 255, blue: 221.0 / 255) private static let gradientEnd = Color(red: 239.0 / 255, green: 172.0 / 255, blue: 120.0 / 255) private static let gradient = LinearGradient(gradient: .init(colors: [gradientStart, gradientEnd]), startPoint: .init(x: 0.5, y: 0), endPoint: .init(x: 0.5, y: 0.6) ) var body: some View { GeometryReader { geometry in Path { path in var width: CGFloat = min(geometry.size.width, geometry.size.height) let height = width let xScale: CGFloat = 0.832 let xOffset = (width * (1.0 - xScale)) / 2.0 width *= xScale path.move(to: .init(x: xOffset + width * 0.95, y: height * (0.20 + HexagonParameters.adjustment))) HexagonParameters.points.forEach { path.addLine(to: .init(x: xOffset + width * $0.useWidth.0 * $0.xFactors.0, y: height * $0.useHeight.0 * $0.yFactors.0)) path.addQuadCurve(to: .init(x: xOffset + width * $0.useWidth.1 * $0.xFactors.1, y: height * $0.useHeight.1 * $0.yFactors.1), control: .init(x: xOffset + width * $0.useWidth.2 * $0.xFactors.2, y: height * $0.useHeight.2 * $0.yFactors.2)) } } .fill(Self.gradient) .aspectRatio(1, contentMode: .fit) } } } #if DEBUG struct BadgeView_Previews : PreviewProvider { static var previews: some View { BadgeView() } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Base.lproj/LaunchScreen.storyboard ================================================ ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/ButtonsView.swift ================================================ // // ButtonsView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 10/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct ButtonsView: View { var body: some View { VStack(spacing: 16) { Button(action: { print("tap") }, label: { Text("Tap") }) .padding() .foregroundColor(.white) .background(Color.green, cornerRadius: 12) NavigationButton(destination: TextFieldView()) { Text("Navigation") } .padding() .foregroundColor(.white) .background(Color.green, cornerRadius: 12) PresentationButton(destination: TextFieldView(), label: { Text("Presentation") }) .padding() .foregroundColor(.white) .background(Color.green, cornerRadius: 12) } } } #if DEBUG struct ButtonsView_Previews: PreviewProvider { static var previews: some View { ButtonsView() } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/DatePickerView.swift ================================================ // // PickerView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 10/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct DatePickerView: View { @State private var date = Date() private var formatter: DateFormatter = { let formatter = DateFormatter() formatter.dateStyle = .medium return formatter }() @State var string = "" var body: some View { VStack { Text("\(formatter.string(from: date))") DatePicker($date, minimumDate: Calendar.current.date(byAdding: .year, value: -1, to: date), maximumDate: Date(), displayedComponents: .date) } } } #if DEBUG struct PickerView_Previews: PreviewProvider { static var previews: some View { DatePickerView() } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/ExampleCell.swift ================================================ // // ExampleCell.swift // SwiftUI by Examples // // Created by Artem Novichkov on 09/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct ExampleCell : View { let title: String let subtitle: String var body: some View { VStack(alignment: .leading) { Text(title) Text(subtitle) .font(.subheadline) } } } #if DEBUG struct ExampleCell_Previews : PreviewProvider { static var previews: some View { ExampleCell(title: "Title", subtitle: "Subtitle") } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/ExampleListView.swift ================================================ // // ExampleListView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 09/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct ExampleListView: View { var body: some View { NavigationView { List { Section(header: Text("Controls")) { NavigationButton(destination: TextView()) { ExampleCell(title: "Texts", subtitle: "A view that displays one or more lines of read-only text.") } NavigationButton(destination: TextFieldView()) { ExampleCell(title: "Text fields", subtitle: "A control that displays an editable text interface.") } NavigationButton(destination: ButtonsView()) { ExampleCell(title: "Buttons", subtitle: "A control that performs an action when triggered.") } } Section(header: Text("Value selectors")) { NavigationButton(destination: ToggleView()) { ExampleCell(title: "Toggle", subtitle: "A control that toggles between on and off states.") } NavigationButton(destination: DatePickerView()) { ExampleCell(title: "DatePicker", subtitle: "A control for selecting an absolute date.") } NavigationButton(destination: SliderView()) { ExampleCell(title: "Slider", subtitle: "A control for selecting a value from a bounded linear range of values.") } NavigationButton(destination: StepperView()) { ExampleCell(title: "Stepper", subtitle: "A control used to perform semantic increment and decrement actions.") } NavigationButton(destination: SegmentedControlView()) { ExampleCell(title: "Segmented Control", subtitle: "A control for selecting from a set of options.") } } Section(header: Text("Others")) { NavigationButton(destination: AlertView()) { ExampleCell(title: "Alert", subtitle: "A container for an alert presentation.") } NavigationButton(destination: GestureView()) { ExampleCell(title: "Gestures", subtitle: "Use gesture modifiers to add interactivity to your app.") } NavigationButton(destination: AnimationView()) { ExampleCell(title: "Animations", subtitle: "Animate views.") } NavigationButton(destination: VideoListView().environmentObject(VideoStore())) { ExampleCell(title: "List", subtitle: "Example of editable list") } NavigationButton(destination: BadgeView()) { ExampleCell(title: "Drawing shapes", subtitle: "Using path for custom shapes") } } } .listStyle(.grouped) .navigationBarTitle(Text("SwiftUI by Examples")) } } } #if DEBUG struct ExampleListView_Previews: PreviewProvider { static var previews: some View { ExampleListView() } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/GestureView.swift ================================================ // // GestureView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 10/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct GestureView: View { @State var isDetectingTap = false @State var isDetectingDoubleTap = false @GestureState var isDetectingLongPress = false @State var numberOfTaps = 0 var body: some View { let tap = TapGesture().onEnded { self.isDetectingTap.toggle() } let press = LongPressGesture(minimumDuration: 2) .updating($isDetectingLongPress) { currentState, gestureState, _ in gestureState = currentState } .onChanged { _ in self.numberOfTaps += 1 } return VStack { Text("Tap") .font(.largeTitle) Circle() .fill(isDetectingTap ? Color.red : Color.blue) .frame(width: 100, height: 100, alignment: .center) .gesture(tap) Text("Double tap") .font(.largeTitle) Circle() .fill(isDetectingDoubleTap ? Color.red : Color.blue) .frame(width: 100, height: 100, alignment: .center) .tapAction(count: 2) { self.isDetectingDoubleTap.toggle() } Text("Long press count: \(numberOfTaps)") .font(.largeTitle) Circle() .fill(isDetectingLongPress ? Color.yellow : Color.green) .frame(width: 100, height: 100, alignment: .center) .gesture(press) } } } #if DEBUG struct GestureView_Previews: PreviewProvider { static var previews: some View { GestureView() } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/HexagonParameters.swift ================================================ // // HexagonParameters.swift // SwiftUI by Examples // // Created by Artem Novichkov on 08/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct HexagonParameters { struct Segment { let useWidth: (CGFloat, CGFloat, CGFloat) let xFactors: (CGFloat, CGFloat, CGFloat) let useHeight: (CGFloat, CGFloat, CGFloat) let yFactors: (CGFloat, CGFloat, CGFloat) } static let adjustment: CGFloat = 0.085 static let points = [ Segment( useWidth: (1.00, 1.00, 1.00), xFactors: (0.60, 0.40, 0.50), useHeight: (1.00, 1.00, 0.00), yFactors: (0.05, 0.05, 0.00) ), Segment( useWidth: (1.00, 1.00, 0.00), xFactors: (0.05, 0.00, 0.00), useHeight: (1.00, 1.00, 1.00), yFactors: (0.20 + adjustment, 0.30 + adjustment, 0.25 + adjustment) ), Segment( useWidth: (1.00, 1.00, 0.00), xFactors: (0.00, 0.05, 0.00), useHeight: (1.00, 1.00, 1.00), yFactors: (0.70 - adjustment, 0.80 - adjustment, 0.75 - adjustment) ), Segment( useWidth: (1.00, 1.00, 1.00), xFactors: (0.40, 0.60, 0.50), useHeight: (1.00, 1.00, 1.00), yFactors: (0.95, 0.95, 1.00) ), Segment( useWidth: (1.00, 1.00, 1.00), xFactors: (0.95, 1.00, 1.00), useHeight: (1.00, 1.00, 1.00), yFactors: (0.80 - adjustment, 0.70 - adjustment, 0.75 - adjustment) ), Segment( useWidth: (1.00, 1.00, 1.00), xFactors: (1.00, 0.95, 1.00), useHeight: (1.00, 1.00, 1.00), yFactors: (0.30 + adjustment, 0.20 + adjustment, 0.25 + adjustment) ) ] } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Info.plist ================================================ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName SwiftUI CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1.0 CFBundleVersion 1 LSRequiresIPhoneOS UIApplicationSceneManifest UIApplicationSupportsMultipleScenes UISceneConfigurations UIWindowSceneSessionRoleApplication UILaunchStoryboardName LaunchScreen UISceneConfigurationName Default Configuration UISceneDelegateClassName $(PRODUCT_MODULE_NAME).SceneDelegate UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/Preview Content/Preview Assets.xcassets/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/SceneDelegate.swift ================================================ // // SceneDelegate.swift // SwiftUI by Examples // // Created by Artem Novichkov on 05/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import UIKit import SwiftUI class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). // Use a UIHostingController as window root view controller let window = UIWindow(frame: UIScreen.main.bounds) window.rootViewController = UIHostingController(rootView: ExampleListView()) self.window = window window.makeKeyAndVisible() } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. // This occurs shortly after the scene enters the background, or when its session is discarded. // Release any resources associated with this scene that can be re-created the next time the scene connects. // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). } func sceneDidBecomeActive(_ scene: UIScene) { // Called when the scene has moved from an inactive state to an active state. // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene transitions from the background to the foreground. // Use this method to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene) { // Called as the scene transitions from the foreground to the background. // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/SegmentedControlView.swift ================================================ // // SegmentedControlView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 10/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct SegmentedControlView: View { @State var index = 0 var elements = ["Easy", "Normal", "Hard"] var body: some View { VStack { Text(elements[index]) SegmentedControl(selection: $index) { ForEach(0..() } struct Video: Identifiable { let id = UUID() let title: String let description: String let thumbnail: String var isFavorite: Bool = false static let all: [Video] = [.init(title: "Implementing Dark Mode on iOS", description: "Hear from the UIKit engineering team about the principles and concepts that anchor Dark Mode on iOS. Get introduced to the principles of enhancing your app with this new appearance using dynamic colors and images, and add an experience that people are sure to love.", thumbnail: "2949_wide_250x141_2x"), .init(title: "Introducing Sign In with Apple", description: "Sign In with Apple is the fast, easy way for people to sign in to apps using the Apple IDs they already have. Learn how easy it is to add a Sign In with Apple button to your app or website to acquire new customers and benefit from the built-in security, antifraud, and privacy that Sign In with Apple provides.", thumbnail: "2645_wide_250x141_2x"), .init(title: "Introducing Parameters for Shortcuts", description: "Parameters take Siri Shortcuts to the next level, enabling an interactive voice experience in Siri with follow-up questions, and allowing people to customize shortcuts in the Shortcuts app, now built into iOS. Walk through setting up your shortcuts to take advantage of parameters and learn how your shortcuts can pass output to other actions when creating multi-step shortcuts in the Shortcuts app.", thumbnail: "2649_wide_250x141_2x"), .init(title: "Introducing PencilKit", description: "Meet PencilKit, Apple's feature-rich drawing and annotation framework. With just a few lines of code, you can add a full drawing experience to your app — with access to a canvas, responsive inks, rich tool palette and drawing model. Hear the technical details that make a great Apple Pencil experience. Learn about the new screenshot editor and how you can adopt just a few small APIs to enable your full content to be captured beyond the size of the screen, with or without your app's user interface.", thumbnail: "2682_wide_250x141_2x"), .init(title: "SwiftUI Essentials", description: "Take your first deep-dive into building an app with SwiftUI. Learn about Views and how they work. From basic controls to sophisticated containers like lists and navigation stacks, SwiftUI enables the creation of great user interfaces, faster and more easily. See how basic controls like Button are both simple yet versatile. Discover how to compose these pieces into larger, full-featured user interfaces that facilitate building great apps with SwiftUI. Build your SwiftUI skills as you learn the essentials of Apple's new declarative framework.", thumbnail: "2672_wide_250x141_2x"), .init(title: "Designing for Privacy", description: "Privacy is a more important issue than ever for your users. Learn about new features and privacy engineering techniques that can help you earn customer trust, create more personal experiences, and improve user engagement.", thumbnail: "2640_wide_250x141_2x"), .init(title: "Create ML for Object Detection and Sound Classification", description: "Create ML enables you to create, evaluate, and test powerful, production-class Core ML models. See how easy it is to create your own Object Detection and Sound Classification models for use in your apps. Learn strategies for balancing your training data to achieve great model accuracy.", thumbnail: "2612_wide_250x141_2x"), .init(title: "Delivering Optimized Metal Apps and Games", description: "Optimizing performance, memory, and bandwidth are important considerations for resource-intensive Metal apps and games. Learn key best practices to streamline your rendering and attain high frame rates. Understand powerful tools that can help you pinpoint expensive or unexpected GPU work. Dive into GPU capabilities that can yield performance gains and get expert guidance about using memory efficiently.", thumbnail: "2676_wide_250x141_2x"), .init(title: "Metal for Pro Apps", description: "Metal is the platform-optimized graphics and compute framework at the heart of GPU acceleration on Apple platforms. Learn key aspects of the Metal architecture that support the techniques for modern high-performance pro applications and workflows. Learn how to leverage Metal capabilities to optimize performance and maintain a steady frame rate in video editing pipelines. Understand how to leverage CPU and GPU parallelism, and dive into best practices for efficient data throughput.", thumbnail: "2684_wide_250x141_2x")] } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/VideoCell.swift ================================================ // // ListView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 05/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI import Combine struct VideoCell: View { let video: Video var body: some View { NavigationButton(destination: VideoDetailsView(video: video)) { HStack { Image(video.thumbnail) .frame(width: 30, height: 30, alignment: .center) .cornerRadius(8) VStack(alignment: .leading) { Text(video.title) Text(video.description) .font(.subheadline) } if video.isFavorite { Image(systemName: "star.fill") .foregroundColor(.yellow) } } } } } #if DEBUG struct VideoCell_Previews: PreviewProvider { static var previews: some View { let store = VideoStore() return Group { VideoCell(video: store.videos[0]) VideoCell(video: store.videos[1]) } } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/VideoDetailsView.swift ================================================ // // DetailsView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 05/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI struct VideoDetailsView: View { @EnvironmentObject private var store: VideoStore @State private var zoomed = false var video: Video var index: Int { return store.videos.firstIndex { $0.id == video.id }! } var body: some View { VStack { Image(video.thumbnail) .resizable() .aspectRatio(contentMode: zoomed ? .fill : .fit) .tapAction { withAnimation { self.zoomed.toggle() } } .navigationBarTitle(Text(video.title), displayMode: .inline) HStack { Text("Overview") .font(.title) Button(action: { self.store.videos[self.index].isFavorite.toggle() }) { if self.store.videos[index].isFavorite { Image(systemName: "star.fill") .foregroundColor(.yellow) } else { Image(systemName: "star") .foregroundColor(.gray) } } } Text(video.description) .lineLimit(nil) .padding() } } } #if DEBUG struct DetailsView_Previews: PreviewProvider { static var previews: some View { let store = VideoStore() return NavigationView { VideoDetailsView(video: Video.all[0]) .environmentObject(store) } } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples/VideoListView.swift ================================================ // // ListView.swift // SwiftUI by Examples // // Created by Artem Novichkov on 05/06/2019. // Copyright © 2019 Artem Novichkov. All rights reserved. // import SwiftUI import Combine struct VideoListView: View { @State var showFavoritesOnly = false @EnvironmentObject private var store: VideoStore var body: some View { NavigationView { List { Section { Toggle(isOn: $showFavoritesOnly) { Text("Favorites only") } Button(action: addRandomVideo) { Text("Add random video") } } Section { ForEach(store.videos) { video in if !self.showFavoritesOnly || video.isFavorite { VideoCell(video: video) } } .onDelete(perform: delete) } } .navigationBarTitle(Text("WWDC 2019")) .navigationBarItems(leading: PresentationButton(destination: BadgeView(), label: { Image(systemName: "info") })) .listStyle(.grouped) } } func addRandomVideo() { if let video = store.videos.randomElement() { store.videos.append(video) } } func delete(at offsets: IndexSet) { for offset in offsets { store.videos.remove(at: offset) } } } #if DEBUG struct ListView_Previews: PreviewProvider { static var previews: some View { VideoListView() } } #endif ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 50; objects = { /* Begin PBXBuildFile section */ 060DBBEB22AE7E2B00D3A09F /* StepperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 060DBBEA22AE7E2B00D3A09F /* StepperView.swift */; }; 060DBBED22AE7EE600D3A09F /* SegmentedControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 060DBBEC22AE7EE600D3A09F /* SegmentedControlView.swift */; }; 060DBBEF22AE80DC00D3A09F /* AlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 060DBBEE22AE80DC00D3A09F /* AlertView.swift */; }; 060DBBF122AE891300D3A09F /* GestureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 060DBBF022AE891300D3A09F /* GestureView.swift */; }; 060DBBF322AEB7A600D3A09F /* AnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 060DBBF222AEB7A600D3A09F /* AnimationView.swift */; }; 068FA18722AD716100FFF648 /* ExampleListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068FA18622AD716100FFF648 /* ExampleListView.swift */; }; 068FA18922AD717E00FFF648 /* ExampleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068FA18822AD717E00FFF648 /* ExampleCell.swift */; }; 068FA18B22AD73D300FFF648 /* TextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068FA18A22AD73D300FFF648 /* TextView.swift */; }; 068FA18D22AD765300FFF648 /* TextFieldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068FA18C22AD765300FFF648 /* TextFieldView.swift */; }; 068FA18F22AD80CD00FFF648 /* ButtonsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068FA18E22AD80CD00FFF648 /* ButtonsView.swift */; }; 068FA19122AD86DA00FFF648 /* SliderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068FA19022AD86DA00FFF648 /* SliderView.swift */; }; 068FA19322AE7A9900FFF648 /* ToggleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068FA19222AE7A9900FFF648 /* ToggleView.swift */; }; 068FA19522AE7B7000FFF648 /* DatePickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068FA19422AE7B7000FFF648 /* DatePickerView.swift */; }; 06E548C022ABA53600794057 /* VideoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E548BF22ABA53600794057 /* VideoCell.swift */; }; 06E548C222ABA5F000794057 /* VideoDetailsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E548C122ABA5F000794057 /* VideoDetailsView.swift */; }; 06E548C422ABAB1E00794057 /* BadgeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E548C322ABAB1E00794057 /* BadgeView.swift */; }; 06E548C622ABAB6A00794057 /* HexagonParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E548C522ABAB6A00794057 /* HexagonParameters.swift */; }; 06FB7FAF22A822C600E0B8C5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06FB7FAE22A822C600E0B8C5 /* AppDelegate.swift */; }; 06FB7FB122A822C600E0B8C5 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06FB7FB022A822C600E0B8C5 /* SceneDelegate.swift */; }; 06FB7FB322A822C600E0B8C5 /* VideoListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06FB7FB222A822C600E0B8C5 /* VideoListView.swift */; }; 06FB7FB522A822C700E0B8C5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 06FB7FB422A822C700E0B8C5 /* Assets.xcassets */; }; 06FB7FB822A822C700E0B8C5 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 06FB7FB722A822C700E0B8C5 /* Preview Assets.xcassets */; }; 06FB7FBB22A822C700E0B8C5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 06FB7FB922A822C700E0B8C5 /* LaunchScreen.storyboard */; }; 06FB7FC722A8269800E0B8C5 /* Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06FB7FC622A8269800E0B8C5 /* Video.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 060DBBEA22AE7E2B00D3A09F /* StepperView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepperView.swift; sourceTree = ""; }; 060DBBEC22AE7EE600D3A09F /* SegmentedControlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentedControlView.swift; sourceTree = ""; }; 060DBBEE22AE80DC00D3A09F /* AlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertView.swift; sourceTree = ""; }; 060DBBF022AE891300D3A09F /* GestureView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GestureView.swift; sourceTree = ""; }; 060DBBF222AEB7A600D3A09F /* AnimationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationView.swift; sourceTree = ""; }; 068FA18622AD716100FFF648 /* ExampleListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleListView.swift; sourceTree = ""; }; 068FA18822AD717E00FFF648 /* ExampleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleCell.swift; sourceTree = ""; }; 068FA18A22AD73D300FFF648 /* TextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = ""; }; 068FA18C22AD765300FFF648 /* TextFieldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldView.swift; sourceTree = ""; }; 068FA18E22AD80CD00FFF648 /* ButtonsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonsView.swift; sourceTree = ""; }; 068FA19022AD86DA00FFF648 /* SliderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderView.swift; sourceTree = ""; }; 068FA19222AE7A9900FFF648 /* ToggleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToggleView.swift; sourceTree = ""; }; 068FA19422AE7B7000FFF648 /* DatePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePickerView.swift; sourceTree = ""; }; 06E548BF22ABA53600794057 /* VideoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoCell.swift; sourceTree = ""; }; 06E548C122ABA5F000794057 /* VideoDetailsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoDetailsView.swift; sourceTree = ""; }; 06E548C322ABAB1E00794057 /* BadgeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BadgeView.swift; sourceTree = ""; }; 06E548C522ABAB6A00794057 /* HexagonParameters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HexagonParameters.swift; sourceTree = ""; }; 06FB7FAB22A822C600E0B8C5 /* SwiftUI by Examples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SwiftUI by Examples.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 06FB7FAE22A822C600E0B8C5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 06FB7FB022A822C600E0B8C5 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 06FB7FB222A822C600E0B8C5 /* VideoListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoListView.swift; sourceTree = ""; }; 06FB7FB422A822C700E0B8C5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 06FB7FB722A822C700E0B8C5 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 06FB7FBA22A822C700E0B8C5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 06FB7FBC22A822C700E0B8C5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 06FB7FC322A8233700E0B8C5 /* SampleCode.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = SampleCode.xcconfig; sourceTree = ""; }; 06FB7FC622A8269800E0B8C5 /* Video.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Video.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 06FB7FA822A822C600E0B8C5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 06FB7FA222A822C600E0B8C5 = { isa = PBXGroup; children = ( 06FB7FC222A8233700E0B8C5 /* Configuration */, 06FB7FAD22A822C600E0B8C5 /* SwiftUI by Examples */, 06FB7FAC22A822C600E0B8C5 /* Products */, ); sourceTree = ""; }; 06FB7FAC22A822C600E0B8C5 /* Products */ = { isa = PBXGroup; children = ( 06FB7FAB22A822C600E0B8C5 /* SwiftUI by Examples.app */, ); name = Products; sourceTree = ""; }; 06FB7FAD22A822C600E0B8C5 /* SwiftUI by Examples */ = { isa = PBXGroup; children = ( 06FB7FAE22A822C600E0B8C5 /* AppDelegate.swift */, 06FB7FB022A822C600E0B8C5 /* SceneDelegate.swift */, 06FB7FC622A8269800E0B8C5 /* Video.swift */, 06FB7FB222A822C600E0B8C5 /* VideoListView.swift */, 06E548BF22ABA53600794057 /* VideoCell.swift */, 06E548C122ABA5F000794057 /* VideoDetailsView.swift */, 06E548C522ABAB6A00794057 /* HexagonParameters.swift */, 06E548C322ABAB1E00794057 /* BadgeView.swift */, 06FB7FB422A822C700E0B8C5 /* Assets.xcassets */, 06FB7FB922A822C700E0B8C5 /* LaunchScreen.storyboard */, 06FB7FBC22A822C700E0B8C5 /* Info.plist */, 06FB7FB622A822C700E0B8C5 /* Preview Content */, 068FA18622AD716100FFF648 /* ExampleListView.swift */, 068FA18822AD717E00FFF648 /* ExampleCell.swift */, 068FA18A22AD73D300FFF648 /* TextView.swift */, 068FA18C22AD765300FFF648 /* TextFieldView.swift */, 068FA18E22AD80CD00FFF648 /* ButtonsView.swift */, 068FA19022AD86DA00FFF648 /* SliderView.swift */, 068FA19222AE7A9900FFF648 /* ToggleView.swift */, 068FA19422AE7B7000FFF648 /* DatePickerView.swift */, 060DBBEA22AE7E2B00D3A09F /* StepperView.swift */, 060DBBEC22AE7EE600D3A09F /* SegmentedControlView.swift */, 060DBBEE22AE80DC00D3A09F /* AlertView.swift */, 060DBBF022AE891300D3A09F /* GestureView.swift */, 060DBBF222AEB7A600D3A09F /* AnimationView.swift */, ); path = "SwiftUI by Examples"; sourceTree = ""; }; 06FB7FB622A822C700E0B8C5 /* Preview Content */ = { isa = PBXGroup; children = ( 06FB7FB722A822C700E0B8C5 /* Preview Assets.xcassets */, ); path = "Preview Content"; sourceTree = ""; }; 06FB7FC222A8233700E0B8C5 /* Configuration */ = { isa = PBXGroup; children = ( 06FB7FC322A8233700E0B8C5 /* SampleCode.xcconfig */, ); name = Configuration; path = ../Configuration; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 06FB7FAA22A822C600E0B8C5 /* SwiftUI by Examples */ = { isa = PBXNativeTarget; buildConfigurationList = 06FB7FBF22A822C700E0B8C5 /* Build configuration list for PBXNativeTarget "SwiftUI by Examples" */; buildPhases = ( 06FB7FA722A822C600E0B8C5 /* Sources */, 06FB7FA822A822C600E0B8C5 /* Frameworks */, 06FB7FA922A822C600E0B8C5 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = "SwiftUI by Examples"; productName = "SwiftUI by Examples"; productReference = 06FB7FAB22A822C600E0B8C5 /* SwiftUI by Examples.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 06FB7FA322A822C600E0B8C5 /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1100; LastUpgradeCheck = 1100; ORGANIZATIONNAME = "Artem Novichkov"; TargetAttributes = { 06FB7FAA22A822C600E0B8C5 = { CreatedOnToolsVersion = 11.0; }; }; }; buildConfigurationList = 06FB7FA622A822C600E0B8C5 /* Build configuration list for PBXProject "SwiftUI by Examples" */; compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 06FB7FA222A822C600E0B8C5; productRefGroup = 06FB7FAC22A822C600E0B8C5 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 06FB7FAA22A822C600E0B8C5 /* SwiftUI by Examples */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 06FB7FA922A822C600E0B8C5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 06FB7FBB22A822C700E0B8C5 /* LaunchScreen.storyboard in Resources */, 06FB7FB822A822C700E0B8C5 /* Preview Assets.xcassets in Resources */, 06FB7FB522A822C700E0B8C5 /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 06FB7FA722A822C600E0B8C5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 068FA18922AD717E00FFF648 /* ExampleCell.swift in Sources */, 060DBBEF22AE80DC00D3A09F /* AlertView.swift in Sources */, 060DBBED22AE7EE600D3A09F /* SegmentedControlView.swift in Sources */, 068FA18B22AD73D300FFF648 /* TextView.swift in Sources */, 068FA18D22AD765300FFF648 /* TextFieldView.swift in Sources */, 06E548C622ABAB6A00794057 /* HexagonParameters.swift in Sources */, 068FA19522AE7B7000FFF648 /* DatePickerView.swift in Sources */, 06FB7FAF22A822C600E0B8C5 /* AppDelegate.swift in Sources */, 06E548C422ABAB1E00794057 /* BadgeView.swift in Sources */, 068FA18F22AD80CD00FFF648 /* ButtonsView.swift in Sources */, 06FB7FB122A822C600E0B8C5 /* SceneDelegate.swift in Sources */, 06FB7FB322A822C600E0B8C5 /* VideoListView.swift in Sources */, 060DBBEB22AE7E2B00D3A09F /* StepperView.swift in Sources */, 06E548C222ABA5F000794057 /* VideoDetailsView.swift in Sources */, 060DBBF122AE891300D3A09F /* GestureView.swift in Sources */, 06FB7FC722A8269800E0B8C5 /* Video.swift in Sources */, 068FA18722AD716100FFF648 /* ExampleListView.swift in Sources */, 06E548C022ABA53600794057 /* VideoCell.swift in Sources */, 060DBBF322AEB7A600D3A09F /* AnimationView.swift in Sources */, 068FA19322AE7A9900FFF648 /* ToggleView.swift in Sources */, 068FA19122AD86DA00FFF648 /* SliderView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 06FB7FB922A822C700E0B8C5 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( 06FB7FBA22A822C700E0B8C5 /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 06FB7FBD22A822C700E0B8C5 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 06FB7FC322A8233700E0B8C5 /* SampleCode.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; }; 06FB7FBE22A822C700E0B8C5 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 06FB7FC322A8233700E0B8C5 /* SampleCode.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; VALIDATE_PRODUCT = YES; }; name = Release; }; 06FB7FC022A822C700E0B8C5 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 06FB7FC322A8233700E0B8C5 /* SampleCode.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_ASSET_PATHS = "\"SwiftUI by Examples\"/Preview\\ Content"; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = "SwiftUI by Examples/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = "com.artemnovichkov.SwiftUI-by-Examples"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; 06FB7FC122A822C700E0B8C5 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 06FB7FC322A8233700E0B8C5 /* SampleCode.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_ASSET_PATHS = "\"SwiftUI by Examples\"/Preview\\ Content"; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = "SwiftUI by Examples/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = "com.artemnovichkov.SwiftUI-by-Examples"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 06FB7FA622A822C600E0B8C5 /* Build configuration list for PBXProject "SwiftUI by Examples" */ = { isa = XCConfigurationList; buildConfigurations = ( 06FB7FBD22A822C700E0B8C5 /* Debug */, 06FB7FBE22A822C700E0B8C5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 06FB7FBF22A822C700E0B8C5 /* Build configuration list for PBXNativeTarget "SwiftUI by Examples" */ = { isa = XCConfigurationList; buildConfigurations = ( 06FB7FC022A822C700E0B8C5 /* Debug */, 06FB7FC122A822C700E0B8C5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 06FB7FA322A822C600E0B8C5 /* Project object */; } ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: SwiftUI by Examples/SwiftUI by Examples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning