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
<p align="center">
<img src=".github/logo.png" width="300" max-width="90%" alt="SwiftUI" />
</p>
<p align="center">
<a href="https://developer.apple.com/xcode/">
<img src="https://img.shields.io/badge/Xcode-11-green.svg" alt="Xcode 11" />
</a>
<a href="https://swift.org">
<img src="https://img.shields.io/badge/Swift-5.1-green.svg" alt="Swift 5.1" />
</a>
</p>
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!
<p align="center">
<img src=".github/example1.png" width="250" max-width="90%" alt="SwiftUI" />
<img src=".github/example2.png" width="250" max-width="90%" alt="SwiftUI" />
<img src=".github/example3.png" width="250" max-width="90%" alt="SwiftUI" />
</p>
## 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<UISceneSession>) {
// 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
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
================================================
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
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>SwiftUI</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
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..<elements.count) { index in
Text(self.elements[index])
}
}
}
.padding()
}
}
#if DEBUG
struct SegmentedControlView_Previews : PreviewProvider {
static var previews: some View {
SegmentedControlView()
}
}
#endif
================================================
FILE: SwiftUI by Examples/SwiftUI by Examples/SliderView.swift
================================================
//
// SliderView.swift
// SwiftUI by Examples
//
// Created by Artem Novichkov on 10/06/2019.
// Copyright © 2019 Artem Novichkov. All rights reserved.
//
import SwiftUI
struct SliderView: View {
@State var celsius: Double = 0
private var text: String {
return "\(celsius, fractionDigits: 1) Celsius is \(celsius * 9 / 5 + 32, fractionDigits: 1) Fahrenheit"
}
var body: some View {
VStack {
Slider(value: $celsius, from: -100, through: 100, by: 0.1)
Text(text)
}
.padding()
}
}
extension NumberFormatter {
static let custom: NumberFormatter = {
let formatter = NumberFormatter()
formatter.minimumFractionDigits = 1
formatter.maximumFractionDigits = 1
return formatter
}()
}
extension String.StringInterpolation {
mutating func appendInterpolation(_ number: Double, fractionDigits: Int) {
if let result = NumberFormatter.custom.string(for: number) {
appendLiteral(result)
}
}
}
#if DEBUG
struct SliderView_Previews: PreviewProvider {
static var previews: some View {
SliderView()
}
}
#endif
================================================
FILE: SwiftUI by Examples/SwiftUI by Examples/StepperView.swift
================================================
//
// StepperView.swift
// SwiftUI by Examples
//
// Created by Artem Novichkov on 10/06/2019.
// Copyright © 2019 Artem Novichkov. All rights reserved.
//
import SwiftUI
struct StepperView: View {
@State var value = 0
var body: some View {
Stepper(value: $value, step: 1) {
Text("\(self.value)")
}
.padding()
}
}
#if DEBUG
struct StepperView_Previews: PreviewProvider {
static var previews: some View {
StepperView()
}
}
#endif
================================================
FILE: SwiftUI by Examples/SwiftUI by Examples/TextFieldView.swift
================================================
//
// TextFieldView.swift
// SwiftUI by Examples
//
// Created by Artem Novichkov on 09/06/2019.
// Copyright © 2019 Artem Novichkov. All rights reserved.
//
import SwiftUI
struct TextFieldView : View {
@State var username: String = ""
@State var password: String = ""
var body: some View {
VStack {
HStack {
Text("Username")
TextField($username, placeholder: Text("Username")) {
print(self.username)
}
.textContentType(.name)
}
HStack {
Text("Password")
SecureField($password, placeholder: Text("Password")) {
print(self.password)
}
.textContentType(.newPassword)
}
}
.textFieldStyle(.roundedBorder)
.padding()
}
}
#if DEBUG
struct TextFieldView_Previews : PreviewProvider {
static var previews: some View {
TextFieldView()
}
}
#endif
================================================
FILE: SwiftUI by Examples/SwiftUI by Examples/TextView.swift
================================================
//
// TextView.swift
// SwiftUI by Examples
//
// Created by Artem Novichkov on 09/06/2019.
// Copyright © 2019 Artem Novichkov. All rights reserved.
//
import SwiftUI
struct TextView : View {
var body: some View {
VStack {
Text("Simple text")
Text("Rich text")
.color(.green)
.bold()
.font(.largeTitle)
Text("Simple text with tap action")
.underline(true, color: .black)
.tapAction {
print("Tap")
}
Text("Multiline text\nwith second line")
.lineLimit(nil)
}
}
}
#if DEBUG
struct TextView_Previews : PreviewProvider {
static var previews: some View {
TextView()
}
}
#endif
================================================
FILE: SwiftUI by Examples/SwiftUI by Examples/ToggleView.swift
================================================
//
// ToggleView.swift
// SwiftUI by Examples
//
// Created by Artem Novichkov on 10/06/2019.
// Copyright © 2019 Artem Novichkov. All rights reserved.
//
import SwiftUI
struct ToggleView: View {
@State var isEnabled = false
var body: some View {
Toggle(isOn: $isEnabled) {
Text(isEnabled ? "is On" : "is Off")
}
.padding()
}
}
#if DEBUG
struct ToggleView_Previews: PreviewProvider {
static var previews: some View {
ToggleView()
}
}
#endif
================================================
FILE: SwiftUI by Examples/SwiftUI by Examples/Video.swift
================================================
//
// Animal.swift
// SwiftUI by Examples
//
// Created by Artem Novichkov on 05/06/2019.
// Copyright © 2019 Artem Novichkov. All rights reserved.
//
import SwiftUI
import Combine
class VideoStore: BindableObject {
var videos: [Video] = Video.all {
didSet {
didChange.send(())
}
}
var didChange = PassthroughSubject<Void, Never>()
}
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 = "<group>"; };
060DBBEC22AE7EE600D3A09F /* SegmentedControlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentedControlView.swift; sourceTree = "<group>"; };
060DBBEE22AE80DC00D3A09F /* AlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertView.swift; sourceTree = "<group>"; };
060DBBF022AE891300D3A09F /* GestureView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GestureView.swift; sourceTree = "<group>"; };
060DBBF222AEB7A600D3A09F /* AnimationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationView.swift; sourceTree = "<group>"; };
068FA18622AD716100FFF648 /* ExampleListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleListView.swift; sourceTree = "<group>"; };
068FA18822AD717E00FFF648 /* ExampleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleCell.swift; sourceTree = "<group>"; };
068FA18A22AD73D300FFF648 /* TextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = "<group>"; };
068FA18C22AD765300FFF648 /* TextFieldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldView.swift; sourceTree = "<group>"; };
068FA18E22AD80CD00FFF648 /* ButtonsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonsView.swift; sourceTree = "<group>"; };
068FA19022AD86DA00FFF648 /* SliderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderView.swift; sourceTree = "<group>"; };
068FA19222AE7A9900FFF648 /* ToggleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToggleView.swift; sourceTree = "<group>"; };
068FA19422AE7B7000FFF648 /* DatePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePickerView.swift; sourceTree = "<group>"; };
06E548BF22ABA53600794057 /* VideoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoCell.swift; sourceTree = "<group>"; };
06E548C122ABA5F000794057 /* VideoDetailsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoDetailsView.swift; sourceTree = "<group>"; };
06E548C322ABAB1E00794057 /* BadgeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BadgeView.swift; sourceTree = "<group>"; };
06E548C522ABAB6A00794057 /* HexagonParameters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HexagonParameters.swift; sourceTree = "<group>"; };
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 = "<group>"; };
06FB7FB022A822C600E0B8C5 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
06FB7FB222A822C600E0B8C5 /* VideoListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoListView.swift; sourceTree = "<group>"; };
06FB7FB422A822C700E0B8C5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
06FB7FB722A822C700E0B8C5 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
06FB7FBA22A822C700E0B8C5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
06FB7FBC22A822C700E0B8C5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
06FB7FC322A8233700E0B8C5 /* SampleCode.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = SampleCode.xcconfig; sourceTree = "<group>"; };
06FB7FC622A8269800E0B8C5 /* Video.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Video.swift; sourceTree = "<group>"; };
/* 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 = "<group>";
};
06FB7FAC22A822C600E0B8C5 /* Products */ = {
isa = PBXGroup;
children = (
06FB7FAB22A822C600E0B8C5 /* SwiftUI by Examples.app */,
);
name = Products;
sourceTree = "<group>";
};
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 = "<group>";
};
06FB7FB622A822C700E0B8C5 /* Preview Content */ = {
isa = PBXGroup;
children = (
06FB7FB722A822C700E0B8C5 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "<group>";
};
06FB7FC222A8233700E0B8C5 /* Configuration */ = {
isa = PBXGroup;
children = (
06FB7FC322A8233700E0B8C5 /* SampleCode.xcconfig */,
);
name = Configuration;
path = ../Configuration;
sourceTree = "<group>";
};
/* 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 = "<group>";
};
/* 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
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:SwiftUI by Examples.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: SwiftUI by Examples/SwiftUI by Examples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
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
Condensed preview — 43 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (77K chars).
[
{
"path": ".gitignore",
"chars": 1476,
"preview": "# Xcode\n#\n# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore\n\n"
},
{
"path": "Configuration/SampleCode.xcconfig",
"chars": 616,
"preview": "//\n// See LICENSE folder for this sample’s licensing information.\n//\n// SampleCode.xcconfig\n//\n\n// The `SAMPLE_CODE_DISA"
},
{
"path": "LICENSE",
"chars": 1072,
"preview": "MIT License\n\nCopyright (c) 2019 Artem Novichkov\n\nPermission is hereby granted, free of charge, to any person obtaining a"
},
{
"path": "README.md",
"chars": 1184,
"preview": "# SwiftUI by Examples\n\n<p align=\"center\">\n <img src=\".github/logo.png\" width=\"300\" max-width=\"90%\" alt=\"SwiftUI\" />\n</p"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/AlertView.swift",
"chars": 1922,
"preview": "//\n// AlertView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 10/06/2019.\n// Copyright © 2019 Art"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/AnimationView.swift",
"chars": 792,
"preview": "//\n// AnimationView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 10/06/2019.\n// Copyright © 2019"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/AppDelegate.swift",
"chars": 1633,
"preview": "//\n// AppDelegate.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 05/06/2019.\n// Copyright © 2019 A"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 2513,
"preview": "{\n \"images\" : [\n {\n \"size\" : \"20x20\",\n \"idiom\" : \"iphone\",\n \"filename\" : \"Icon-App-20x20@2x.png\",\n "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/Contents.json",
"chars": 62,
"preview": "{\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2612_wide_250x141_2x.imageset/Contents.json",
"chars": 169,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"2612_wide_250x141_2x.jpg\"\n }\n ],\n \"info\" : "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2640_wide_250x141_2x.imageset/Contents.json",
"chars": 169,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"2640_wide_250x141_2x.jpg\"\n }\n ],\n \"info\" : "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2645_wide_250x141_2x.imageset/Contents.json",
"chars": 169,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"2645_wide_250x141_2x.jpg\"\n }\n ],\n \"info\" : "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2649_wide_250x141_2x.imageset/Contents.json",
"chars": 169,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"2649_wide_250x141_2x.jpg\"\n }\n ],\n \"info\" : "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2672_wide_250x141_2x.imageset/Contents.json",
"chars": 169,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"2672_wide_250x141_2x.jpg\"\n }\n ],\n \"info\" : "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2676_wide_250x141_2x.imageset/Contents.json",
"chars": 169,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"2676_wide_250x141_2x.jpg\"\n }\n ],\n \"info\" : "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2682_wide_250x141_2x.imageset/Contents.json",
"chars": 169,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"2682_wide_250x141_2x.jpg\"\n }\n ],\n \"info\" : "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2684_wide_250x141_2x.imageset/Contents.json",
"chars": 169,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"2684_wide_250x141_2x.jpg\"\n }\n ],\n \"info\" : "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/2949_wide_250x141_2x.imageset/Contents.json",
"chars": 169,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"2949_wide_250x141_2x.jpg\"\n }\n ],\n \"info\" : "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Assets.xcassets/thumbnails/Contents.json",
"chars": 62,
"preview": "{\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/BadgeView.swift",
"chars": 2077,
"preview": "//\n// BadgeView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 08/06/2019.\n// Copyright © 2019 Art"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Base.lproj/LaunchScreen.storyboard",
"chars": 1665,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/ButtonsView.swift",
"chars": 1155,
"preview": "//\n// ButtonsView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 10/06/2019.\n// Copyright © 2019 A"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/DatePickerView.swift",
"chars": 897,
"preview": "//\n// PickerView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 10/06/2019.\n// Copyright © 2019 Ar"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/ExampleCell.swift",
"chars": 592,
"preview": "//\n// ExampleCell.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 09/06/2019.\n// Copyright © 2019 A"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/ExampleListView.swift",
"chars": 3465,
"preview": "//\n// ExampleListView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 09/06/2019.\n// Copyright © 20"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/GestureView.swift",
"chars": 1793,
"preview": "//\n// GestureView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 10/06/2019.\n// Copyright © 2019 A"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/HexagonParameters.swift",
"chars": 1865,
"preview": "//\n// HexagonParameters.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 08/06/2019.\n// Copyright © "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Info.plist",
"chars": 1950,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Preview Content/Preview Assets.xcassets/Contents.json",
"chars": 62,
"preview": "{\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/SceneDelegate.swift",
"chars": 2595,
"preview": "//\n// SceneDelegate.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 05/06/2019.\n// Copyright © 2019"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/SegmentedControlView.swift",
"chars": 752,
"preview": "//\n// SegmentedControlView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 10/06/2019.\n// Copyright"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/SliderView.swift",
"chars": 1172,
"preview": "//\n// SliderView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 10/06/2019.\n// Copyright © 2019 Ar"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/StepperView.swift",
"chars": 502,
"preview": "//\n// StepperView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 10/06/2019.\n// Copyright © 2019 A"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/TextFieldView.swift",
"chars": 1053,
"preview": "//\n// TextFieldView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 09/06/2019.\n// Copyright © 2019"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/TextView.swift",
"chars": 796,
"preview": "//\n// TextView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 09/06/2019.\n// Copyright © 2019 Arte"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/ToggleView.swift",
"chars": 522,
"preview": "//\n// ToggleView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 10/06/2019.\n// Copyright © 2019 Ar"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/Video.swift",
"chars": 5771,
"preview": "//\n// Animal.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 05/06/2019.\n// Copyright © 2019 Artem "
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/VideoCell.swift",
"chars": 1151,
"preview": "//\n// ListView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 05/06/2019.\n// Copyright © 2019 Arte"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/VideoDetailsView.swift",
"chars": 1790,
"preview": "//\n// DetailsView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 05/06/2019.\n// Copyright © 2019 A"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples/VideoListView.swift",
"chars": 1653,
"preview": "//\n// ListView.swift\n// SwiftUI by Examples\n//\n// Created by Artem Novichkov on 05/06/2019.\n// Copyright © 2019 Arte"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples.xcodeproj/project.pbxproj",
"chars": 21956,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 50;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 164,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:SwiftUI by Exam"
},
{
"path": "SwiftUI by Examples/SwiftUI by Examples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
}
]
About this extraction
This page contains the full source code of the artemnovichkov/SwiftUI-by-Examples GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 43 files (66.9 KB), approximately 20.3k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.