Repository: jaywcjlove/swiftui-example
Branch: main
Commit: 28f92b904791
Files: 2852
Total size: 4.8 MB
Directory structure:
gitextract_gzhkv01i/
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .idoc/
│ └── .filesStat.json
├── LICENSE
├── README.md
├── example/
│ ├── accessibility/
│ │ ├── demo1/
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── star.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo6/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── advanced-state/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── alerts-and-menus/
│ │ ├── demo1/
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Credits.rtf
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── SettingsView.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── animation/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo12/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo13/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── appendix-a/
│ │ ├── demo1/
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── niagara-falls.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.xcdatamodeld/
│ │ │ │ │ │ ├── .xccurrentversion
│ │ │ │ │ │ └── Shared.xcdatamodel/
│ │ │ │ │ │ └── contents
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Persistence.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo12/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo13/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo14/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo15/
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── cheat-sheet.md
│ ├── composing-views/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── kenny.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo7/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── containers/
│ │ ├── demo1/
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── PostNoSelectionPlaceholder.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── cross-platform/
│ │ ├── demo1/
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo WatchKit App/
│ │ │ │ │ └── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── Demo WatchKit Extension/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── Complication.complicationset/
│ │ │ │ │ │ │ ├── Circular.imageset/
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ │ ├── Extra Large.imageset/
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ ├── Graphic Bezel.imageset/
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ ├── Graphic Circular.imageset/
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ ├── Graphic Corner.imageset/
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ ├── Graphic Extra Large.imageset/
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ ├── Graphic Large Rectangular.imageset/
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ ├── Modular.imageset/
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ └── Utilitarian.imageset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ComplicationController.swift
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── NotificationController.swift
│ │ │ │ │ ├── NotificationView.swift
│ │ │ │ │ ├── Preview Content/
│ │ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── PushNotificationPayload.apns
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ ├── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ └── xcshareddata/
│ │ │ │ └── xcschemes/
│ │ │ │ ├── Demo WatchKit App (Complication).xcscheme
│ │ │ │ ├── Demo WatchKit App (Notification).xcscheme
│ │ │ │ └── Demo WatchKit App.xcscheme
│ │ │ └── README.md
│ │ └── demo4/
│ │ ├── Demo/
│ │ │ ├── Demo WatchKit App/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Info.plist
│ │ │ ├── Demo WatchKit Extension/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── Complication.complicationset/
│ │ │ │ │ │ ├── Circular.imageset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ ├── Extra Large.imageset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Graphic Bezel.imageset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Graphic Circular.imageset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Graphic Corner.imageset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Graphic Extra Large.imageset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Graphic Large Rectangular.imageset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Modular.imageset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Utilitarian.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ComplicationController.swift
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ ├── NotificationController.swift
│ │ │ │ ├── NotificationView.swift
│ │ │ │ ├── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── PushNotificationPayload.apns
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── data/
│ │ ├── demo1/
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── TextFile.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo12/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Main.xcdatamodeld/
│ │ │ │ │ │ ├── .xccurrentversion
│ │ │ │ │ │ └── Shared.xcdatamodel/
│ │ │ │ │ │ └── contents
│ │ │ │ │ ├── Model.xcdatamodeld/
│ │ │ │ │ │ └── Model.xcdatamodel/
│ │ │ │ │ │ └── contents
│ │ │ │ │ └── Persistence.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.xcdatamodeld/
│ │ │ │ │ │ ├── .xccurrentversion
│ │ │ │ │ │ └── Shared.xcdatamodel/
│ │ │ │ │ │ └── contents
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Persistence.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.xcdatamodeld/
│ │ │ │ │ │ ├── .xccurrentversion
│ │ │ │ │ │ └── Shared.xcdatamodel/
│ │ │ │ │ │ └── contents
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Persistence.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.xcdatamodeld/
│ │ │ │ │ │ ├── .xccurrentversion
│ │ │ │ │ │ └── Shared.xcdatamodel/
│ │ │ │ │ │ └── contents
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Persistence.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.xcdatamodeld/
│ │ │ │ │ │ ├── .xccurrentversion
│ │ │ │ │ │ └── Shared.xcdatamodel/
│ │ │ │ │ │ └── contents
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Persistence.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.xcdatamodeld/
│ │ │ │ │ │ ├── .xccurrentversion
│ │ │ │ │ │ └── Shared.xcdatamodel/
│ │ │ │ │ │ └── contents
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Persistence.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.xcdatamodeld/
│ │ │ │ │ │ ├── .xccurrentversion
│ │ │ │ │ │ └── Shared.xcdatamodel/
│ │ │ │ │ │ └── contents
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Persistence.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── DemoApp.swift
│ │ │ │ └── TextFile.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── drawing/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ └── demo4/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── forms/
│ │ ├── demo1/
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo6/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── images-shapes-media/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── dog.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo12/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo13/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ └── macOS/
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo14/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── rome.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── logo.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── singapore.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── introduction/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ ├── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ └── xcshareddata/
│ │ │ │ └── xcschemes/
│ │ │ │ └── Demo.xcscheme
│ │ │ └── README.md
│ │ └── demo2/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── lists/
│ │ ├── demo1/
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo12/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo13/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── paul-hudson.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── presenting-views/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ └── demo6/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── quick-start/
│ │ ├── answering-the-big-question-should-you-learn-swiftui-uikit-or-both.md
│ │ ├── dedication.md
│ │ ├── dont-panic.md
│ │ ├── frequently-asked-questions-about-swiftui.md
│ │ ├── how-to-follow-this-quick-start-guide.md
│ │ ├── migrating-from-uikit-to-swiftui.md
│ │ ├── swiftui-vs-interface-builder-and-storyboards.md
│ │ ├── what-is-swiftui.md
│ │ └── whats-in-the-basic-template.md
│ ├── responding-to-events/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ ├── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ └── xcshareddata/
│ │ │ │ └── xcschemes/
│ │ │ │ └── Demo.xcscheme
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── DemoApp.swift
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── Demo2/
│ │ │ ├── Demo2/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo2App.swift
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo2.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── stacks-grids-scrollviews/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo12/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo13/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo14/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo15/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── singapore.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ └── macOS/
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── niagara-falls.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo.entitlements
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── taps-and-gestures/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── ireland.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── singapore.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── tooling/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── MySamplePackage/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .swiftpm/
│ │ │ │ │ └── xcode/
│ │ │ │ │ └── package.xcworkspace/
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Package.swift
│ │ │ │ ├── README.md
│ │ │ │ ├── Sources/
│ │ │ │ │ └── MySamplePackage/
│ │ │ │ │ └── MySamplePackage.swift
│ │ │ │ └── Tests/
│ │ │ │ └── MySamplePackageTests/
│ │ │ │ └── MySamplePackageTests.swift
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── DemoApp.swift
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── transforming-views/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo12/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo13/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo14/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo15/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── laser-show.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo16/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── dog.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo17/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo18/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── cat.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo19/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo20/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo21/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo22/
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── user-interface-controls/
│ │ ├── demo1/
│ │ │ └── README.md
│ │ ├── demo10/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo11/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo12/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo13/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo14/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo15/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo16/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo17/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo18/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo19/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── sunset.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo20/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo21/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo22/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo23/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo24/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo25/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo26/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ └── macOS/
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo27/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ └── macOS/
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo28/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ └── macOS/
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── logo.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace/
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── Shared/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ └── DemoApp.swift
│ │ │ │ ├── iOS/
│ │ │ │ │ └── Info.plist
│ │ │ │ └── macOS/
│ │ │ │ ├── Info.plist
│ │ │ │ └── macOS.entitlements
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ ├── iOS/
│ │ │ │ └── Info.plist
│ │ │ └── macOS/
│ │ │ ├── Info.plist
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── view-layout/
│ │ ├── demo1/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo2/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo3/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo4/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo5/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ └── laser-show.imageset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── Preview Content/
│ │ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── TossResult.swift
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo6/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo7/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ ├── demo8/
│ │ │ ├── Demo/
│ │ │ │ ├── Demo/
│ │ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── ContentView.swift
│ │ │ │ │ ├── Demo.entitlements
│ │ │ │ │ ├── DemoApp.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ └── Preview Content/
│ │ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── README.md
│ │ └── demo9/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── DemoApp.swift
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ └── working-with-static-text/
│ ├── demo1/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── demo10/
│ │ ├── Demo/
│ │ │ ├── Demo.xcodeproj/
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Shared/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ └── DemoApp.swift
│ │ │ └── macOS/
│ │ │ └── macOS.entitlements
│ │ └── README.md
│ ├── demo11/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── demo12/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── swiftpm/
│ │ │ └── Package.resolved
│ │ └── README.md
│ ├── demo2/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── demo3/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── demo4/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── demo5/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── demo6/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── demo7/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ ├── demo8/
│ │ ├── Demo/
│ │ │ ├── Demo/
│ │ │ │ ├── Assets.xcassets/
│ │ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── ContentView.swift
│ │ │ │ ├── Demo.entitlements
│ │ │ │ ├── DemoApp.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── Preview Content/
│ │ │ │ └── Preview Assets.xcassets/
│ │ │ │ └── Contents.json
│ │ │ └── Demo.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── README.md
│ └── demo9/
│ ├── Demo/
│ │ ├── Demo/
│ │ │ ├── Assets.xcassets/
│ │ │ │ ├── AccentColor.colorset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ ├── ContentView.swift
│ │ │ ├── Demo.entitlements
│ │ │ ├── DemoApp.swift
│ │ │ ├── Info.plist
│ │ │ └── Preview Content/
│ │ │ └── Preview Assets.xcassets/
│ │ │ └── Contents.json
│ │ └── Demo.xcodeproj/
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace/
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── IDEWorkspaceChecks.plist
│ └── README.md
├── idoc.chapters.yml
├── idoc.yml
├── package.json
└── renovate.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
*.md linguist-detectable=true
================================================
FILE: .github/FUNDING.yml
================================================
github: [jaywcjlove]
ko_fi: jaywcjlove
buy_me_a_coffee: jaywcjlove
custom: ["https://www.paypal.me/kennyiseeyou", "https://jaywcjlove.github.io/#/sponsor"]
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm run build
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
output: dist/CONTRIBUTORS.svg
avatarSize: 42
- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@main
with:
package-path: ./package.json
- name: Deploy Website
uses: peaceiris/actions-gh-pages@v4
with:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: ${{ github.event.head_commit.message }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
body: |
[](https://jaywcjlove.github.io/#/sponsor)
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/swiftui-example/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
================================================
FILE: .gitignore
================================================
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
.DS_Store
package-lock.json
node_modules
dist
## User settings
xcuserdata/
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
## Obj-C/Swift specific
*.hmap
## App packaging
*.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
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm
.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/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build/
# Accio dependency management
Dependencies/
.accio/
# 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
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
iOSInjectionProject/
================================================
FILE: .idoc/.filesStat.json
================================================
{
"example/quick-start/answering-the-big-question-should-you-learn-swiftui-uikit-or-both.md": {
"atime": "2021-11-04T08:03:23.058Z",
"mtime": "2021-11-04T08:03:20.622Z",
"ctime": "2021-11-04T08:03:20.622Z",
"birthtime": "2021-11-04T07:51:51.533Z"
},
"example/quick-start/dedication.md": {
"atime": "2021-11-04T08:04:51.867Z",
"mtime": "2021-11-04T08:04:50.597Z",
"ctime": "2021-11-04T08:04:50.597Z",
"birthtime": "2021-11-04T07:51:51.534Z"
},
"example/quick-start/dont-panic.md": {
"atime": "2021-11-04T07:55:01.016Z",
"mtime": "2021-11-04T07:54:59.662Z",
"ctime": "2021-11-04T07:54:59.663Z",
"birthtime": "2021-11-04T07:51:51.533Z"
},
"example/quick-start/frequently-asked-questions-about-swiftui.md": {
"atime": "2021-11-04T08:02:41.101Z",
"mtime": "2021-11-04T08:02:40.635Z",
"ctime": "2021-11-04T08:02:40.635Z",
"birthtime": "2021-11-04T07:51:51.534Z"
},
"example/quick-start/how-to-follow-this-quick-start-guide.md": {
"atime": "2021-11-04T08:03:47.010Z",
"mtime": "2021-11-04T08:03:46.423Z",
"ctime": "2021-11-04T08:03:46.424Z",
"birthtime": "2021-11-04T07:51:51.533Z"
},
"example/quick-start/migrating-from-uikit-to-swiftui.md": {
"atime": "2021-11-04T08:04:05.720Z",
"mtime": "2021-11-04T08:04:05.123Z",
"ctime": "2021-11-04T08:04:05.124Z",
"birthtime": "2021-11-04T07:51:51.533Z"
},
"example/quick-start/swiftui-vs-interface-builder-and-storyboards.md": {
"atime": "2021-11-27T12:20:56.962Z",
"mtime": "2021-11-27T12:20:55.705Z",
"ctime": "2021-11-27T12:20:55.705Z",
"birthtime": "2021-11-27T12:20:55.705Z"
},
"example/quick-start/what-is-swiftui.md": {
"atime": "2021-11-04T08:05:45.887Z",
"mtime": "2021-11-04T08:05:44.512Z",
"ctime": "2021-11-04T08:05:44.512Z",
"birthtime": "2021-11-04T07:51:51.533Z"
},
"example/quick-start/whats-in-the-basic-template.md": {
"atime": "2021-11-04T08:04:33.539Z",
"mtime": "2021-11-04T08:04:32.947Z",
"ctime": "2021-11-04T08:04:32.948Z",
"birthtime": "2021-11-04T07:51:51.533Z"
},
"example/alerts-and-menus/demo1/README.md": {
"atime": "2021-10-17T18:21:01.895Z",
"mtime": "2021-10-17T18:21:01.390Z",
"ctime": "2021-10-17T18:21:01.390Z",
"birthtime": "2021-03-24T02:58:47.691Z"
},
"example/appendix-a/demo1/README.md": {
"atime": "2021-10-17T18:11:09.348Z",
"mtime": "2021-10-17T18:11:08.937Z",
"ctime": "2021-10-17T18:11:08.937Z",
"birthtime": "2021-03-23T07:54:09.222Z"
},
"example/appendix-a/demo15/README.md": {
"atime": "2021-10-17T18:11:40.808Z",
"mtime": "2021-10-17T18:11:40.377Z",
"ctime": "2021-10-17T18:11:40.377Z",
"birthtime": "2021-03-23T07:56:10.062Z"
},
"example/appendix-a/demo2/README.md": {
"atime": "2021-10-17T18:11:44.546Z",
"mtime": "2021-10-17T18:11:44.054Z",
"ctime": "2021-10-17T18:11:44.054Z",
"birthtime": "2021-03-23T07:54:16.339Z"
},
"example/appendix-a/demo3/README.md": {
"atime": "2021-10-17T18:11:48.906Z",
"mtime": "2021-10-17T18:11:48.411Z",
"ctime": "2021-10-17T18:11:48.411Z",
"birthtime": "2021-03-23T07:54:19.076Z"
},
"example/appendix-a/demo5/README.md": {
"atime": "2021-10-17T18:12:04.095Z",
"mtime": "2021-10-17T18:12:03.654Z",
"ctime": "2021-10-17T18:12:03.654Z",
"birthtime": "2021-03-23T07:54:48.580Z"
},
"example/appendix-a/demo6/README.md": {
"atime": "2021-10-17T18:11:56.081Z",
"mtime": "2021-10-17T18:11:55.656Z",
"ctime": "2021-10-17T18:11:55.656Z",
"birthtime": "2021-03-23T07:54:56.752Z"
},
"example/appendix-a/demo8/README.md": {
"atime": "2021-10-17T18:12:11.709Z",
"mtime": "2021-10-17T18:12:11.306Z",
"ctime": "2021-10-17T18:12:11.306Z",
"birthtime": "2021-03-23T07:55:12.028Z"
},
"example/accessibility/demo1/README.md": {
"atime": "2021-10-17T18:08:23.633Z",
"mtime": "2021-10-17T18:08:23.229Z",
"ctime": "2021-10-17T18:08:23.229Z",
"birthtime": "2021-03-23T03:38:40.607Z"
},
"example/cross-platform/demo1/README.md": {
"atime": "2021-10-20T09:03:57.602Z",
"mtime": "2021-10-20T09:03:56.351Z",
"ctime": "2021-10-20T09:03:56.351Z",
"birthtime": "2021-03-20T18:25:54.576Z"
},
"example/data/demo1/README.md": {
"atime": "2021-10-17T18:14:29.941Z",
"mtime": "2021-10-17T18:14:29.268Z",
"ctime": "2021-10-17T18:14:29.268Z",
"birthtime": "2021-03-20T18:49:07.081Z"
},
"example/forms/demo1/README.md": {
"atime": "2021-10-17T18:14:55.235Z",
"mtime": "2021-10-17T18:14:54.782Z",
"ctime": "2021-10-17T18:14:54.782Z",
"birthtime": "2021-03-19T19:09:09.288Z"
},
"example/containers/demo1/README.md": {
"atime": "2021-10-17T18:13:50.624Z",
"mtime": "2021-10-17T18:13:50.171Z",
"ctime": "2021-10-17T18:13:50.171Z",
"birthtime": "2021-03-19T19:34:28.284Z"
},
"example/user-interface-controls/demo1/README.md": {
"atime": "2021-10-17T18:17:41.719Z",
"mtime": "2021-10-17T18:17:40.703Z",
"ctime": "2021-10-17T18:17:40.703Z",
"birthtime": "2021-03-18T17:00:24.052Z"
},
"example/user-interface-controls/demo5/README.md": {
"atime": "2021-10-17T18:18:42.062Z",
"mtime": "2021-10-17T18:18:41.666Z",
"ctime": "2021-10-17T18:18:41.666Z",
"birthtime": "2021-03-19T01:41:50.151Z"
},
"example/lists/demo1/README.md": {
"atime": "2021-10-17T18:07:19.635Z",
"mtime": "2021-10-17T18:07:19.213Z",
"ctime": "2021-10-17T18:07:19.213Z",
"birthtime": "2021-03-19T08:22:46.094Z"
},
"example/images-shapes-media/demo9/README.md": {
"atime": "2021-10-17T18:06:20.866Z",
"mtime": "2021-10-17T18:06:20.448Z",
"ctime": "2021-10-17T18:06:20.448Z",
"birthtime": "2021-03-17T05:54:49.442Z"
},
"example/alerts-and-menus/demo10/README.md": {
"atime": "2021-10-17T18:09:22.793Z",
"mtime": "2021-10-17T18:09:22.106Z",
"ctime": "2021-10-17T18:09:22.106Z",
"birthtime": "2021-03-25T17:38:57.218Z"
},
"example/alerts-and-menus/demo2/README.md": {
"atime": "2021-10-17T18:09:42.853Z",
"mtime": "2021-10-17T18:09:42.435Z",
"ctime": "2021-10-17T18:09:42.435Z",
"birthtime": "2021-03-24T02:58:56.798Z"
},
"example/alerts-and-menus/demo3/README.md": {
"atime": "2021-10-17T18:09:53.441Z",
"mtime": "2021-10-17T18:09:53.033Z",
"ctime": "2021-10-17T18:09:53.033Z",
"birthtime": "2021-03-24T02:59:07.309Z"
},
"example/alerts-and-menus/demo4/README.md": {
"atime": "2021-10-17T18:09:58.646Z",
"mtime": "2021-10-17T18:09:58.234Z",
"ctime": "2021-10-17T18:09:58.234Z",
"birthtime": "2021-03-24T03:04:35.511Z"
},
"example/alerts-and-menus/demo7/README.md": {
"atime": "2021-10-17T18:10:14.827Z",
"mtime": "2021-10-17T18:10:14.362Z",
"ctime": "2021-10-17T18:10:14.362Z",
"birthtime": "2021-03-24T03:05:11.481Z"
},
"example/alerts-and-menus/demo6/README.md": {
"atime": "2021-10-17T18:21:12.884Z",
"mtime": "2021-10-17T18:21:12.477Z",
"ctime": "2021-10-17T18:21:12.477Z",
"birthtime": "2021-03-24T03:05:03.307Z"
},
"example/alerts-and-menus/demo5/README.md": {
"atime": "2021-10-17T18:10:03.317Z",
"mtime": "2021-10-17T18:10:02.906Z",
"ctime": "2021-10-17T18:10:02.906Z",
"birthtime": "2021-03-24T03:04:46.135Z"
},
"example/alerts-and-menus/demo11/README.md": {
"atime": "2021-10-17T18:09:47.731Z",
"mtime": "2021-10-17T18:09:47.318Z",
"ctime": "2021-10-17T18:09:47.318Z",
"birthtime": "2021-03-26T18:06:45.725Z"
},
"example/alerts-and-menus/demo9/README.md": {
"atime": "2021-10-17T18:10:10.678Z",
"mtime": "2021-10-17T18:10:10.275Z",
"ctime": "2021-10-17T18:10:10.275Z",
"birthtime": "2021-03-24T03:05:32.120Z"
},
"example/alerts-and-menus/demo8/README.md": {
"atime": "2021-10-17T18:10:06.350Z",
"mtime": "2021-10-17T18:10:05.881Z",
"ctime": "2021-10-17T18:10:05.881Z",
"birthtime": "2021-03-24T03:05:19.346Z"
},
"example/appendix-a/demo10/README.md": {
"atime": "2021-10-17T18:11:14.139Z",
"mtime": "2021-10-17T18:11:13.713Z",
"ctime": "2021-10-17T18:11:13.713Z",
"birthtime": "2021-03-23T07:55:32.569Z"
},
"example/appendix-a/demo14/README.md": {
"atime": "2021-10-17T18:11:36.712Z",
"mtime": "2021-10-17T18:11:36.239Z",
"ctime": "2021-10-17T18:11:36.239Z",
"birthtime": "2021-03-23T07:56:01.681Z"
},
"example/appendix-a/demo11/README.md": {
"atime": "2021-10-17T18:11:18.986Z",
"mtime": "2021-10-17T18:11:18.582Z",
"ctime": "2021-10-17T18:11:18.582Z",
"birthtime": "2021-03-23T07:55:41.530Z"
},
"example/appendix-a/demo4/README.md": {
"atime": "2021-10-17T18:11:52.244Z",
"mtime": "2021-10-17T18:11:51.834Z",
"ctime": "2021-10-17T18:11:51.834Z",
"birthtime": "2021-03-23T07:54:36.267Z"
},
"example/animation/demo10/README.md": {
"atime": "2021-10-17T18:10:23.776Z",
"mtime": "2021-10-17T18:10:23.370Z",
"ctime": "2021-10-17T18:10:23.370Z",
"birthtime": "2021-03-16T11:01:05.985Z"
},
"example/animation/demo1/README.md": {
"atime": "2021-10-17T18:10:18.298Z",
"mtime": "2021-10-17T18:10:17.894Z",
"ctime": "2021-10-17T18:10:17.894Z",
"birthtime": "2021-03-16T08:52:06.171Z"
},
"example/animation/demo11/README.md": {
"atime": "2021-10-17T18:10:28.416Z",
"mtime": "2021-10-17T18:10:28.016Z",
"ctime": "2021-10-17T18:10:28.016Z",
"birthtime": "2021-03-16T11:04:39.446Z"
},
"example/appendix-a/demo9/README.md": {
"atime": "2021-10-17T18:12:14.960Z",
"mtime": "2021-10-17T18:12:14.526Z",
"ctime": "2021-10-17T18:12:14.526Z",
"birthtime": "2021-03-23T07:55:20.981Z"
},
"example/animation/demo12/README.md": {
"atime": "2021-10-17T18:13:04.097Z",
"mtime": "2021-10-17T18:13:02.855Z",
"ctime": "2021-10-17T18:13:02.855Z",
"birthtime": "2021-03-16T11:13:19.197Z"
},
"example/animation/demo2/README.md": {
"atime": "2021-10-17T18:10:35.203Z",
"mtime": "2021-10-17T18:10:34.779Z",
"ctime": "2021-10-17T18:10:34.779Z",
"birthtime": "2021-03-16T09:40:08.147Z"
},
"example/appendix-a/demo13/README.md": {
"atime": "2021-10-17T18:11:30.254Z",
"mtime": "2021-10-17T18:11:29.796Z",
"ctime": "2021-10-17T18:11:29.796Z",
"birthtime": "2021-03-23T07:55:54.819Z"
},
"example/animation/demo3/README.md": {
"atime": "2021-10-17T18:10:38.458Z",
"mtime": "2021-10-17T18:10:37.424Z",
"ctime": "2021-10-17T18:10:37.424Z",
"birthtime": "2021-03-16T10:10:49.712Z"
},
"example/animation/demo13/README.md": {
"atime": "2021-10-17T18:10:31.657Z",
"mtime": "2021-10-17T18:10:31.251Z",
"ctime": "2021-10-17T18:10:31.251Z",
"birthtime": "2021-03-16T14:13:16.574Z"
},
"example/animation/demo5/README.md": {
"atime": "2021-10-17T18:10:52.942Z",
"mtime": "2021-10-17T18:10:52.514Z",
"ctime": "2021-10-17T18:10:52.514Z",
"birthtime": "2021-03-16T10:27:06.443Z"
},
"example/animation/demo7/README.md": {
"atime": "2021-10-17T18:10:59.036Z",
"mtime": "2021-10-17T18:10:58.586Z",
"ctime": "2021-10-17T18:10:58.586Z",
"birthtime": "2021-03-16T10:37:27.553Z"
},
"example/animation/demo6/README.md": {
"atime": "2021-10-17T18:10:55.758Z",
"mtime": "2021-10-17T18:10:55.355Z",
"ctime": "2021-10-17T18:10:55.355Z",
"birthtime": "2021-03-16T10:31:56.922Z"
},
"example/animation/demo8/README.md": {
"atime": "2021-10-17T18:11:01.923Z",
"mtime": "2021-10-17T18:11:01.434Z",
"ctime": "2021-10-17T18:11:01.434Z",
"birthtime": "2021-03-16T10:42:07.670Z"
},
"example/animation/demo9/README.md": {
"atime": "2021-10-17T18:11:05.094Z",
"mtime": "2021-10-17T18:11:04.609Z",
"ctime": "2021-10-17T18:11:04.609Z",
"birthtime": "2021-03-16T10:54:05.405Z"
},
"example/appendix-a/demo12/README.md": {
"atime": "2021-10-17T18:11:25.591Z",
"mtime": "2021-10-17T18:11:25.112Z",
"ctime": "2021-10-17T18:11:25.112Z",
"birthtime": "2021-03-23T07:55:47.708Z"
},
"example/advanced-state/demo2/README.md": {
"atime": "2021-10-17T18:08:46.127Z",
"mtime": "2021-10-17T18:08:45.634Z",
"ctime": "2021-10-17T18:08:45.634Z",
"birthtime": "2021-03-15T17:53:01.032Z"
},
"example/advanced-state/demo1/README.md": {
"atime": "2021-10-17T18:09:28.495Z",
"mtime": "2021-10-17T18:09:28.072Z",
"ctime": "2021-10-17T18:09:28.072Z",
"birthtime": "2021-03-15T17:34:00.024Z"
},
"example/appendix-a/demo7/README.md": {
"atime": "2021-10-17T18:12:00.253Z",
"mtime": "2021-10-17T18:11:59.815Z",
"ctime": "2021-10-17T18:11:59.815Z",
"birthtime": "2021-03-23T07:55:04.486Z"
},
"example/advanced-state/demo5/README.md": {
"atime": "2021-10-17T18:09:05.158Z",
"mtime": "2021-10-17T18:09:03.919Z",
"ctime": "2021-10-17T18:09:03.919Z",
"birthtime": "2021-03-15T18:46:27.561Z"
},
"example/advanced-state/demo7/README.md": {
"atime": "2021-10-17T18:09:16.555Z",
"mtime": "2021-10-17T18:09:15.673Z",
"ctime": "2021-10-17T18:09:15.673Z",
"birthtime": "2021-03-15T18:55:32.303Z"
},
"example/advanced-state/demo6/README.md": {
"atime": "2021-10-17T18:09:13.432Z",
"mtime": "2021-10-17T18:09:12.358Z",
"ctime": "2021-10-17T18:09:12.358Z",
"birthtime": "2021-03-15T18:52:20.686Z"
},
"example/animation/demo4/README.md": {
"atime": "2021-10-17T18:10:42.726Z",
"mtime": "2021-10-17T18:10:42.325Z",
"ctime": "2021-10-17T18:10:42.325Z",
"birthtime": "2021-03-16T10:17:26.307Z"
},
"example/composing-views/demo1/README.md": {
"atime": "2021-10-17T18:12:27.504Z",
"mtime": "2021-10-17T18:12:26.735Z",
"ctime": "2021-10-17T18:12:26.735Z",
"birthtime": "2021-03-24T07:26:24.475Z"
},
"example/advanced-state/demo9/README.md": {
"atime": "2021-10-17T18:09:35.593Z",
"mtime": "2021-10-17T18:09:35.187Z",
"ctime": "2021-10-17T18:09:35.187Z",
"birthtime": "2021-03-15T19:11:55.947Z"
},
"example/composing-views/demo2/README.md": {
"atime": "2021-10-17T18:12:39.073Z",
"mtime": "2021-10-17T18:12:38.669Z",
"ctime": "2021-10-17T18:12:38.669Z",
"birthtime": "2021-03-24T07:26:30.537Z"
},
"example/composing-views/demo4/README.md": {
"atime": "2021-10-17T18:13:39.482Z",
"mtime": "2021-10-17T18:13:39.058Z",
"ctime": "2021-10-17T18:13:39.058Z",
"birthtime": "2021-03-24T07:26:46.238Z"
},
"example/advanced-state/demo3/README.md": {
"atime": "2021-10-17T18:09:02.083Z",
"mtime": "2021-10-17T18:09:01.323Z",
"ctime": "2021-10-17T18:09:01.323Z",
"birthtime": "2021-03-15T18:19:43.407Z"
},
"example/advanced-state/demo4/README.md": {
"atime": "2021-10-17T18:09:09.933Z",
"mtime": "2021-10-17T18:09:08.604Z",
"ctime": "2021-10-17T18:09:08.604Z",
"birthtime": "2021-03-15T18:30:06.997Z"
},
"example/composing-views/demo6/README.md": {
"atime": "2021-10-17T18:13:44.669Z",
"mtime": "2021-10-17T18:13:44.264Z",
"ctime": "2021-10-17T18:13:44.264Z",
"birthtime": "2021-03-24T07:27:11.552Z"
},
"example/composing-views/demo3/README.md": {
"atime": "2021-10-17T18:13:34.333Z",
"mtime": "2021-10-17T18:13:33.921Z",
"ctime": "2021-10-17T18:13:33.921Z",
"birthtime": "2021-03-24T07:26:38.836Z"
},
"example/composing-views/demo7/README.md": {
"atime": "2021-10-17T18:13:48.327Z",
"mtime": "2021-10-17T18:13:47.450Z",
"ctime": "2021-10-17T18:13:47.450Z",
"birthtime": "2021-03-24T07:27:20.152Z"
},
"example/advanced-state/demo8/README.md": {
"atime": "2021-10-17T18:09:19.068Z",
"mtime": "2021-10-17T18:09:18.338Z",
"ctime": "2021-10-17T18:09:18.338Z",
"birthtime": "2021-03-15T19:05:07.484Z"
},
"example/composing-views/demo5/README.md": {
"atime": "2021-10-17T18:13:41.939Z",
"mtime": "2021-10-17T18:13:41.522Z",
"ctime": "2021-10-17T18:13:41.522Z",
"birthtime": "2021-03-24T07:26:57.697Z"
},
"example/accessibility/demo5/README.md": {
"atime": "2021-10-17T18:08:32.116Z",
"mtime": "2021-10-17T18:08:30.876Z",
"ctime": "2021-10-17T18:08:30.876Z",
"birthtime": "2021-03-23T03:38:54.921Z"
},
"example/accessibility/demo2/README.md": {
"atime": "2021-10-17T18:08:41.092Z",
"mtime": "2021-10-17T18:08:40.689Z",
"ctime": "2021-10-17T18:08:40.689Z",
"birthtime": "2021-03-23T03:38:47.051Z"
},
"example/accessibility/demo3/README.md": {
"atime": "2021-10-17T18:08:28.002Z",
"mtime": "2021-10-17T18:08:27.495Z",
"ctime": "2021-10-17T18:08:27.495Z",
"birthtime": "2021-03-23T03:38:49.550Z"
},
"example/accessibility/demo6/README.md": {
"atime": "2021-10-17T18:08:58.063Z",
"mtime": "2021-10-17T18:08:56.864Z",
"ctime": "2021-10-17T18:08:56.864Z",
"birthtime": "2021-03-23T03:38:57.311Z"
},
"example/cross-platform/demo2/README.md": {
"atime": "2021-10-20T10:58:49.065Z",
"mtime": "2021-10-20T10:58:48.659Z",
"ctime": "2021-10-20T10:58:48.659Z",
"birthtime": "2021-03-20T18:26:00.779Z"
},
"example/data/demo10/README.md": {
"atime": "2021-10-17T18:14:32.110Z",
"mtime": "2021-10-17T18:14:31.493Z",
"ctime": "2021-10-17T18:14:31.493Z",
"birthtime": "2021-03-20T18:50:13.254Z"
},
"example/data/demo11/README.md": {
"atime": "2021-10-17T18:14:34.441Z",
"mtime": "2021-10-17T18:14:33.756Z",
"ctime": "2021-10-17T18:14:33.756Z",
"birthtime": "2021-03-20T18:50:20.938Z"
},
"example/cross-platform/demo3/README.md": {
"atime": "2021-10-20T10:58:44.871Z",
"mtime": "2021-10-20T10:58:43.595Z",
"ctime": "2021-10-20T10:58:43.595Z",
"birthtime": "2021-03-20T18:26:03.527Z"
},
"example/cross-platform/demo4/README.md": {
"atime": "2021-10-20T11:53:57.081Z",
"mtime": "2021-10-20T11:53:55.432Z",
"ctime": "2021-10-20T11:53:55.432Z",
"birthtime": "2021-03-20T18:26:06.161Z"
},
"example/data/demo2/README.md": {
"atime": "2021-10-17T18:14:36.464Z",
"mtime": "2021-10-17T18:14:36.001Z",
"ctime": "2021-10-17T18:14:36.001Z",
"birthtime": "2021-03-20T18:49:12.708Z"
},
"example/accessibility/demo4/README.md": {
"atime": "2021-10-17T18:08:38.089Z",
"mtime": "2021-10-17T18:08:37.618Z",
"ctime": "2021-10-17T18:08:37.618Z",
"birthtime": "2021-03-23T03:38:52.048Z"
},
"example/data/demo3/README.md": {
"atime": "2021-10-17T18:14:38.948Z",
"mtime": "2021-10-17T18:14:38.132Z",
"ctime": "2021-10-17T18:14:38.132Z",
"birthtime": "2021-03-20T18:49:21.503Z"
},
"example/data/demo12/README.md": {
"atime": "2021-10-20T16:11:43.990Z",
"mtime": "2021-10-20T16:11:12.601Z",
"ctime": "2021-10-20T16:11:12.601Z",
"birthtime": "2021-10-20T16:01:08.839Z"
},
"example/data/demo6/README.md": {
"atime": "2021-10-17T18:14:45.136Z",
"mtime": "2021-10-17T18:14:44.772Z",
"ctime": "2021-10-17T18:14:44.772Z",
"birthtime": "2021-03-20T18:49:51.821Z"
},
"example/data/demo4/README.md": {
"atime": "2021-10-17T18:14:41.129Z",
"mtime": "2021-10-17T18:14:40.617Z",
"ctime": "2021-10-17T18:14:40.617Z",
"birthtime": "2021-03-20T18:49:36.027Z"
},
"example/data/demo7/README.md": {
"atime": "2021-10-17T18:14:47.645Z",
"mtime": "2021-10-17T18:14:47.018Z",
"ctime": "2021-10-17T18:14:47.018Z",
"birthtime": "2021-03-20T18:49:59.453Z"
},
"example/drawing/demo1/README.md": {
"atime": "2021-10-17T18:19:47.875Z",
"mtime": "2021-10-17T18:19:47.472Z",
"ctime": "2021-10-17T18:19:47.472Z",
"birthtime": "2021-03-16T08:31:03.904Z"
},
"example/data/demo8/README.md": {
"atime": "2021-10-17T18:14:50.426Z",
"mtime": "2021-10-17T18:14:49.594Z",
"ctime": "2021-10-17T18:14:49.594Z",
"birthtime": "2021-03-21T19:38:49.281Z"
},
"example/data/demo5/README.md": {
"atime": "2021-10-17T18:14:43.131Z",
"mtime": "2021-10-17T18:14:42.712Z",
"ctime": "2021-10-17T18:14:42.712Z",
"birthtime": "2021-03-20T18:49:43.900Z"
},
"example/drawing/demo2/README.md": {
"atime": "2021-10-17T18:19:52.352Z",
"mtime": "2021-10-17T18:19:51.491Z",
"ctime": "2021-10-17T18:19:51.491Z",
"birthtime": "2021-03-16T08:39:52.789Z"
},
"example/drawing/demo3/README.md": {
"atime": "2021-10-17T18:20:01.210Z",
"mtime": "2021-10-17T18:19:59.967Z",
"ctime": "2021-10-17T18:19:59.967Z",
"birthtime": "2021-03-16T08:43:45.105Z"
},
"example/drawing/demo4/README.md": {
"atime": "2021-10-17T18:19:56.217Z",
"mtime": "2021-10-17T18:19:55.159Z",
"ctime": "2021-10-17T18:19:55.159Z",
"birthtime": "2021-03-16T08:49:12.442Z"
},
"example/forms/demo3/README.md": {
"atime": "2021-10-17T18:15:00.630Z",
"mtime": "2021-10-17T18:15:00.007Z",
"ctime": "2021-10-17T18:15:00.007Z",
"birthtime": "2021-03-19T19:09:50.697Z"
},
"example/forms/demo2/README.md": {
"atime": "2021-10-17T18:15:18.884Z",
"mtime": "2021-10-17T18:15:18.431Z",
"ctime": "2021-10-17T18:15:18.431Z",
"birthtime": "2021-03-19T19:09:14.642Z"
},
"example/forms/demo4/README.md": {
"atime": "2021-10-17T18:15:02.785Z",
"mtime": "2021-10-17T18:15:02.223Z",
"ctime": "2021-10-17T18:15:02.223Z",
"birthtime": "2021-03-19T19:09:54.140Z"
},
"example/forms/demo5/README.md": {
"atime": "2021-10-17T18:15:06.160Z",
"mtime": "2021-10-17T18:15:04.954Z",
"ctime": "2021-10-17T18:15:04.954Z",
"birthtime": "2021-03-19T19:09:57.310Z"
},
"example/data/demo9/README.md": {
"atime": "2021-10-17T18:14:52.757Z",
"mtime": "2021-10-17T18:14:52.129Z",
"ctime": "2021-10-17T18:14:52.129Z",
"birthtime": "2021-03-20T18:50:06.759Z"
},
"example/introduction/demo1/README.md": {
"atime": "2021-11-03T01:07:58.638Z",
"mtime": "2021-11-03T01:07:56.874Z",
"ctime": "2021-11-03T01:07:56.874Z",
"birthtime": "2021-11-02T08:53:29.583Z"
},
"example/forms/demo6/README.md": {
"atime": "2021-10-17T18:15:15.865Z",
"mtime": "2021-10-17T18:15:15.436Z",
"ctime": "2021-10-17T18:15:15.436Z",
"birthtime": "2021-03-19T19:10:00.869Z"
},
"example/images-shapes-media/demo1/README.md": {
"atime": "2021-10-20T03:06:11.664Z",
"mtime": "2021-10-20T03:06:09.738Z",
"ctime": "2021-10-20T03:06:09.738Z",
"birthtime": "2021-03-16T16:17:37.777Z"
},
"example/images-shapes-media/demo10/README.md": {
"atime": "2021-10-17T18:06:26.827Z",
"mtime": "2021-10-17T18:06:26.216Z",
"ctime": "2021-10-17T18:06:26.216Z",
"birthtime": "2021-03-17T06:08:37.571Z"
},
"example/images-shapes-media/demo11/README.md": {
"atime": "2021-10-17T18:06:52.542Z",
"mtime": "2021-10-17T18:06:52.140Z",
"ctime": "2021-10-17T18:06:52.140Z",
"birthtime": "2021-03-17T06:17:39.317Z"
},
"example/images-shapes-media/demo12/README.md": {
"atime": "2021-10-17T18:07:00.521Z",
"mtime": "2021-10-17T18:07:00.115Z",
"ctime": "2021-10-17T18:07:00.115Z",
"birthtime": "2021-03-17T07:09:24.483Z"
},
"example/images-shapes-media/demo3/README.md": {
"atime": "2021-10-17T18:06:05.454Z",
"mtime": "2021-10-17T18:06:05.049Z",
"ctime": "2021-10-17T18:06:05.049Z",
"birthtime": "2021-03-16T16:49:30.076Z"
},
"example/images-shapes-media/demo5/README.md": {
"atime": "2021-10-17T18:05:52.971Z",
"mtime": "2021-10-17T18:05:52.558Z",
"ctime": "2021-10-17T18:05:52.558Z",
"birthtime": "2021-03-16T17:03:00.279Z"
},
"example/images-shapes-media/demo14/README.md": {
"atime": "2021-10-20T12:30:57.767Z",
"mtime": "2021-10-20T12:30:53.191Z",
"ctime": "2021-10-20T12:30:53.191Z",
"birthtime": "2021-10-20T08:49:55.016Z"
},
"example/images-shapes-media/demo13/README.md": {
"atime": "2021-10-20T08:47:27.931Z",
"mtime": "2021-10-20T08:47:25.688Z",
"ctime": "2021-10-20T08:47:25.688Z",
"birthtime": "2021-10-20T03:07:30.921Z"
},
"example/images-shapes-media/demo4/README.md": {
"atime": "2021-10-17T18:05:58.804Z",
"mtime": "2021-10-17T18:05:58.400Z",
"ctime": "2021-10-17T18:05:58.400Z",
"birthtime": "2021-03-16T16:55:41.005Z"
},
"example/images-shapes-media/demo8/README.md": {
"atime": "2021-10-17T18:05:43.904Z",
"mtime": "2021-10-17T18:05:04.654Z",
"ctime": "2021-10-17T18:05:04.654Z",
"birthtime": "2021-03-17T04:43:26.574Z"
},
"example/introduction/demo2/README.md": {
"atime": "2021-11-27T12:20:57.605Z",
"mtime": "2021-11-27T12:20:55.705Z",
"ctime": "2021-11-27T12:20:55.705Z",
"birthtime": "2021-11-27T12:20:55.705Z"
},
"example/images-shapes-media/demo2/README.md": {
"atime": "2021-10-17T18:06:09.956Z",
"mtime": "2021-10-17T18:06:09.528Z",
"ctime": "2021-10-17T18:06:09.528Z",
"birthtime": "2021-03-16T16:36:35.365Z"
},
"example/presenting-views/demo1/README.md": {
"atime": "2021-10-17T18:22:18.948Z",
"mtime": "2021-10-17T18:22:18.460Z",
"ctime": "2021-10-17T18:22:18.460Z",
"birthtime": "2021-03-16T01:28:47.232Z"
},
"example/presenting-views/demo2/README.md": {
"atime": "2021-10-17T18:22:27.108Z",
"mtime": "2021-10-17T18:22:26.667Z",
"ctime": "2021-10-17T18:22:26.667Z",
"birthtime": "2021-03-16T01:39:07.934Z"
},
"example/images-shapes-media/demo7/README.md": {
"atime": "2021-10-17T18:05:41.377Z",
"mtime": "2021-10-17T18:05:40.187Z",
"ctime": "2021-10-17T18:05:40.187Z",
"birthtime": "2021-03-17T04:20:29.224Z"
},
"example/presenting-views/demo5/README.md": {
"atime": "2021-10-17T18:24:42.254Z",
"mtime": "2021-10-17T18:24:41.823Z",
"ctime": "2021-10-17T18:24:41.823Z",
"birthtime": "2021-03-16T03:19:27.977Z"
},
"example/images-shapes-media/demo6/README.md": {
"atime": "2021-10-17T18:05:48.352Z",
"mtime": "2021-10-17T18:05:47.316Z",
"ctime": "2021-10-17T18:05:47.316Z",
"birthtime": "2021-03-17T04:07:40.398Z"
},
"example/presenting-views/demo4/README.md": {
"atime": "2021-10-17T18:24:31.380Z",
"mtime": "2021-10-17T18:24:15.000Z",
"ctime": "2021-10-17T18:24:15.000Z",
"birthtime": "2021-03-16T01:56:52.645Z"
},
"example/presenting-views/demo6/README.md": {
"atime": "2021-10-17T18:25:00.499Z",
"mtime": "2021-10-17T18:25:00.063Z",
"ctime": "2021-10-17T18:25:00.063Z",
"birthtime": "2021-03-16T03:26:53.266Z"
},
"example/responding-to-events/demo1/README.md": {
"atime": "2021-10-17T18:15:40.958Z",
"mtime": "2021-10-17T18:15:40.542Z",
"ctime": "2021-10-17T18:15:40.542Z",
"birthtime": "2021-03-19T07:24:42.470Z"
},
"example/responding-to-events/demo3/README.md": {
"atime": "2021-10-17T18:15:45.976Z",
"mtime": "2021-10-17T18:15:45.436Z",
"ctime": "2021-10-17T18:15:45.436Z",
"birthtime": "2021-03-19T07:34:56.077Z"
},
"example/responding-to-events/demo4/README.md": {
"atime": "2021-10-17T18:15:55.477Z",
"mtime": "2021-10-17T18:15:55.029Z",
"ctime": "2021-10-17T18:15:55.029Z",
"birthtime": "2021-03-19T07:43:24.209Z"
},
"example/responding-to-events/demo5/README.md": {
"atime": "2021-10-17T18:16:00.051Z",
"mtime": "2021-10-17T18:15:59.202Z",
"ctime": "2021-10-17T18:15:59.202Z",
"birthtime": "2021-03-19T07:51:51.822Z"
},
"example/responding-to-events/demo7/README.md": {
"atime": "2021-10-17T18:16:05.183Z",
"mtime": "2021-10-17T18:16:04.472Z",
"ctime": "2021-10-17T18:16:04.472Z",
"birthtime": "2021-03-19T08:13:54.805Z"
},
"example/responding-to-events/demo8/README.md": {
"atime": "2021-10-20T15:16:13.691Z",
"mtime": "2021-10-20T15:16:10.580Z",
"ctime": "2021-10-20T15:16:10.580Z",
"birthtime": "2021-10-20T15:00:59.271Z"
},
"example/responding-to-events/demo6/README.md": {
"atime": "2021-10-17T18:16:02.516Z",
"mtime": "2021-10-17T18:16:01.823Z",
"ctime": "2021-10-17T18:16:01.823Z",
"birthtime": "2021-03-19T08:00:37.944Z"
},
"example/stacks-grids-scrollviews/demo10/README.md": {
"atime": "2021-10-17T18:16:09.719Z",
"mtime": "2021-10-17T18:16:09.273Z",
"ctime": "2021-10-17T18:16:09.273Z",
"birthtime": "2021-03-18T06:52:59.901Z"
},
"example/stacks-grids-scrollviews/demo11/README.md": {
"atime": "2021-10-17T18:16:14.058Z",
"mtime": "2021-10-17T18:16:13.657Z",
"ctime": "2021-10-17T18:16:13.657Z",
"birthtime": "2021-03-18T07:02:13.257Z"
},
"example/stacks-grids-scrollviews/demo12/README.md": {
"atime": "2021-10-17T18:16:16.514Z",
"mtime": "2021-10-17T18:16:15.891Z",
"ctime": "2021-10-17T18:16:15.891Z",
"birthtime": "2021-03-18T07:08:43.266Z"
},
"example/presenting-views/demo3/README.md": {
"atime": "2021-10-17T18:22:34.494Z",
"mtime": "2021-10-17T18:22:34.084Z",
"ctime": "2021-10-17T18:22:34.084Z",
"birthtime": "2021-03-16T01:49:07.614Z"
},
"example/stacks-grids-scrollviews/demo13/README.md": {
"atime": "2021-10-17T18:16:19.128Z",
"mtime": "2021-10-17T18:16:18.691Z",
"ctime": "2021-10-17T18:16:18.691Z",
"birthtime": "2021-03-18T07:22:58.558Z"
},
"example/stacks-grids-scrollviews/demo14/README.md": {
"atime": "2021-10-20T13:32:54.323Z",
"mtime": "2021-10-20T13:32:52.412Z",
"ctime": "2021-10-20T13:32:52.412Z",
"birthtime": "2021-03-29T01:02:00.702Z"
},
"example/stacks-grids-scrollviews/demo2/README.md": {
"atime": "2021-10-17T18:16:24.906Z",
"mtime": "2021-10-17T18:16:24.271Z",
"ctime": "2021-10-17T18:16:24.271Z",
"birthtime": "2021-03-17T08:33:06.142Z"
},
"example/stacks-grids-scrollviews/demo3/README.md": {
"atime": "2021-10-17T18:16:27.323Z",
"mtime": "2021-10-17T18:16:26.542Z",
"ctime": "2021-10-17T18:16:26.542Z",
"birthtime": "2021-03-17T08:39:15.696Z"
},
"example/stacks-grids-scrollviews/demo4/README.md": {
"atime": "2021-10-17T18:16:29.461Z",
"mtime": "2021-10-17T18:16:28.833Z",
"ctime": "2021-10-17T18:16:28.833Z",
"birthtime": "2021-03-17T08:45:17.767Z"
},
"example/responding-to-events/demo2/README.md": {
"atime": "2021-10-17T18:15:43.461Z",
"mtime": "2021-10-17T18:15:43.071Z",
"ctime": "2021-10-17T18:15:43.071Z",
"birthtime": "2021-03-19T07:30:41.457Z"
},
"example/stacks-grids-scrollviews/demo5/README.md": {
"atime": "2021-10-17T18:26:11.490Z",
"mtime": "2021-10-17T18:26:11.068Z",
"ctime": "2021-10-17T18:26:11.068Z",
"birthtime": "2021-03-17T08:48:45.612Z"
},
"example/stacks-grids-scrollviews/demo6/README.md": {
"atime": "2021-10-17T18:16:31.516Z",
"mtime": "2021-10-17T18:16:30.895Z",
"ctime": "2021-10-17T18:16:30.895Z",
"birthtime": "2021-03-17T08:58:09.782Z"
},
"example/stacks-grids-scrollviews/demo7/README.md": {
"atime": "2021-10-17T18:16:34.066Z",
"mtime": "2021-10-17T18:16:33.404Z",
"ctime": "2021-10-17T18:16:33.404Z",
"birthtime": "2021-03-18T05:53:04.755Z"
},
"example/taps-and-gestures/demo2/README.md": {
"atime": "2021-10-17T18:16:53.416Z",
"mtime": "2021-10-17T18:16:52.614Z",
"ctime": "2021-10-17T18:16:52.614Z",
"birthtime": "2021-03-24T05:10:59.502Z"
},
"example/stacks-grids-scrollviews/demo9/README.md": {
"atime": "2021-10-17T18:16:48.188Z",
"mtime": "2021-10-17T18:16:47.792Z",
"ctime": "2021-10-17T18:16:47.792Z",
"birthtime": "2021-03-18T06:33:58.849Z"
},
"example/taps-and-gestures/demo1/README.md": {
"atime": "2021-10-17T18:16:50.902Z",
"mtime": "2021-10-17T18:16:50.236Z",
"ctime": "2021-10-17T18:16:50.236Z",
"birthtime": "2021-03-24T05:10:52.985Z"
},
"example/stacks-grids-scrollviews/demo15/README.md": {
"atime": "2021-10-20T13:33:20.444Z",
"mtime": "2021-10-20T13:33:18.407Z",
"ctime": "2021-10-20T13:33:18.407Z",
"birthtime": "2021-10-20T13:20:35.457Z"
},
"example/stacks-grids-scrollviews/demo8/README.md": {
"atime": "2021-10-17T18:16:38.364Z",
"mtime": "2021-10-17T18:16:37.962Z",
"ctime": "2021-10-17T18:16:37.962Z",
"birthtime": "2021-03-18T06:17:58.906Z"
},
"example/taps-and-gestures/demo3/README.md": {
"atime": "2021-10-17T18:16:57.087Z",
"mtime": "2021-10-17T18:16:56.642Z",
"ctime": "2021-10-17T18:16:56.642Z",
"birthtime": "2021-03-24T05:11:10.286Z"
},
"example/taps-and-gestures/demo4/README.md": {
"atime": "2021-10-17T18:16:59.604Z",
"mtime": "2021-10-17T18:16:59.032Z",
"ctime": "2021-10-17T18:16:59.032Z",
"birthtime": "2021-03-24T05:13:26.229Z"
},
"example/taps-and-gestures/demo6/README.md": {
"atime": "2021-10-17T18:17:07.246Z",
"mtime": "2021-10-17T18:17:06.847Z",
"ctime": "2021-10-17T18:17:06.847Z",
"birthtime": "2021-03-24T05:13:47.639Z"
},
"example/taps-and-gestures/demo7/README.md": {
"atime": "2021-10-17T18:17:33.661Z",
"mtime": "2021-10-17T18:17:33.008Z",
"ctime": "2021-10-17T18:17:33.008Z",
"birthtime": "2021-03-24T05:13:56.665Z"
},
"example/taps-and-gestures/demo5/README.md": {
"atime": "2021-10-17T18:17:03.226Z",
"mtime": "2021-10-17T18:17:02.772Z",
"ctime": "2021-10-17T18:17:02.772Z",
"birthtime": "2021-03-24T05:13:33.377Z"
},
"example/taps-and-gestures/demo8/README.md": {
"atime": "2021-10-17T18:17:11.711Z",
"mtime": "2021-10-17T18:17:11.228Z",
"ctime": "2021-10-17T18:17:11.228Z",
"birthtime": "2021-03-24T05:14:08.876Z"
},
"example/taps-and-gestures/demo9/README.md": {
"atime": "2021-10-17T18:17:14.964Z",
"mtime": "2021-10-17T18:17:14.562Z",
"ctime": "2021-10-17T18:17:14.562Z",
"birthtime": "2021-03-24T05:14:17.470Z"
},
"example/responding-to-events/demo9/README.md": {
"atime": "2021-10-20T15:55:55.803Z",
"mtime": "2021-10-20T15:55:54.565Z",
"ctime": "2021-10-20T15:55:54.565Z",
"birthtime": "2021-10-20T15:16:54.749Z"
},
"example/tooling/demo6/README.md": {
"atime": "2021-11-05T06:40:20.442Z",
"mtime": "2021-11-05T06:40:18.535Z",
"ctime": "2021-11-05T06:40:18.535Z",
"birthtime": "2021-04-07T09:16:43.975Z"
},
"example/tooling/demo1/README.md": {
"atime": "2021-10-17T18:17:18.334Z",
"mtime": "2021-10-17T18:17:17.564Z",
"ctime": "2021-10-17T18:17:17.564Z",
"birthtime": "2021-03-24T08:07:54.308Z"
},
"example/tooling/demo2/README.md": {
"atime": "2021-10-17T18:17:20.358Z",
"mtime": "2021-10-17T18:17:20.016Z",
"ctime": "2021-10-17T18:17:20.016Z",
"birthtime": "2021-03-24T08:08:00.086Z"
},
"example/tooling/demo5/README.md": {
"atime": "2021-10-17T18:17:31.389Z",
"mtime": "2021-10-17T18:17:30.684Z",
"ctime": "2021-10-17T18:17:30.684Z",
"birthtime": "2021-03-24T08:08:21.119Z"
},
"example/tooling/demo3/README.md": {
"atime": "2021-10-17T18:17:23.509Z",
"mtime": "2021-10-17T18:17:22.637Z",
"ctime": "2021-10-17T18:17:22.637Z",
"birthtime": "2021-03-24T08:08:07.143Z"
},
"example/stacks-grids-scrollviews/demo1/README.md": {
"atime": "2021-10-17T18:16:07.577Z",
"mtime": "2021-10-17T18:16:06.944Z",
"ctime": "2021-10-17T18:16:06.944Z",
"birthtime": "2021-03-17T08:26:27.605Z"
},
"example/tooling/demo4/README.md": {
"atime": "2021-10-17T18:17:26.675Z",
"mtime": "2021-10-17T18:17:25.657Z",
"ctime": "2021-10-17T18:17:25.657Z",
"birthtime": "2021-03-24T08:08:13.654Z"
},
"example/containers/demo2/README.md": {
"atime": "2021-10-17T18:14:00.145Z",
"mtime": "2021-10-17T18:13:59.097Z",
"ctime": "2021-10-17T18:13:59.097Z",
"birthtime": "2021-03-19T19:34:40.272Z"
},
"example/tooling/demo9/README.md": {
"atime": "2021-11-05T05:01:35.137Z",
"mtime": "2021-11-05T05:01:34.707Z",
"ctime": "2021-11-05T05:01:34.707Z",
"birthtime": "2021-11-05T04:46:35.873Z"
},
"example/containers/demo10/README.md": {
"atime": "2021-10-17T18:13:53.806Z",
"mtime": "2021-10-17T18:13:53.357Z",
"ctime": "2021-10-17T18:13:53.357Z",
"birthtime": "2021-03-19T19:36:16.802Z"
},
"example/containers/demo3/README.md": {
"atime": "2021-10-17T18:14:02.850Z",
"mtime": "2021-10-17T18:14:01.940Z",
"ctime": "2021-10-17T18:14:01.940Z",
"birthtime": "2021-03-19T19:35:54.691Z"
},
"example/containers/demo5/README.md": {
"atime": "2021-10-17T18:14:08.085Z",
"mtime": "2021-10-17T18:14:07.304Z",
"ctime": "2021-10-17T18:14:07.304Z",
"birthtime": "2021-03-19T19:36:00.551Z"
},
"example/containers/demo6/README.md": {
"atime": "2021-10-17T18:14:10.366Z",
"mtime": "2021-10-17T18:14:09.916Z",
"ctime": "2021-10-17T18:14:09.916Z",
"birthtime": "2021-03-19T19:36:04.314Z"
},
"example/containers/demo4/README.md": {
"atime": "2021-10-17T18:14:05.255Z",
"mtime": "2021-10-17T18:14:04.696Z",
"ctime": "2021-10-17T18:14:04.696Z",
"birthtime": "2021-03-19T19:35:57.865Z"
},
"example/containers/demo11/README.md": {
"atime": "2021-10-17T18:13:57.398Z",
"mtime": "2021-10-17T18:13:56.360Z",
"ctime": "2021-10-17T18:13:56.360Z",
"birthtime": "2021-03-26T09:36:53.458Z"
},
"example/containers/demo8/README.md": {
"atime": "2021-10-17T18:20:14.906Z",
"mtime": "2021-10-17T18:20:13.931Z",
"ctime": "2021-10-17T18:20:13.931Z",
"birthtime": "2021-03-19T19:36:09.985Z"
},
"example/containers/demo9/README.md": {
"atime": "2021-10-17T18:14:16.152Z",
"mtime": "2021-10-17T18:14:15.663Z",
"ctime": "2021-10-17T18:14:15.663Z",
"birthtime": "2021-03-19T19:36:13.254Z"
},
"example/containers/demo7/README.md": {
"atime": "2021-10-17T18:14:13.178Z",
"mtime": "2021-10-17T18:14:12.513Z",
"ctime": "2021-10-17T18:14:12.513Z",
"birthtime": "2021-03-19T19:36:06.931Z"
},
"example/transforming-views/demo10/README.md": {
"atime": "2021-10-17T18:28:48.766Z",
"mtime": "2021-10-17T18:28:48.341Z",
"ctime": "2021-10-17T18:28:48.341Z",
"birthtime": "2021-03-16T04:39:32.150Z"
},
"example/transforming-views/demo1/README.md": {
"atime": "2021-10-17T18:27:34.656Z",
"mtime": "2021-10-17T18:27:33.436Z",
"ctime": "2021-10-17T18:27:33.436Z",
"birthtime": "2021-03-16T03:40:33.450Z"
},
"example/transforming-views/demo12/README.md": {
"atime": "2021-10-17T18:29:01.650Z",
"mtime": "2021-10-17T18:29:01.209Z",
"ctime": "2021-10-17T18:29:01.209Z",
"birthtime": "2021-03-16T04:50:01.501Z"
},
"example/transforming-views/demo11/README.md": {
"atime": "2021-10-17T18:28:53.964Z",
"mtime": "2021-10-17T18:28:53.551Z",
"ctime": "2021-10-17T18:28:53.551Z",
"birthtime": "2021-03-16T04:44:43.252Z"
},
"example/tooling/demo8/README.md": {
"atime": "2021-11-05T04:48:51.817Z",
"mtime": "2021-11-05T04:48:26.559Z",
"ctime": "2021-11-05T04:48:26.559Z",
"birthtime": "2021-11-05T04:34:34.388Z"
},
"example/transforming-views/demo15/README.md": {
"atime": "2021-10-17T18:29:26.338Z",
"mtime": "2021-10-17T18:29:22.798Z",
"ctime": "2021-10-17T18:29:22.798Z",
"birthtime": "2021-03-16T05:00:45.860Z"
},
"example/transforming-views/demo13/README.md": {
"atime": "2021-10-17T18:29:07.377Z",
"mtime": "2021-10-17T18:29:06.974Z",
"ctime": "2021-10-17T18:29:06.974Z",
"birthtime": "2021-03-16T04:53:41.146Z"
},
"example/transforming-views/demo17/README.md": {
"atime": "2021-10-17T18:29:43.723Z",
"mtime": "2021-10-17T18:29:42.427Z",
"ctime": "2021-10-17T18:29:42.427Z",
"birthtime": "2021-03-16T05:13:35.945Z"
},
"example/transforming-views/demo14/README.md": {
"atime": "2021-10-17T18:29:15.753Z",
"mtime": "2021-10-17T18:29:15.342Z",
"ctime": "2021-10-17T18:29:15.342Z",
"birthtime": "2021-03-16T04:57:02.790Z"
},
"example/transforming-views/demo2/README.md": {
"atime": "2021-10-17T18:27:41.148Z",
"mtime": "2021-10-17T18:27:40.734Z",
"ctime": "2021-10-17T18:27:40.734Z",
"birthtime": "2021-03-16T03:50:21.393Z"
},
"example/transforming-views/demo18/README.md": {
"atime": "2021-10-17T18:29:54.719Z",
"mtime": "2021-10-17T18:29:52.869Z",
"ctime": "2021-10-17T18:29:52.869Z",
"birthtime": "2021-03-16T05:17:15.413Z"
},
"example/transforming-views/demo16/README.md": {
"atime": "2021-10-17T18:29:36.753Z",
"mtime": "2021-10-17T18:29:36.343Z",
"ctime": "2021-10-17T18:29:36.343Z",
"birthtime": "2021-03-16T05:06:31.556Z"
},
"example/transforming-views/demo20/README.md": {
"atime": "2021-10-17T18:30:09.330Z",
"mtime": "2021-10-17T18:30:08.893Z",
"ctime": "2021-10-17T18:30:08.893Z",
"birthtime": "2021-03-16T08:19:36.423Z"
},
"example/transforming-views/demo4/README.md": {
"atime": "2021-10-17T18:17:47.651Z",
"mtime": "2021-10-17T18:17:47.184Z",
"ctime": "2021-10-17T18:17:47.184Z",
"birthtime": "2021-03-16T03:58:52.237Z"
},
"example/transforming-views/demo21/README.md": {
"atime": "2021-10-17T18:30:14.659Z",
"mtime": "2021-10-17T18:30:14.215Z",
"ctime": "2021-10-17T18:30:14.215Z",
"birthtime": "2021-03-16T08:24:03.696Z"
},
"example/transforming-views/demo3/README.md": {
"atime": "2021-10-17T18:27:47.738Z",
"mtime": "2021-10-17T18:27:47.332Z",
"ctime": "2021-10-17T18:27:47.332Z",
"birthtime": "2021-03-16T03:54:59.369Z"
},
"example/transforming-views/demo19/README.md": {
"atime": "2021-10-17T18:30:03.478Z",
"mtime": "2021-10-17T18:30:03.028Z",
"ctime": "2021-10-17T18:30:03.028Z",
"birthtime": "2021-03-16T05:22:13.158Z"
},
"example/transforming-views/demo5/README.md": {
"atime": "2021-10-17T18:27:58.165Z",
"mtime": "2021-10-17T18:27:57.743Z",
"ctime": "2021-10-17T18:27:57.743Z",
"birthtime": "2021-03-16T04:05:56.642Z"
},
"example/view-layout/demo1/README.md": {
"atime": "2021-10-17T18:19:05.976Z",
"mtime": "2021-10-17T18:19:05.001Z",
"ctime": "2021-10-17T18:19:05.001Z",
"birthtime": "2021-03-17T07:18:49.547Z"
},
"example/transforming-views/demo7/README.md": {
"atime": "2021-10-17T18:28:19.644Z",
"mtime": "2021-10-17T18:28:18.174Z",
"ctime": "2021-10-17T18:28:18.174Z",
"birthtime": "2021-03-16T04:19:24.957Z"
},
"example/transforming-views/demo8/README.md": {
"atime": "2021-10-17T18:28:32.923Z",
"mtime": "2021-10-17T18:28:31.840Z",
"ctime": "2021-10-17T18:28:31.840Z",
"birthtime": "2021-03-16T04:25:08.376Z"
},
"example/transforming-views/demo6/README.md": {
"atime": "2021-10-17T18:28:08.327Z",
"mtime": "2021-10-17T18:28:05.961Z",
"ctime": "2021-10-17T18:28:05.961Z",
"birthtime": "2021-03-16T04:11:08.767Z"
},
"example/view-layout/demo2/README.md": {
"atime": "2021-10-17T18:19:09.273Z",
"mtime": "2021-10-17T18:19:08.791Z",
"ctime": "2021-10-17T18:19:08.791Z",
"birthtime": "2021-03-17T07:18:58.330Z"
},
"example/transforming-views/demo9/README.md": {
"atime": "2021-10-17T18:28:41.033Z",
"mtime": "2021-10-17T18:28:40.606Z",
"ctime": "2021-10-17T18:28:40.606Z",
"birthtime": "2021-03-16T04:33:58.441Z"
},
"example/view-layout/demo3/README.md": {
"atime": "2021-10-17T18:19:12.610Z",
"mtime": "2021-10-17T18:19:11.911Z",
"ctime": "2021-10-17T18:19:11.911Z",
"birthtime": "2021-03-17T07:36:41.121Z"
},
"example/view-layout/demo4/README.md": {
"atime": "2021-10-17T18:19:15.983Z",
"mtime": "2021-10-17T18:19:15.576Z",
"ctime": "2021-10-17T18:19:15.576Z",
"birthtime": "2021-03-17T07:41:43.685Z"
},
"example/view-layout/demo7/README.md": {
"atime": "2021-10-17T18:19:24.051Z",
"mtime": "2021-10-17T18:19:23.464Z",
"ctime": "2021-10-17T18:19:23.464Z",
"birthtime": "2021-03-17T08:03:38.636Z"
},
"example/view-layout/demo9/README.md": {
"atime": "2021-10-20T13:04:33.399Z",
"mtime": "2021-10-20T13:04:30.577Z",
"ctime": "2021-10-20T13:04:30.577Z",
"birthtime": "2021-10-20T12:40:56.965Z"
},
"example/view-layout/demo8/README.md": {
"atime": "2021-10-17T18:19:26.526Z",
"mtime": "2021-10-17T18:19:25.836Z",
"ctime": "2021-10-17T18:19:25.836Z",
"birthtime": "2021-03-17T08:08:39.928Z"
},
"example/working-with-static-text/demo10/README.md": {
"atime": "2022-03-09T05:06:03.918Z",
"mtime": "2022-03-09T05:06:02.868Z",
"ctime": "2022-03-09T05:06:02.868Z",
"birthtime": "2022-03-09T05:06:02.868Z"
},
"example/working-with-static-text/demo11/README.md": {
"atime": "2022-03-18T18:08:24.020Z",
"mtime": "2022-03-09T09:44:04.408Z",
"ctime": "2022-03-09T09:44:04.408Z",
"birthtime": "2022-03-09T05:08:58.377Z"
},
"example/view-layout/demo6/README.md": {
"atime": "2021-10-17T18:19:21.504Z",
"mtime": "2021-10-17T18:19:20.890Z",
"ctime": "2021-10-17T18:19:20.890Z",
"birthtime": "2021-03-17T07:55:24.107Z"
},
"example/working-with-static-text/demo1/README.md": {
"atime": "2021-11-27T12:46:24.246Z",
"mtime": "2021-11-27T12:46:13.443Z",
"ctime": "2021-11-27T12:46:13.443Z",
"birthtime": "2021-03-16T14:42:18.117Z"
},
"example/working-with-static-text/demo4/README.md": {
"atime": "2021-11-27T12:56:51.161Z",
"mtime": "2021-11-27T12:56:49.916Z",
"ctime": "2021-11-27T12:56:49.916Z",
"birthtime": "2021-03-16T15:08:40.089Z"
},
"example/working-with-static-text/demo5/README.md": {
"atime": "2021-11-27T12:57:05.190Z",
"mtime": "2021-11-27T12:56:54.379Z",
"ctime": "2021-11-27T12:56:54.379Z",
"birthtime": "2021-03-16T15:21:01.732Z"
},
"example/working-with-static-text/demo6/README.md": {
"atime": "2021-11-27T12:57:11.634Z",
"mtime": "2021-11-27T12:57:00.819Z",
"ctime": "2021-11-27T12:57:00.819Z",
"birthtime": "2021-03-16T15:43:32.506Z"
},
"example/working-with-static-text/demo2/README.md": {
"atime": "2021-11-27T12:51:30.955Z",
"mtime": "2021-11-27T12:51:20.131Z",
"ctime": "2021-11-27T12:51:20.131Z",
"birthtime": "2021-03-16T14:53:44.201Z"
},
"example/working-with-static-text/demo3/README.md": {
"atime": "2021-11-27T12:54:04.947Z",
"mtime": "2021-11-27T12:54:02.800Z",
"ctime": "2021-11-27T12:54:02.800Z",
"birthtime": "2021-03-16T15:00:13.733Z"
},
"example/working-with-static-text/demo12/README.md": {
"atime": "2022-03-09T09:43:26.379Z",
"mtime": "2022-03-09T09:43:24.381Z",
"ctime": "2022-03-09T09:43:24.381Z",
"birthtime": "2022-03-09T09:32:17.919Z"
},
"example/user-interface-controls/demo10/README.md": {
"atime": "2021-10-17T18:17:45.245Z",
"mtime": "2021-10-17T18:17:44.857Z",
"ctime": "2021-10-17T18:17:44.857Z",
"birthtime": "2021-03-19T05:02:15.070Z"
},
"example/working-with-static-text/demo7/README.md": {
"atime": "2021-11-27T12:57:42.366Z",
"mtime": "2021-11-27T12:57:31.555Z",
"ctime": "2021-11-27T12:57:31.555Z",
"birthtime": "2021-03-16T15:49:34.449Z"
},
"example/user-interface-controls/demo11/README.md": {
"atime": "2021-10-17T18:17:52.342Z",
"mtime": "2021-10-17T18:17:51.582Z",
"ctime": "2021-10-17T18:17:51.582Z",
"birthtime": "2021-03-19T05:22:49.564Z"
},
"example/working-with-static-text/demo8/README.md": {
"atime": "2021-11-27T12:57:46.883Z",
"mtime": "2021-11-27T12:57:36.071Z",
"ctime": "2021-11-27T12:57:36.071Z",
"birthtime": "2021-03-16T15:55:15.653Z"
},
"example/user-interface-controls/demo13/README.md": {
"atime": "2021-10-17T18:17:58.005Z",
"mtime": "2021-10-17T18:17:57.390Z",
"ctime": "2021-10-17T18:17:57.390Z",
"birthtime": "2021-03-19T05:53:08.128Z"
},
"example/user-interface-controls/demo12/README.md": {
"atime": "2021-10-17T18:17:55.259Z",
"mtime": "2021-10-17T18:17:54.745Z",
"ctime": "2021-10-17T18:17:54.745Z",
"birthtime": "2021-03-19T05:49:45.039Z"
},
"example/view-layout/demo5/README.md": {
"atime": "2021-10-17T18:19:18.903Z",
"mtime": "2021-10-17T18:19:18.475Z",
"ctime": "2021-10-17T18:19:18.475Z",
"birthtime": "2021-03-17T07:45:47.956Z"
},
"example/user-interface-controls/demo15/README.md": {
"atime": "2021-10-17T18:18:02.858Z",
"mtime": "2021-10-17T18:18:01.967Z",
"ctime": "2021-10-17T18:18:01.967Z",
"birthtime": "2021-03-19T06:03:49.532Z"
},
"example/user-interface-controls/demo14/README.md": {
"atime": "2021-10-17T18:18:00.344Z",
"mtime": "2021-10-17T18:17:59.743Z",
"ctime": "2021-10-17T18:17:59.743Z",
"birthtime": "2021-03-19T05:56:56.464Z"
},
"example/user-interface-controls/demo16/README.md": {
"atime": "2021-10-17T18:30:35.345Z",
"mtime": "2021-10-17T18:30:34.929Z",
"ctime": "2021-10-17T18:30:34.929Z",
"birthtime": "2021-03-19T06:07:36.755Z"
},
"example/user-interface-controls/demo17/README.md": {
"atime": "2021-10-17T18:18:06.169Z",
"mtime": "2021-10-17T18:18:05.501Z",
"ctime": "2021-10-17T18:18:05.501Z",
"birthtime": "2021-03-19T06:44:39.366Z"
},
"example/user-interface-controls/demo19/README.md": {
"atime": "2021-10-17T18:18:10.969Z",
"mtime": "2021-10-17T18:18:10.036Z",
"ctime": "2021-10-17T18:18:10.036Z",
"birthtime": "2021-03-19T06:54:08.819Z"
},
"example/user-interface-controls/demo20/README.md": {
"atime": "2021-10-17T18:18:16.047Z",
"mtime": "2021-10-17T18:18:15.251Z",
"ctime": "2021-10-17T18:18:15.251Z",
"birthtime": "2021-03-19T06:57:32.906Z"
},
"example/user-interface-controls/demo21/README.md": {
"atime": "2021-10-17T18:18:20.283Z",
"mtime": "2021-10-17T18:18:19.395Z",
"ctime": "2021-10-17T18:18:19.395Z",
"birthtime": "2021-03-19T07:01:17.272Z"
},
"example/user-interface-controls/demo18/README.md": {
"atime": "2021-10-17T18:18:08.457Z",
"mtime": "2021-10-17T18:18:07.833Z",
"ctime": "2021-10-17T18:18:07.833Z",
"birthtime": "2021-03-19T06:51:00.920Z"
},
"example/user-interface-controls/demo22/README.md": {
"atime": "2021-10-17T18:18:22.678Z",
"mtime": "2021-10-17T18:18:21.924Z",
"ctime": "2021-10-17T18:18:21.924Z",
"birthtime": "2021-03-19T07:06:14.188Z"
},
"example/working-with-static-text/demo9/README.md": {
"atime": "2021-11-27T12:59:17.777Z",
"mtime": "2021-11-27T12:59:15.424Z",
"ctime": "2021-11-27T12:59:15.424Z",
"birthtime": "2021-03-16T16:05:24.506Z"
},
"example/user-interface-controls/demo23/README.md": {
"atime": "2021-10-17T18:18:25.121Z",
"mtime": "2021-10-17T18:18:24.392Z",
"ctime": "2021-10-17T18:18:24.392Z",
"birthtime": "2021-03-19T07:10:26.777Z"
},
"example/user-interface-controls/demo24/README.md": {
"atime": "2021-10-17T18:18:27.387Z",
"mtime": "2021-10-17T18:18:26.776Z",
"ctime": "2021-10-17T18:18:26.776Z",
"birthtime": "2021-03-19T07:16:09.538Z"
},
"example/user-interface-controls/demo2/README.md": {
"atime": "2021-10-17T18:18:13.557Z",
"mtime": "2021-10-17T18:18:12.587Z",
"ctime": "2021-10-17T18:18:12.587Z",
"birthtime": "2021-03-18T17:05:12.994Z"
},
"example/user-interface-controls/demo26/README.md": {
"atime": "2021-10-20T14:13:23.705Z",
"mtime": "2021-10-20T14:13:03.748Z",
"ctime": "2021-10-20T14:13:03.748Z",
"birthtime": "2021-10-20T14:06:50.244Z"
},
"example/user-interface-controls/demo25/README.md": {
"atime": "2021-10-17T18:18:30.236Z",
"mtime": "2021-10-17T18:18:28.992Z",
"ctime": "2021-10-17T18:18:28.992Z",
"birthtime": "2021-03-30T15:54:39.125Z"
},
"example/user-interface-controls/demo3/README.md": {
"atime": "2021-10-17T18:18:38.907Z",
"mtime": "2021-10-17T18:18:38.454Z",
"ctime": "2021-10-17T18:18:38.454Z",
"birthtime": "2021-03-19T01:24:11.146Z"
},
"example/user-interface-controls/demo27/README.md": {
"atime": "2021-10-20T14:41:33.177Z",
"mtime": "2021-10-20T14:41:31.939Z",
"ctime": "2021-10-20T14:41:31.939Z",
"birthtime": "2021-10-20T14:15:10.683Z"
},
"example/user-interface-controls/demo6/README.md": {
"atime": "2021-10-17T18:18:46.170Z",
"mtime": "2021-10-17T18:18:45.764Z",
"ctime": "2021-10-17T18:18:45.764Z",
"birthtime": "2021-03-19T02:33:19.005Z"
},
"example/user-interface-controls/demo28/README.md": {
"atime": "2021-10-20T14:49:43.822Z",
"mtime": "2021-10-20T14:49:09.210Z",
"ctime": "2021-10-20T14:49:09.210Z",
"birthtime": "2021-10-20T14:41:22.415Z"
},
"example/user-interface-controls/demo9/README.md": {
"atime": "2021-10-17T18:19:03.054Z",
"mtime": "2021-10-17T18:19:02.116Z",
"ctime": "2021-10-17T18:19:02.116Z",
"birthtime": "2021-03-19T05:08:10.949Z"
},
"example/user-interface-controls/demo7/README.md": {
"atime": "2021-10-17T18:18:49.552Z",
"mtime": "2021-10-17T18:18:49.099Z",
"ctime": "2021-10-17T18:18:49.099Z",
"birthtime": "2021-03-19T03:21:21.071Z"
},
"example/lists/demo10/README.md": {
"atime": "2021-10-17T18:15:21.626Z",
"mtime": "2021-10-17T18:15:21.233Z",
"ctime": "2021-10-17T18:15:21.233Z",
"birthtime": "2021-03-19T08:55:54.875Z"
},
"example/user-interface-controls/demo4/README.md": {
"atime": "2021-10-17T18:30:27.950Z",
"mtime": "2021-10-17T18:30:27.535Z",
"ctime": "2021-10-17T18:30:27.535Z",
"birthtime": "2021-03-19T01:38:03.858Z"
},
"example/user-interface-controls/demo8/README.md": {
"atime": "2021-10-17T18:18:58.424Z",
"mtime": "2021-10-17T18:18:57.385Z",
"ctime": "2021-10-17T18:18:57.385Z",
"birthtime": "2021-03-19T03:27:20.666Z"
},
"example/lists/demo12/README.md": {
"atime": "2021-10-17T18:15:26.706Z",
"mtime": "2021-10-17T18:15:26.125Z",
"ctime": "2021-10-17T18:15:26.125Z",
"birthtime": "2021-03-19T08:56:00.518Z"
},
"example/lists/demo11/README.md": {
"atime": "2021-10-17T18:15:24.313Z",
"mtime": "2021-10-17T18:15:23.854Z",
"ctime": "2021-10-17T18:15:23.854Z",
"birthtime": "2021-03-19T08:55:57.504Z"
},
"example/lists/demo13/README.md": {
"atime": "2021-10-17T18:15:29.207Z",
"mtime": "2021-10-17T18:15:28.484Z",
"ctime": "2021-10-17T18:15:28.484Z",
"birthtime": "2021-03-19T08:56:03.057Z"
},
"example/lists/demo2/README.md": {
"atime": "2021-10-17T18:07:23.921Z",
"mtime": "2021-10-17T18:07:23.516Z",
"ctime": "2021-10-17T18:07:23.516Z",
"birthtime": "2021-03-19T08:22:54.968Z"
},
"example/lists/demo7/README.md": {
"atime": "2021-10-17T18:15:31.278Z",
"mtime": "2021-10-17T18:15:30.828Z",
"ctime": "2021-10-17T18:15:30.828Z",
"birthtime": "2021-03-19T08:55:45.384Z"
},
"example/lists/demo8/README.md": {
"atime": "2021-10-17T18:15:34.103Z",
"mtime": "2021-10-17T18:15:33.272Z",
"ctime": "2021-10-17T18:15:33.272Z",
"birthtime": "2021-03-19T08:55:48.945Z"
},
"example/lists/demo3/README.md": {
"atime": "2021-10-17T18:07:27.769Z",
"mtime": "2021-10-17T18:07:27.374Z",
"ctime": "2021-10-17T18:07:27.374Z",
"birthtime": "2021-03-19T08:31:41.969Z"
},
"example/lists/demo5/README.md": {
"atime": "2021-10-17T18:07:36.587Z",
"mtime": "2021-10-17T18:07:36.172Z",
"ctime": "2021-10-17T18:07:36.172Z",
"birthtime": "2021-03-19T08:54:49.068Z"
},
"example/lists/demo4/README.md": {
"atime": "2021-10-17T18:07:31.485Z",
"mtime": "2021-10-17T18:07:31.071Z",
"ctime": "2021-10-17T18:07:31.071Z",
"birthtime": "2021-03-19T08:48:00.966Z"
},
"example/lists/demo9/README.md": {
"atime": "2021-10-17T18:15:37.086Z",
"mtime": "2021-10-17T18:15:35.847Z",
"ctime": "2021-10-17T18:15:35.847Z",
"birthtime": "2021-03-19T08:55:51.495Z"
},
"example/lists/demo6/README.md": {
"atime": "2021-10-17T18:07:45.914Z",
"mtime": "2021-10-17T18:07:45.516Z",
"ctime": "2021-10-17T18:07:45.516Z",
"birthtime": "2021-03-19T08:55:42.879Z"
},
"example/tooling/demo7/MySamplePackage/README.md": {
"atime": "2021-11-02T08:48:10.502Z",
"mtime": "2021-10-19T11:56:08.504Z",
"ctime": "2021-10-19T11:56:08.504Z",
"birthtime": "2021-10-19T11:56:08.503Z"
},
"example/tooling/demo7/README.md": {
"atime": "2021-10-20T01:15:56.290Z",
"mtime": "2021-10-20T01:15:55.052Z",
"ctime": "2021-10-20T01:15:55.052Z",
"birthtime": "2021-10-19T08:31:33.571Z"
},
"example/cheat-sheet.md": {
"atime": "2022-04-22T10:31:33.046Z",
"mtime": "2022-04-22T10:31:30.749Z",
"ctime": "2022-04-22T10:31:30.749Z",
"birthtime": "2021-10-17T17:51:26.701Z"
}
}
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2021 小弟调调™
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
================================================

[](https://jaywcjlove.github.io/#/sponsor)
[](https://x.com/jaywcjlove)
**SwiftUI 示例、技巧和技术集合**:这个集合旨在帮助您构建应用程序、解决问题,并了解 SwiftUI 的实际工作方式。主要内容来源于 [`hackingwithswift.com`](https://www.hackingwithswift.com/quick-start/swiftui),所有示例都是在 macOS Big Sur 系统上运行,基于 Xcode `12.4` 开发。
此外,我还制作了一个 Swift/SwiftUI 速查手册应用,您可以通过速查手册快速查阅资料,边动手开发应用,轻松上手。您可以通过以下链接下载:
🚧 **注意事项:** 这些示例适用于 macOS/iOS 上的 Swift 编程(主要是 macOS),文字解释内容是通过 Google 翻译完成的,英文水平有限,欢迎大家参与修改和完善。部分内容进行了添加或修改,并且有些部分是新增的。如果您对 Swift 语法不熟悉,可以参考 [`Swift 语法入门`](https://github.com/jaywcjlove/swift-tutorial),而如果对 SwiftUI 不熟悉,提供了一个 [`SwiftUI 速查手册`](./example/cheat-sheet.md) 供您参考。
🚧 **版权声明:** 内容版权归 [`hackingwithswift.com`](https://www.hackingwithswift.com/quick-start/swiftui) 原作者所有,本站不承担任何法律责任或风险,且不以商业为目的。如果您认为本站的内容侵犯了您的版权,请及时联系我们。同时,本站无法完全保证内容的准确性,使用本站内容所带来的任何风险由用户自行承担。使用本站即表示您已接受本站的使用条款和隐私政策。
为了方便在 Swift 中进行颜色拾取,提供了一个 Web 小工具 [UI-Color](https://uiwjs.github.io/ui-color/),此外还提供了一个桌面应用 [Palette Genius](https://github.com/jaywcjlove/palette-genius),该应用汇集了许多颜色,并且包含一个颜色选择转换器。欢迎大家提出改进意见。
[`SwiftUI 论坛`](https://github.com/jaywcjlove/swiftui-example/discussions)
只是讨论 SwiftUI 事物的地方 [论坛→](https://github.com/jaywcjlove/swiftui-example/discussions)。想法来源于 [sindresorhus/swiftui](https://github.com/sindresorhus/swiftui)
## 示例目录
- [介绍](#介绍)
- [建立一个完整的项目](#建立一个完整的项目)
- [使用静态文本](#使用静态文本)
- [图像形状和媒体](#图像形状和媒体)
- [视图布局](#视图布局)
- [堆栈网格滚动视图](#堆栈网格滚动视图)
- [用户界面控件](#用户界面控件)
- [响应事件](#响应事件)
- [点击和手势](#点击和手势)
- [状态](#状态)
- [列表](#列表)
- [表单](#表单)
- [容器](#容器)
- [对话框和菜单](#对话框和菜单)
- [切换界面](#切换界面)
- [转换视图](#转换视图)
- [绘画](#绘画)
- [动画](#动画)
- [排版视图](#排版视图)
- [跨平台-swiftui](#跨平台-swiftui)
- [数据](#数据)
- [辅助功能](#辅助功能)
- [工具](#工具)
- [附录a](#附录a)
- [`速查手册`](./example/cheat-sheet.md)
## 介绍
简要介绍 SwiftUI 的基础
- [不要惊慌!](example/quick-start/dont-panic.md)
- [什么是 SwiftUI?](example/quick-start/what-is-swiftui.md)
- [SwiftUI 与 Interface Builder 和 storyboards](example/quick-start/swiftui-vs-interface-builder-and-storyboards.md)
- [有关 SwiftUI 的常见问题](example/quick-start/frequently-asked-questions-about-swiftui.md)
- [回答这个大问题:你应该学习 SwiftUI,UIKit,还是两者都学?](example/quick-start/answering-the-big-question-should-you-learn-swiftui-uikit-or-both.md)
- [如何遵循这个快速入门指南?](example/quick-start/how-to-follow-this-quick-start-guide.md)
- [从 UIKit 迁移到 SwiftUI](example/quick-start/migrating-from-uikit-to-swiftui.md)
- [基本模板是什么?](example/quick-start/whats-in-the-basic-template.md)
- [贡献](example/quick-start/dedication.md)
## 建立一个完整的项目
通过实际的应用程序项目学习 SwiftUI
- [创建一个 `SwiftUI` 项目](example/introduction/demo1/README.md)
- [使用列表构建菜单](example/introduction/demo2/README.md)
## 使用静态文本
整齐地布局文本
- [如何使用 `Text` 视图创建静态标签?](example/working-with-static-text/demo1/README.md)
- [如何使用字体,颜色,行距等为文本视图设置样式?](example/working-with-static-text/demo2/README.md)
- [如何使用 `multilineTextAlignment()` 调整文本对齐方式?](example/working-with-static-text/demo3/README.md)
- [如何在文本视图中设置文本格式?](example/working-with-static-text/demo4/README.md)
- [如何在文字中的字母之间增加空格?](example/working-with-static-text/demo5/README.md)
- [如何在文字检视中格式化日期?](example/working-with-static-text/demo6/README.md)
- [如何使用 `textCase()` 使 `TextField` 大写或小写?](example/working-with-static-text/demo7/README.md)
- [如何使用 `Label` 并排显示文本和图标?](example/working-with-static-text/demo8/README.md)
- [如何使用 `redacted()` 将内容标记为占位符?](example/working-with-static-text/demo9/README.md)
- [如何使用 `privacySensitive()` 将内容标记为私有?](example/working-with-static-text/demo10/README.md)
- [如何在文本中呈现 `Markdown` 内容?](example/working-with-static-text/demo11/README.md)
- [如何让用户选择文本?](example/working-with-static-text/demo12/README.md)
## 图像,形状和媒体
绘制图标,圆形,渐变等
- [如何使用图像视图绘制图像?](example/images-shapes-media/demo1/README.md)
- [如何调整图像适合其空间的展示方式?](example/images-shapes-media/demo2/README.md)
- [如何平铺图像?](example/images-shapes-media/demo3/README.md)
- [如何使用SF符号渲染图像?](example/images-shapes-media/demo4/README.md)
- [如何渲染渐变?](example/images-shapes-media/demo5/README.md)
- [如何使用图像和其他视图作为背景?](example/images-shapes-media/demo6/README.md)
- [如何显示实体形状?](example/images-shapes-media/demo7/README.md)
- [如何同时填充和描边形状?](example/images-shapes-media/demo8/README.md)
- [如何使用 `trim()` 绘制实体形状的一部分?](example/images-shapes-media/demo9/README.md)
- [什么时候应该使用 `ContainerRelativeShape`?](example/images-shapes-media/demo10/README.md)
- [如何使用 `VideoPlayer` 播放电影?](example/images-shapes-media/demo11/README.md)
- [如何使用 `SpriteView` 集成 `SpriteKit`?](example/images-shapes-media/demo12/README.md)
- [如何从 URL 加载远程图像?](example/images-shapes-media/demo13/README.md)
- [如何使用 SF Symbols 获得自定义颜色和透明度?](example/images-shapes-media/demo14/README.md)
## 视图布局
布局大小,优先级和间距
- [如何给视图定制 `frame`?](example/view-layout/demo1/README.md)
- [如何使用 `padding` 来控制各个视图之间的间距?](example/view-layout/demo2/README.md)
- [如何使用 `GeometryReader` 提供相对大小?](example/view-layout/demo3/README.md)
- [如何将内容放置在安全区域之外?](example/view-layout/demo4/README.md)
- [如何返回不同的视图类型?](example/view-layout/demo5/README.md)
- [如何使用 `ForEach` 循环创建视图?](example/view-layout/demo6/README.md)
- [如何使用 `layoutPriority()` 控制布局优先级?](example/view-layout/demo7/README.md)
- [如何使两个视图具有相同的宽度或高度?](example/view-layout/demo8/README.md)
- [如何使用 `foregroundStyle()` 提供视觉结构?](example/view-layout/demo9/README.md)
## 堆栈,网格,滚动视图
以结构化方式定位视图
- [如何使用 `VStack` 和 `HStack` 创建堆栈?](example/stacks-grids-scrollviews/demo1/README.md)
- [如何使用对齐 `alignment` 和间距 `spacing` 自定义堆栈布局?](example/stacks-grids-scrollviews/demo2/README.md)
- [如何使用 `Spacer` 将视图强制移到堆栈中的一侧?](example/stacks-grids-scrollviews/demo3/README.md)
- [如何制作固定尺寸的 `Spacer`?](example/stacks-grids-scrollviews/demo4/README.md)
- [如何使用 `ZStack` 在彼此之上叠加视图?](example/stacks-grids-scrollviews/demo5/README.md)
- [如何使用 `zIndex` 更改视图分层的顺序?](example/stacks-grids-scrollviews/demo6/README.md)
- [如何使用尺寸类创建不同的布局?](example/stacks-grids-scrollviews/demo7/README.md)
- [如何根据大小类在 `HStack` 和 `VStack` 之间自动切换?](example/stacks-grids-scrollviews/demo8/README.md)
- [如何使用 `ScrollView` 添加水平和垂直滚动?](example/stacks-grids-scrollviews/demo9/README.md)
- [如何使用 `ScrollViewReader` 使滚动视图移动到某个位置?](example/stacks-grids-scrollviews/demo10/README.md)
- [如何使用 `ScrollView` 和 `GeometryReader` 创建3D效果(如Cover Flow)?](example/stacks-grids-scrollviews/demo11/README.md)
- [如何使用 `LazyVGrid` 和 `LazyHGrid` 在网格中放置视图?](example/stacks-grids-scrollviews/demo12/README.md)
- [如何使用 `LazyVStack` 和 `LazyHStack` 延迟加载视图?](example/stacks-grids-scrollviews/demo13/README.md)
- [如何使用 `HSplitViews` 创建左中右三栏布局?](example/stacks-grids-scrollviews/demo14/README.md)
- [如何添加视觉效果模糊?](example/stacks-grids-scrollviews/demo15/README.md)
## 用户界面控件
响应交互并控制程序状态
- [使用状态](example/user-interface-controls/demo1/README.md)
- [如何创建可点击的按钮?](example/user-interface-controls/demo2/README.md)
- [如何禁用 `Button` 和 `NavigationLink` 中的图像的覆盖颜色?](example/user-interface-controls/demo3/README.md)
- [如何从 `TextField` 读取文本?](example/user-interface-controls/demo4/README.md)
- [如何在 `TextField` 上添加边框?](example/user-interface-controls/demo5/README.md)
- [如何将占位符添加到 `TextField`?](example/user-interface-controls/demo6/README.md)
- [如何在 `TextField` 中禁用自动更正?](example/user-interface-controls/demo7/README.md)
- [如何关闭 `TextField` 的键盘?](example/user-interface-controls/demo8/README.md)
- [如何格式化数字的 `TextField`?](example/user-interface-controls/demo9/README.md)
- [如何使用 `SecureField` 创建安全的文本字段?](example/user-interface-controls/demo10/README.md)
- [如何创建拨动开关?](example/user-interface-controls/demo11/README.md)
- [如何创建滑块 `Slider` 并从中读取值?](example/user-interface-controls/demo12/README.md)
- [如何创建选择器 `Picker` 并从中读取值?](example/user-interface-controls/demo13/README.md)
- [如何创建日期选择器 `DatePicker` 并从中读取值?](example/user-interface-controls/demo14/README.md)
- [如何创建分段控件并从中读取值?](example/user-interface-controls/demo15/README.md)
- [如何创建步进器 `Stepper` 并从中读取值?](example/user-interface-controls/demo16/README.md)
- [如何使用 `labelsHidden()` 隐藏 `Picker`,`Stepper`,`Toggle` 等标签?](example/user-interface-controls/demo17/README.md)
- [如何使用文本编辑器创建多行可编辑文本 `TextEditor`?](example/user-interface-controls/demo18/README.md)
- [如何让用户使用 `ColorPicker` 选择颜色?](example/user-interface-controls/demo19/README.md)
- [如何使用 `ProgressView` 显示任务的进度?](example/user-interface-controls/demo20/README.md)
- [如何使用 `ProgressView` 显示不确定的进度?](example/user-interface-controls/demo21/README.md)
- [如何显示地图 `Map` 视图?](example/user-interface-controls/demo22/README.md)
- [如何在地图 `Map` 视图中显示注释?](example/user-interface-controls/demo23/README.md)
- [如何在 `Safari` 中打开 Web 链接?](example/user-interface-controls/demo24/README.md)
- [如何设置可编辑文本 `TextEditor` 背景颜色?](example/user-interface-controls/demo25/README.md)
- [如何自定义 `TextField`、`SecureField` 和 `TextEditor` 的提交按钮?](example/user-interface-controls/demo26/README.md)
- [当用户提交 TextField 时如何执行事件?](example/user-interface-controls/demo27/README.md)
- [如何获得突出的边框按钮?](example/user-interface-controls/demo28/README.md)
## 响应事件
快捷方式,旋转方式和外观
- [如何使用 `scenePhase` 检测您的应用何时移至背景或前景?](example/responding-to-events/demo1/README.md)
- [如何响应查看生命周期事件:`onAppear()` 和 `onDisappear()` ?](example/responding-to-events/demo2/README.md)
- [如何使用 `keyboardShortcut()` 添加键盘快捷键?](example/responding-to-events/demo3/README.md)
- [如何控制应用启动时显示的视图?](example/responding-to-events/demo4/README.md)
- [应用启动时如何运行代码?](example/responding-to-events/demo5/README.md)
- [如何将 `AppDelegate` 添加到 SwiftUI 应用?](example/responding-to-events/demo6/README.md)
- [如何检测设备旋转?](example/responding-to-events/demo7/README.md)
- [如何在键盘上添加工具栏?](example/responding-to-events/demo8/README.md)
- [显示视图时如何运行异步任务?](example/responding-to-events/demo9/README.md)
## 点击和手势
滑动,轻击,摇动和其他输入
- [如何在视图中添加手势识别器?](example/taps-and-gestures/demo1/README.md)
- [如何阅读点击和双击手势?](example/taps-and-gestures/demo2/README.md)
- [如何使用 `highPriorityGesture()` 强制一个手势先识别另一个手势?](example/taps-and-gestures/demo3/README.md)
- [如何使用 `simultaneousGesture()` 同时识别两个手势?](example/taps-and-gestures/demo4/README.md)
- [如何使用 `sequenced(before:)` 创建手势链?](example/taps-and-gestures/demo5/README.md)
- [如何检测到用户将鼠标悬停在视图上?](example/taps-and-gestures/demo6/README.md)
- [如何检测摇动手势?](example/taps-and-gestures/demo7/README.md)
- [如何使用 `contentShape()` 控制视图的可点击区域?](example/taps-and-gestures/demo8/README.md)
- [如何使用 `allowsHitTesting()` 禁用视图的点击?](example/taps-and-gestures/demo9/README.md)
## 状态
响应交互并控制程序状态
- [`@ObservedObject`,`@State` 和 `@EnvironmentObject` 有什么区别?](example/advanced-state/demo1/README.md)
- [如何使用 `@StateObject` 创建和监视外部对象?](example/advanced-state/demo2/README.md)
- [如何使用 `@ObservedObject` 管理外部对象的状态?](example/advanced-state/demo3/README.md)
- [如何使用 `@EnvironmentObject` 在视图之间共享数据?](example/advanced-state/demo4/README.md)
- [如何使用 `objectWillChange` 手动发送状态更新?](example/advanced-state/demo5/README.md)
- [如何创建常量绑定?](example/advanced-state/demo6/README.md)
- [如何创建自定义绑定?](example/advanced-state/demo7/README.md)
- [如何在 `SwiftUI` 中使用计时器?](example/advanced-state/demo8/README.md)
- [当使用 `onChange()` 改变状态时如何运行一些代码?](example/advanced-state/demo9/README.md)
## 列表
创建数据滚动表
- [使用列表 `List`](example/lists/demo1/README.md)
- [如何创建静态物品列表?](example/lists/demo2/README.md)
- [如何创建动态项目列表?](example/lists/demo3/README.md)
- [如何让用户从列表中删除行?](example/lists/demo4/README.md)
- [如何让用户在列表中移动行?](example/lists/demo5/README.md)
- [如何将 `Section` 添加到列表?](example/lists/demo6/README.md)
- [如何使用 `EditButton` 启用对列表的编辑?](example/lists/demo7/README.md)
- [如何使用 `listRowBackground()` 设置列表行的背景色?](example/lists/demo8/README.md)
- [如何创建分组和插入分组列表?](example/lists/demo9/README.md)
- [如何创建扩展列表?](example/lists/demo10/README.md)
- [如何滚动到列表中的特定行?](example/lists/demo11/README.md)
- [如何允许列表中的行选择?](example/lists/demo12/README.md)
- [如何使用隐式堆栈?](example/lists/demo13/README.md)
## 表单
快速有效地获得用户输入
- [使用表单 `Form`](example/forms/demo1/README.md)
- [基本表格设计](example/forms/demo2/README.md)
- [将表格分为几个部分](example/forms/demo3/README.md)
- [表单选择器 `Pickers`](example/forms/demo4/README.md)
- [启用和禁用表单中的元素](example/forms/demo5/README.md)
- [显示和隐藏表单行](example/forms/demo6/README.md)
## 容器
将视图放置在导航控制器等中
- [使用容器](example/containers/demo1/README.md)
- [如何在导航视图中嵌入视图?](example/containers/demo2/README.md)
- [如何将栏项目添加到导航视图?](example/containers/demo3/README.md)
- [如何使用 `TabView` 将视图嵌入选项卡栏中?](example/containers/demo4/README.md)
- [如何使用 `tabViewStyle()` 创建内容的滚动页面?](example/containers/demo5/README.md)
- [如何将视图组合 `Group` 在一起?](example/containers/demo6/README.md)
- [如何隐藏和显示状态栏?](example/containers/demo7/README.md)
- [如何使用 `DisclosureGroup` 隐藏和显示内容?](example/containers/demo8/README.md)
- [如何创建工具栏并向其中添加按钮?](example/containers/demo9/README.md)
- [如何为 `iPadOS` 添加侧边栏?](example/containers/demo10/README.md)
- [如何隐藏和显示 `NavigationView` 侧边栏?](example/containers/demo11/README.md)
## 对话框和菜单
发生某些情况时显示模式通知
- [使用简介](example/alerts-and-menus/demo1/README.md)
- [如何显示 `alert`?](example/alerts-and-menus/demo2/README.md)
- [如何为 `alert` 按钮添加动作?](example/alerts-and-menus/demo3/README.md)
- [如何在单个视图中显示多个 `alert`?](example/alerts-and-menus/demo4/README.md)
- [如何显示动作面板?](example/alerts-and-menus/demo5/README.md)
- [如何显示上下文菜单?](example/alerts-and-menus/demo6/README.md)
- [如何使用 `appStoreOverlay()` 推荐另一个应用程序?](example/alerts-and-menus/demo7/README.md)
- [按下按钮时如何显示菜单?](example/alerts-and-menus/demo8/README.md)
- [如何让用户从菜单中选择选项?](example/alerts-and-menus/demo9/README.md)
- [如何更改 macOS 应用中主菜单?](example/alerts-and-menus/demo10/README.md)
- [如何添加偏好设置界面?](example/alerts-and-menus/demo11/README.md)
## 切换界面
将您的用户从一个视图移动到另一个视图
- [如何将新视图推送到 `NavigationView` 上?](example/presenting-views/demo1/README.md)
- [点击列表行时如何推送新视图?](example/presenting-views/demo2/README.md)
- [如何在 `SwiftUI` 中使用程序化导航?](example/presenting-views/demo3/README.md)
- [如何使用 `sheets` 呈现新视图?](example/presenting-views/demo4/README.md)
- [如何使视图自行关闭?](example/presenting-views/demo5/README.md)
- [如何显示弹出视图?](example/presenting-views/demo6/README.md)
## 转换视图
剪辑,大小,比例,旋转等
- [如何使用其偏移量调整视图的位置 `offset`?](example/transforming-views/demo1/README.md)
- [如何为视图周围的填充着色?](example/transforming-views/demo2/README.md)
- [如何堆叠修改器以创建更高级的效果?](example/transforming-views/demo3/README.md)
- [如何在视图周围绘制边框?](example/transforming-views/demo4/README.md)
- [如何在视图内绘制边框?](example/transforming-views/demo5/README.md)
- [如何创建行军蚂蚁边框动画效果?](example/transforming-views/demo6/README.md)
- [如何在视图周围绘制阴影?](example/transforming-views/demo7/README.md)
- [如何裁剪视图,以便仅部分可见?](example/transforming-views/demo8/README.md)
- [如何旋转视图?](example/transforming-views/demo9/README.md)
- [如何旋转 3D 视图?](example/transforming-views/demo10/README.md)
- [如何放大或缩小视图?](example/transforming-views/demo11/README.md)
- [如何圆角化一个视图?](example/transforming-views/demo12/README.md)
- [如何调整视图的不透明度?](example/transforming-views/demo13/README.md)
- [如何调整视图的强调色?](example/transforming-views/demo14/README.md)
- [如何用一个视图掩盖另一个视图?](example/transforming-views/demo15/README.md)
- [如何模糊视图?](example/transforming-views/demo16/README.md)
- [如何将视图融合在一起?](example/transforming-views/demo17/README.md)
- [如何通过着色,去饱和等来调整视图?](example/transforming-views/demo18/README.md)
- [使用 `ButtonStyle` 自定义按钮](example/transforming-views/demo19/README.md)
- [使用 `ProgressViewStyle` 自定义 `ProgressView`](example/transforming-views/demo20/README.md)
- [使用 `ToggleStyle` 自定义 `Toggle`](example/transforming-views/demo21/README.md)
- [如何更改 `List` `TextEditor` 等的背景色](example/transforming-views/demo22/README.md)
## 绘画
使用自定义形状控制渲染
- [SwiftUI 的内置形状](example/drawing/demo1/README.md)
- [如何绘制自定义路径?](example/drawing/demo2/README.md)
- [如何绘制多边形和星星?](example/drawing/demo3/README.md)
- [如何画一个棋盘?](example/drawing/demo4/README.md)
## 动画
通过运动使您的界面栩栩如生
- [如何创建基本动画?](example/animation/demo1/README.md)
- [如何制作弹簧动画?](example/animation/demo2/README.md)
- [如何为绑定值的变化制作动画?](example/animation/demo3/README.md)
- [如何创建显式动画?](example/animation/demo4/README.md)
- [如何延迟动画?](example/animation/demo5/README.md)
- [视图出现后如何立即启动动画?](example/animation/demo6/README.md)
- [如何在一个视图中应用多个动画?](example/animation/demo7/README.md)
- [如何使用 matchedGeometryEffect() 将动画从一个视图同步到另一个视图?](example/animation/demo8/README.md)
- [如何通过过渡添加和删除视图?](example/animation/demo9/README.md)
- [如何创建不对称过渡?](example/animation/demo10/README.md)
- [如何创建自定义过渡?](example/animation/demo11/README.md)
- [如何设置文字大小的动画?](example/animation/demo12/README.md)
- [如何用事务覆盖动画?](example/animation/demo13/README.md)
## 排版视图
使您的UI结构更易于理解
- [如何创建和组合自定义视图?](example/composing-views/demo1/README.md)
- [如何将文本视图结合在一起?](example/composing-views/demo2/README.md)
- [如何将视图存储为属性?](example/composing-views/demo3/README.md)
- [如何创建自定义修改程序?](example/composing-views/demo4/README.md)
- [如何为 `SwiftUI` 包装自定义 `UIView`?](example/composing-views/demo5/README.md)
- [如何为 `UIViewRepresentable` 结构创建修饰符?](example/composing-views/demo6/README.md)
- [如何将图像插入文本?](example/composing-views/demo7/README.md)
## 跨平台 SwiftUI
学习让您的应用在任何地方都看起来很棒
- [学习一次,随处应用](example/cross-platform/demo1/README.md)
- [如何在 `macOS` 上获取半透明列表?](example/cross-platform/demo2/README.md)
- [如何在 `watchOS` 上制作轮播列表?](example/cross-platform/demo3/README.md)
- [如何使用 `digitalCrownRotation()` 在 `watchOS` 上读取 `Digital Crown`?](example/cross-platform/demo4/README.md)
## 数据
通过 `Core Data` 集成和更多功能处理数据
- [在 `SwiftUI` 中使用 `Core Data` 的简介](example/data/demo1/README.md)
- [如何配置核心数据以与 `SwiftUI` 一起使用?](example/data/demo2/README.md)
- [如何从 `SwiftUI` 视图访问 `Core Data` 管理的对象上下文?](example/data/demo3/README.md)
- [如何使用 `@FetchRequest` 创建核心数据获取请求?](example/data/demo4/README.md)
- [如何使用 `predicate` 过滤核心数据获取请求?](example/data/demo5/README.md)
- [如何从 `SwiftUI` 视图添加 `Core Data` 对象?](example/data/demo6/README.md)
- [如何从 `SwiftUI` 视图中删除 `Core Data` 对象?](example/data/demo7/README.md)
- [如何限制获取请求中的项目数?](example/data/demo8/README.md)
- [如何使用 `FileDocument` 和 `DocumentGroup` 创建基于文档的应用程序?](example/data/demo9/README.md)
- [如何使用 `fileExporter()` 导出文件?](example/data/demo10/README.md)
- [如何在 `SwiftUI` 中继续 `NSUserActivity`?](example/data/demo11/README.md)
- [如何使用 `LocationButton` 读取用户的位置?](example/data/demo12/README.md)
## 辅助功能
如何使每个人都能使用您的应用
- [SwiftUI 的可访问性简介](example/accessibility/demo1/README.md)
- [如何使用带有自定义字体的动态类型?](example/accessibility/demo2/README.md)
- [如何检测“减少运动”辅助功能设置?](example/accessibility/demo3/README.md)
- [如何检测暗模式?](example/accessibility/demo4/README.md)
- [如何使用装饰性图像减少屏幕阅读器的混乱?](example/accessibility/demo5/README.md)
- [如何在请求时减少动画?](example/accessibility/demo6/README.md)
## 工具
使用Xcode的帮助构建更好的应用程序
- [如何以不同的动态类型大小预览布局?](example/tooling/demo1/README.md)
- [如何在亮(light)和黑暗(dark)模式下预览布局?](example/tooling/demo2/README.md)
- [如何在不同的设备中预览布局?](example/tooling/demo3/README.md)
- [如何在导航视图中预览布局?](example/tooling/demo4/README.md)
- [如何使用 `Instruments` 来配置您的 SwiftUI 代码并识 `identify` 布局?](example/tooling/demo5/README.md)
- [如何在 `SwiftUI` 中使用 `Touch ID` 和 `Face ID`?](example/tooling/demo6/README.md)
- [如何在 Xcode 中添加创建 `Swift` 包依赖?](example/tooling/demo7/README.md)
- [如何以纵向或横向预览布局?](example/tooling/demo8/README.md)
- [如何查找导致 SwiftUI 视图更新的数据更改?](example/tooling/demo9/README.md)
## 附录A
如何使用每个 SwiftUI 属性包装器
- [了解 Swift 和 SwiftUI 中的属性包装器](example/appendix-a/demo1/README.md)
- [所有 SwiftUI 属性包装器都进行了解释和比较](example/appendix-a/demo2/README.md)
- [什么是 `@State` 属性包装器?](example/appendix-a/demo3/README.md)
- [什么是 `@StateObject` 属性包装器?](example/appendix-a/demo4/README.md)
- [什么是 `@Published` 属性包装器?](example/appendix-a/demo5/README.md)
- [什么是 `@ObservedObject` 属性包装器?](example/appendix-a/demo6/README.md)
- [什么是 `@EnvironmentObject` 属性包装器?](example/appendix-a/demo7/README.md)
- [什么是 `@Environment` 属性包装器?](example/appendix-a/demo8/README.md)
- [什么是 `@Binding` 属性包装器?](example/appendix-a/demo9/README.md)
- [什么是 `@GestureState` 属性包装器?](example/appendix-a/demo10/README.md)
- [什么是 `@FetchRequest` 属性包装器?](example/appendix-a/demo11/README.md)
- [什么是 `@AppStorage` 属性包装器?](example/appendix-a/demo12/README.md)
- [什么是 `@SceneStorage` 属性包装器?](example/appendix-a/demo13/README.md)
- [什么是 `@ScaledMetric` 属性包装器?](example/appendix-a/demo14/README.md)
- [什么是 `@UIApplicationDelegateAdaptor` 属性包装器?](example/appendix-a/demo15/README.md)
## 工具推荐
- [Swift 语法入门](https://github.com/jaywcjlove/swift-tutorial)
- [Swift 包索引](https://swiftpackageindex.com/)
- [hackingwithswift.com](https://www.hackingwithswift.com/quick-start/swiftui)
## 贡献者
一如既往,感谢我们出色的贡献者!
使用 [action-contributors](https://github.com/jaywcjlove/github-action-contributors) 制作。
## License
Licensed under the MIT License.
================================================
FILE: example/accessibility/demo1/README.md
================================================
SwiftUI 的可访问性简介
===
默认情况下,SwiftUI 应用程序具有极高的可访问性,这绝非偶然-它是从最早计划到框架中的,除非您积极选择使用默认值,否则您会发现自己的应用程序可以很好地完成无需您进行额外的工作就可以访问。
这种行为的关键是 SwiftUI 布局的基于堆栈的方法:一切都有自然的顺序,因为我们将事物放置在 `HStack` 和 `VStack` 中,因此系统可以大致了解布局应该如何流动。相比之下,`UIKit` 和“自动布局”使我们可以将物品放置在任何地方,因此系统必须有效地猜测应该如何订购物品。
SwiftUI 还强烈建议我们在所有交互式控件中添加标签,明确说明所有内容。是的,我们可以隐藏这些标签,但是即使隐藏了这些标签,系统仍会将它们用作屏幕阅读器等的音频提示。
因此,SwiftUI 为我们免费提供了许多可访问性。但是,它仍然为我们提供了额外的工具来提供更好的体验:屏幕阅读器应如何阅读内容?是否需要阅读所有内容?如果用户不喜欢没有奇特的动画怎么办?
在本章集合中,我们将介绍这些更高级的功能,希望可以帮助您构建用户界面,无论用户的系统偏好如何,这些界面都可以为用户带来舒适的体验。
================================================
FILE: example/accessibility/demo2/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DEA7CB72609B65C00EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CA42609B65B00EA5E6F /* DemoApp.swift */; };
7DEA7CB82609B65C00EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CA42609B65B00EA5E6F /* DemoApp.swift */; };
7DEA7CB92609B65C00EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CA52609B65B00EA5E6F /* ContentView.swift */; };
7DEA7CBA2609B65C00EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CA52609B65B00EA5E6F /* ContentView.swift */; };
7DEA7CBB2609B65C00EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7CA62609B65C00EA5E6F /* Assets.xcassets */; };
7DEA7CBC2609B65C00EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7CA62609B65C00EA5E6F /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DEA7CA42609B65B00EA5E6F /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DEA7CA52609B65B00EA5E6F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DEA7CA62609B65C00EA5E6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DEA7CAB2609B65C00EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7CAE2609B65C00EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7CB32609B65C00EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7CB52609B65C00EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7CB62609B65C00EA5E6F /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DEA7CA82609B65C00EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7CB02609B65C00EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DEA7C9E2609B65B00EA5E6F = {
isa = PBXGroup;
children = (
7DEA7CA32609B65B00EA5E6F /* Shared */,
7DEA7CAD2609B65C00EA5E6F /* iOS */,
7DEA7CB42609B65C00EA5E6F /* macOS */,
7DEA7CAC2609B65C00EA5E6F /* Products */,
);
sourceTree = "";
};
7DEA7CA32609B65B00EA5E6F /* Shared */ = {
isa = PBXGroup;
children = (
7DEA7CA42609B65B00EA5E6F /* DemoApp.swift */,
7DEA7CA52609B65B00EA5E6F /* ContentView.swift */,
7DEA7CA62609B65C00EA5E6F /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DEA7CAC2609B65C00EA5E6F /* Products */ = {
isa = PBXGroup;
children = (
7DEA7CAB2609B65C00EA5E6F /* Demo.app */,
7DEA7CB32609B65C00EA5E6F /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DEA7CAD2609B65C00EA5E6F /* iOS */ = {
isa = PBXGroup;
children = (
7DEA7CAE2609B65C00EA5E6F /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DEA7CB42609B65C00EA5E6F /* macOS */ = {
isa = PBXGroup;
children = (
7DEA7CB52609B65C00EA5E6F /* Info.plist */,
7DEA7CB62609B65C00EA5E6F /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DEA7CAA2609B65C00EA5E6F /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7CBF2609B65C00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DEA7CA72609B65C00EA5E6F /* Sources */,
7DEA7CA82609B65C00EA5E6F /* Frameworks */,
7DEA7CA92609B65C00EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DEA7CAB2609B65C00EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DEA7CB22609B65C00EA5E6F /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7CC22609B65C00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DEA7CAF2609B65C00EA5E6F /* Sources */,
7DEA7CB02609B65C00EA5E6F /* Frameworks */,
7DEA7CB12609B65C00EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DEA7CB32609B65C00EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DEA7C9F2609B65B00EA5E6F /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DEA7CAA2609B65C00EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
7DEA7CB22609B65C00EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DEA7CA22609B65B00EA5E6F /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DEA7C9E2609B65B00EA5E6F;
productRefGroup = 7DEA7CAC2609B65C00EA5E6F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DEA7CAA2609B65C00EA5E6F /* Demo (iOS) */,
7DEA7CB22609B65C00EA5E6F /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DEA7CA92609B65C00EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7CBB2609B65C00EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7CB12609B65C00EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7CBC2609B65C00EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DEA7CA72609B65C00EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7CB92609B65C00EA5E6F /* ContentView.swift in Sources */,
7DEA7CB72609B65C00EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7CAF2609B65C00EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7CBA2609B65C00EA5E6F /* ContentView.swift in Sources */,
7DEA7CB82609B65C00EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DEA7CBD2609B65C00EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DEA7CBE2609B65C00EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DEA7CC02609B65C00EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DEA7CC12609B65C00EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DEA7CC32609B65C00EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DEA7CC42609B65C00EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DEA7CA22609B65B00EA5E6F /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7CBD2609B65C00EA5E6F /* Debug */,
7DEA7CBE2609B65C00EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7CBF2609B65C00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7CC02609B65C00EA5E6F /* Debug */,
7DEA7CC12609B65C00EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7CC22609B65C00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7CC32609B65C00EA5E6F /* Debug */,
7DEA7CC42609B65C00EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DEA7C9F2609B65B00EA5E6F /* Project object */;
}
================================================
FILE: example/accessibility/demo2/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/accessibility/demo2/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/accessibility/demo2/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo2/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo2/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo2/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
//@available(iOS 13, macCatalyst 13, tvOS 13, watchOS 6, *)
//struct ScaledFont: ViewModifier {
// @Environment(\.sizeCategory) var sizeCategory
// var name: String
// var size: CGFloat
//
// func body(content: Content) -> some View {
// let scaledSize = UIFontMetrics.default.scaledValue(for: size)
// return content.font(.custom(name, size: scaledSize))
// }
//}
//@available(iOS 13, macCatalyst 13, tvOS 13, watchOS 6, *)
//extension View {
// func scaledFont(name: String, size: CGFloat) -> some View {
// return self.modifier(ScaledFont(name: name, size: size))
// }
//}
@available(iOS 13, macCatalyst 13, tvOS 13, watchOS 6, *)
extension View {
func scaledFont(name: String, size: CGFloat) -> some View {
return self.modifier(ScaledFont(name: name, size: size))
}
}
struct ScaledFont: ViewModifier {
@Environment(\.sizeCategory) var sizeCategory
var name: String
var size: CGFloat
func body(content: Content) -> some View {
let scaledSize = UIFontMetrics.default.scaledValue(for: size)
return content.font(.custom(name, size: scaledSize))
}
}
struct ContentView: View {
var body: some View {
Text("Hello World")
Text("Hello World")
.scaledFont(name: "Georgia", size: 12)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/accessibility/demo2/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/accessibility/demo2/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/accessibility/demo2/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/accessibility/demo2/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/accessibility/demo2/README.md
================================================
如何使用带有自定义字体的动态类型?
===
如果您使用的是 `iOS 14` 或更高版本,则无需进一步处理,您的自定义字体就会自动缩放。 但是,如果您希望字体相对于特定的 `Dynamic Type` 字体缩放,则应使用 `relativeTo` 参数,如下所示:
```swift
Text("Scaling")
.font(.custom("Georgia", size: 24, relativeTo: .headline))
```
这将以 `24pt` 开始字体,但是它将相对于`Headline Dynamic Type`字体放大和缩小。
如果您需要定位 `iOS 13`,请继续阅读以下内容…
SwiftUI 支持所有 `Dynamic Type` 的字体大小,所有字体大小都使用 `.font()` 修饰符进行设置。 但是,如果您要求特定的字体和大小,则会发现文本不再根据用户的 `Dynamic Type` 设置自动缩放,而是保持固定。
要解决此问题,我们需要创建一个自定义 `ViewModifier`,它可以根据当前的辅助功能设置来缩放字体大小,并检测该设置何时更改。
我将首先为您提供代码,然后逐步介绍它的工作方式以及原因:
```swift
@available(iOS 13, macCatalyst 13, tvOS 13, watchOS 6, *)
struct ScaledFont: ViewModifier {
@Environment(\.sizeCategory) var sizeCategory
var name: String
var size: CGFloat
func body(content: Content) -> some View {
let scaledSize = UIFontMetrics.default.scaledValue(for: size)
return content.font(.custom(name, size: scaledSize))
}
}
@available(iOS 13, macCatalyst 13, tvOS 13, watchOS 6, *)
extension View {
func scaledFont(name: String, size: CGFloat) -> some View {
return self.modifier(ScaledFont(name: name, size: size))
}
}
```
这就是获取与动态类型一起使用的自定义字体所需的全部代码。 作为使用它的示例,下面是一个带有两个文本视图的列表,一个使用内置字体,另一个使用可缩放的佐治亚州字体:
```swift
struct ContentView: View {
var body: some View {
List {
Text("Hello World")
Text("Hello World")
.scaledFont(name: "Georgia", size: 12)
}
}
}
```
现在您已经了解了它的工作原理,让我们看一下它的工作原理。
首先,我们有以下自定义视图修饰符:
```swift
struct ScaledFont: ViewModifier {
@Environment(\.sizeCategory) var sizeCategory
var name: String
var size: CGFloat
func body(content: Content) -> some View {
let scaledSize = UIFontMetrics.default.scaledValue(for: size)
return content.font(.custom(name, size: scaledSize))
}
}
```
这将接受我们字体的名称和大小,然后使用 `UIFontMetrics` 将请求的字体放大到与用户当前设备设置匹配的字体,然后将其发送回去。
然后,将其包装在View的扩展中,以使其更易于使用:
```swift
@available(iOS 13, macCatalyst 13, tvOS 13, watchOS 6, *)
extension View {
func scaledFont(name: String, size: CGFloat) -> some View {
return self.modifier(ScaledFont(name: name, size: size))
}
}
```
所有的工作就是包装对自定义字体修饰符的调用,以使它在我们的视图中看起来更好–这意味着我们编写使用 `.scaledFont(name: "Georgia", size: 12)` 而不是 `.modifier(ScaledFont(name: "Georgia", size: 12))`。
现在,您可能想知道如果我们要做的只是传递数据,为什么我们需要自定义视图修饰符。 好吧,线索就在我们的视图修饰符的这一行中:
```swift
@Environment(\.sizeCategory) var sizeCategory
```
这就要求系统从环境中提供当前大小类别,从而确定将 `Dynamic Type` 设置为哪个级别。 诀窍是我们实际上并没有使用它-我们不在乎动态类型设置是什么,而是通过要求系统在更改时更新我们来同时运行我们的 `UIFontMetrics` 代码,从而导致我们的字体 正确缩放。
提示:`UIFontMetrics` 类在 `macOS` 上不可用,这就是为什么我添加了 `@available` 标记的原因。
================================================
FILE: example/accessibility/demo3/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DEA7CE02609B89000EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CCD2609B88F00EA5E6F /* DemoApp.swift */; };
7DEA7CE12609B89000EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CCD2609B88F00EA5E6F /* DemoApp.swift */; };
7DEA7CE22609B89000EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CCE2609B88F00EA5E6F /* ContentView.swift */; };
7DEA7CE32609B89000EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CCE2609B88F00EA5E6F /* ContentView.swift */; };
7DEA7CE42609B89000EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7CCF2609B89000EA5E6F /* Assets.xcassets */; };
7DEA7CE52609B89000EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7CCF2609B89000EA5E6F /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DEA7CCD2609B88F00EA5E6F /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DEA7CCE2609B88F00EA5E6F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DEA7CCF2609B89000EA5E6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DEA7CD42609B89000EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7CD72609B89000EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7CDC2609B89000EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7CDE2609B89000EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7CDF2609B89000EA5E6F /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DEA7CD12609B89000EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7CD92609B89000EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DEA7CC72609B88F00EA5E6F = {
isa = PBXGroup;
children = (
7DEA7CCC2609B88F00EA5E6F /* Shared */,
7DEA7CD62609B89000EA5E6F /* iOS */,
7DEA7CDD2609B89000EA5E6F /* macOS */,
7DEA7CD52609B89000EA5E6F /* Products */,
);
sourceTree = "";
};
7DEA7CCC2609B88F00EA5E6F /* Shared */ = {
isa = PBXGroup;
children = (
7DEA7CCD2609B88F00EA5E6F /* DemoApp.swift */,
7DEA7CCE2609B88F00EA5E6F /* ContentView.swift */,
7DEA7CCF2609B89000EA5E6F /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DEA7CD52609B89000EA5E6F /* Products */ = {
isa = PBXGroup;
children = (
7DEA7CD42609B89000EA5E6F /* Demo.app */,
7DEA7CDC2609B89000EA5E6F /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DEA7CD62609B89000EA5E6F /* iOS */ = {
isa = PBXGroup;
children = (
7DEA7CD72609B89000EA5E6F /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DEA7CDD2609B89000EA5E6F /* macOS */ = {
isa = PBXGroup;
children = (
7DEA7CDE2609B89000EA5E6F /* Info.plist */,
7DEA7CDF2609B89000EA5E6F /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DEA7CD32609B89000EA5E6F /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7CE82609B89000EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DEA7CD02609B89000EA5E6F /* Sources */,
7DEA7CD12609B89000EA5E6F /* Frameworks */,
7DEA7CD22609B89000EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DEA7CD42609B89000EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DEA7CDB2609B89000EA5E6F /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7CEB2609B89000EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DEA7CD82609B89000EA5E6F /* Sources */,
7DEA7CD92609B89000EA5E6F /* Frameworks */,
7DEA7CDA2609B89000EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DEA7CDC2609B89000EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DEA7CC82609B88F00EA5E6F /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DEA7CD32609B89000EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
7DEA7CDB2609B89000EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DEA7CCB2609B88F00EA5E6F /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DEA7CC72609B88F00EA5E6F;
productRefGroup = 7DEA7CD52609B89000EA5E6F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DEA7CD32609B89000EA5E6F /* Demo (iOS) */,
7DEA7CDB2609B89000EA5E6F /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DEA7CD22609B89000EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7CE42609B89000EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7CDA2609B89000EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7CE52609B89000EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DEA7CD02609B89000EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7CE22609B89000EA5E6F /* ContentView.swift in Sources */,
7DEA7CE02609B89000EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7CD82609B89000EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7CE32609B89000EA5E6F /* ContentView.swift in Sources */,
7DEA7CE12609B89000EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DEA7CE62609B89000EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DEA7CE72609B89000EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DEA7CE92609B89000EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DEA7CEA2609B89000EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DEA7CEC2609B89000EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DEA7CED2609B89000EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DEA7CCB2609B88F00EA5E6F /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7CE62609B89000EA5E6F /* Debug */,
7DEA7CE72609B89000EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7CE82609B89000EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7CE92609B89000EA5E6F /* Debug */,
7DEA7CEA2609B89000EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7CEB2609B89000EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7CEC2609B89000EA5E6F /* Debug */,
7DEA7CED2609B89000EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DEA7CC82609B88F00EA5E6F /* Project object */;
}
================================================
FILE: example/accessibility/demo3/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/accessibility/demo3/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/accessibility/demo3/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo3/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo3/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo3/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
struct ContentView: View {
@Environment(\.accessibilityReduceMotion) var reduceMotion
@State private var scale: CGFloat = 1
var body: some View {
VStack {
Spacer()
Circle()
.frame(width: 20, height: 20)
.scaleEffect(scale)
.animation(reduceMotion ? nil : .spring(response: 1, dampingFraction: 0.1))
Spacer()
Button("Increase Scale") {
scale *= 1.5
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/accessibility/demo3/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/accessibility/demo3/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/accessibility/demo3/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/accessibility/demo3/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/accessibility/demo3/README.md
================================================
如何检测“减少运动”辅助功能设置?
===
许多用户对动画敏感,尤其是那些大型或复杂的动画。 因此,iOS具有名为“减少运动”(Reduce Motion)的内置可访问性设置,应用可以根据需要对其进行读取和响应。
在 SwiftUI 中,此设置作为环境布尔值公开给我们,因此您应该首先在视图中添加一个属性:
```swift
@Environment(\.accessibilityReduceMotion) var reduceMotion
```
现在由您决定 “reduce motion” 的含义 – 是删除动画,还是只是将动画更改为强度较小? 您是否应该保留一些重要的动画,而只删除那些具有视觉吸引力的动画?
例如,如果您想为大多数用户提供弹性的弹簧动画,但对于希望减少运动的用户则根本不需要动画,则可以使用如下所示的动画修改器:
```swift
.animation(reduceMotion ? nil : .spring(response: 1, dampingFraction: 0.1))
```
这是一个完整的示例,您可以尝试:
```swift
struct ContentView: View {
@Environment(\.accessibilityReduceMotion) var reduceMotion
@State private var scale: CGFloat = 1
var body: some View {
VStack {
Spacer()
Circle()
.frame(width: 20, height: 20)
.scaleEffect(scale)
.animation(reduceMotion ? nil : .spring(response: 1, dampingFraction: 0.1))
Spacer()
Button("Increase Scale") {
scale *= 1.5
}
}
}
}
```
这将创建一个小矩形,每次按下该按钮时,将使用弹簧动画将其放大。 但是,如果用户启用了减少运动,则动画将被完全删除 – 它对 `animation()` 修饰符使用 `nil`。
================================================
FILE: example/accessibility/demo4/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DEA7D092609B98D00EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CF62609B98C00EA5E6F /* DemoApp.swift */; };
7DEA7D0A2609B98D00EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CF62609B98C00EA5E6F /* DemoApp.swift */; };
7DEA7D0B2609B98D00EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CF72609B98C00EA5E6F /* ContentView.swift */; };
7DEA7D0C2609B98D00EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7CF72609B98C00EA5E6F /* ContentView.swift */; };
7DEA7D0D2609B98D00EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7CF82609B98D00EA5E6F /* Assets.xcassets */; };
7DEA7D0E2609B98D00EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7CF82609B98D00EA5E6F /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DEA7CF62609B98C00EA5E6F /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DEA7CF72609B98C00EA5E6F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DEA7CF82609B98D00EA5E6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DEA7CFD2609B98D00EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7D002609B98D00EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7D052609B98D00EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7D072609B98D00EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7D082609B98D00EA5E6F /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DEA7CFA2609B98D00EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7D022609B98D00EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DEA7CF02609B98C00EA5E6F = {
isa = PBXGroup;
children = (
7DEA7CF52609B98C00EA5E6F /* Shared */,
7DEA7CFF2609B98D00EA5E6F /* iOS */,
7DEA7D062609B98D00EA5E6F /* macOS */,
7DEA7CFE2609B98D00EA5E6F /* Products */,
);
sourceTree = "";
};
7DEA7CF52609B98C00EA5E6F /* Shared */ = {
isa = PBXGroup;
children = (
7DEA7CF62609B98C00EA5E6F /* DemoApp.swift */,
7DEA7CF72609B98C00EA5E6F /* ContentView.swift */,
7DEA7CF82609B98D00EA5E6F /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DEA7CFE2609B98D00EA5E6F /* Products */ = {
isa = PBXGroup;
children = (
7DEA7CFD2609B98D00EA5E6F /* Demo.app */,
7DEA7D052609B98D00EA5E6F /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DEA7CFF2609B98D00EA5E6F /* iOS */ = {
isa = PBXGroup;
children = (
7DEA7D002609B98D00EA5E6F /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DEA7D062609B98D00EA5E6F /* macOS */ = {
isa = PBXGroup;
children = (
7DEA7D072609B98D00EA5E6F /* Info.plist */,
7DEA7D082609B98D00EA5E6F /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DEA7CFC2609B98D00EA5E6F /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7D112609B98D00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DEA7CF92609B98D00EA5E6F /* Sources */,
7DEA7CFA2609B98D00EA5E6F /* Frameworks */,
7DEA7CFB2609B98D00EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DEA7CFD2609B98D00EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DEA7D042609B98D00EA5E6F /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7D142609B98D00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DEA7D012609B98D00EA5E6F /* Sources */,
7DEA7D022609B98D00EA5E6F /* Frameworks */,
7DEA7D032609B98D00EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DEA7D052609B98D00EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DEA7CF12609B98C00EA5E6F /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DEA7CFC2609B98D00EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
7DEA7D042609B98D00EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DEA7CF42609B98C00EA5E6F /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DEA7CF02609B98C00EA5E6F;
productRefGroup = 7DEA7CFE2609B98D00EA5E6F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DEA7CFC2609B98D00EA5E6F /* Demo (iOS) */,
7DEA7D042609B98D00EA5E6F /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DEA7CFB2609B98D00EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D0D2609B98D00EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7D032609B98D00EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D0E2609B98D00EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DEA7CF92609B98D00EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D0B2609B98D00EA5E6F /* ContentView.swift in Sources */,
7DEA7D092609B98D00EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7D012609B98D00EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D0C2609B98D00EA5E6F /* ContentView.swift in Sources */,
7DEA7D0A2609B98D00EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DEA7D0F2609B98D00EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DEA7D102609B98D00EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DEA7D122609B98D00EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DEA7D132609B98D00EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DEA7D152609B98D00EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DEA7D162609B98D00EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DEA7CF42609B98C00EA5E6F /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7D0F2609B98D00EA5E6F /* Debug */,
7DEA7D102609B98D00EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7D112609B98D00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7D122609B98D00EA5E6F /* Debug */,
7DEA7D132609B98D00EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7D142609B98D00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7D152609B98D00EA5E6F /* Debug */,
7DEA7D162609B98D00EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DEA7CF12609B98C00EA5E6F /* Project object */;
}
================================================
FILE: example/accessibility/demo4/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/accessibility/demo4/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/accessibility/demo4/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo4/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo4/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo4/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
struct ContentView: View {
@Environment(\.colorScheme) var colorScheme
var body: some View {
Text(colorScheme == .dark ? "在暗模式下" : "在亮模式下")
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/accessibility/demo4/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/accessibility/demo4/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/accessibility/demo4/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/accessibility/demo4/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/accessibility/demo4/README.md
================================================
如何检测暗模式?
===
SwiftUI 使我们能够使用 `colorScheme` 环境键来检测当前是否启用了暗模式或亮模式。 如果使用 `@Environment` 声明此内容,则可以在视图中引用它,并且在更改配色方案时将自动重新加载它们。
例如,根据当前的配色方案,这将打印“在暗模式下”或“在亮模式下”:
```swift
struct ContentView: View {
@Environment(\.colorScheme) var colorScheme
var body: some View {
Text(colorScheme == .dark ? "在暗模式下" : "在亮模式下")
}
}
```
通常,这仅应用于自定义绘图-如果要启用深色和浅色或深色和浅色图像,这些都可以使用资产目录来完成,并且在配色方案更改时也可以重新加载。
================================================
FILE: example/accessibility/demo5/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DEA7D322609BA7300EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7D1F2609BA7200EA5E6F /* DemoApp.swift */; };
7DEA7D332609BA7300EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7D1F2609BA7200EA5E6F /* DemoApp.swift */; };
7DEA7D342609BA7300EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7D202609BA7200EA5E6F /* ContentView.swift */; };
7DEA7D352609BA7300EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7D202609BA7200EA5E6F /* ContentView.swift */; };
7DEA7D362609BA7300EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7D212609BA7300EA5E6F /* Assets.xcassets */; };
7DEA7D372609BA7300EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7D212609BA7300EA5E6F /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DEA7D1F2609BA7200EA5E6F /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DEA7D202609BA7200EA5E6F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DEA7D212609BA7300EA5E6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DEA7D262609BA7300EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7D292609BA7300EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7D2E2609BA7300EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7D302609BA7300EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7D312609BA7300EA5E6F /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DEA7D232609BA7300EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7D2B2609BA7300EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DEA7D192609BA7200EA5E6F = {
isa = PBXGroup;
children = (
7DEA7D1E2609BA7200EA5E6F /* Shared */,
7DEA7D282609BA7300EA5E6F /* iOS */,
7DEA7D2F2609BA7300EA5E6F /* macOS */,
7DEA7D272609BA7300EA5E6F /* Products */,
);
sourceTree = "";
};
7DEA7D1E2609BA7200EA5E6F /* Shared */ = {
isa = PBXGroup;
children = (
7DEA7D1F2609BA7200EA5E6F /* DemoApp.swift */,
7DEA7D202609BA7200EA5E6F /* ContentView.swift */,
7DEA7D212609BA7300EA5E6F /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DEA7D272609BA7300EA5E6F /* Products */ = {
isa = PBXGroup;
children = (
7DEA7D262609BA7300EA5E6F /* Demo.app */,
7DEA7D2E2609BA7300EA5E6F /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DEA7D282609BA7300EA5E6F /* iOS */ = {
isa = PBXGroup;
children = (
7DEA7D292609BA7300EA5E6F /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DEA7D2F2609BA7300EA5E6F /* macOS */ = {
isa = PBXGroup;
children = (
7DEA7D302609BA7300EA5E6F /* Info.plist */,
7DEA7D312609BA7300EA5E6F /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DEA7D252609BA7300EA5E6F /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7D3A2609BA7300EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DEA7D222609BA7300EA5E6F /* Sources */,
7DEA7D232609BA7300EA5E6F /* Frameworks */,
7DEA7D242609BA7300EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DEA7D262609BA7300EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DEA7D2D2609BA7300EA5E6F /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7D3D2609BA7300EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DEA7D2A2609BA7300EA5E6F /* Sources */,
7DEA7D2B2609BA7300EA5E6F /* Frameworks */,
7DEA7D2C2609BA7300EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DEA7D2E2609BA7300EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DEA7D1A2609BA7200EA5E6F /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DEA7D252609BA7300EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
7DEA7D2D2609BA7300EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DEA7D1D2609BA7200EA5E6F /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DEA7D192609BA7200EA5E6F;
productRefGroup = 7DEA7D272609BA7300EA5E6F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DEA7D252609BA7300EA5E6F /* Demo (iOS) */,
7DEA7D2D2609BA7300EA5E6F /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DEA7D242609BA7300EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D362609BA7300EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7D2C2609BA7300EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D372609BA7300EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DEA7D222609BA7300EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D342609BA7300EA5E6F /* ContentView.swift in Sources */,
7DEA7D322609BA7300EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7D2A2609BA7300EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D352609BA7300EA5E6F /* ContentView.swift in Sources */,
7DEA7D332609BA7300EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DEA7D382609BA7300EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DEA7D392609BA7300EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DEA7D3B2609BA7300EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DEA7D3C2609BA7300EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DEA7D3E2609BA7300EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DEA7D3F2609BA7300EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DEA7D1D2609BA7200EA5E6F /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7D382609BA7300EA5E6F /* Debug */,
7DEA7D392609BA7300EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7D3A2609BA7300EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7D3B2609BA7300EA5E6F /* Debug */,
7DEA7D3C2609BA7300EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7D3D2609BA7300EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7D3E2609BA7300EA5E6F /* Debug */,
7DEA7D3F2609BA7300EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DEA7D1A2609BA7200EA5E6F /* Project object */;
}
================================================
FILE: example/accessibility/demo5/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/accessibility/demo5/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/accessibility/demo5/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo5/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo5/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo5/Demo/Shared/Assets.xcassets/star.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "a.jpg",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo5/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
struct ContentView: View {
var body: some View {
Image(decorative: "star")
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/accessibility/demo5/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/accessibility/demo5/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/accessibility/demo5/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/accessibility/demo5/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/accessibility/demo5/README.md
================================================
如何使用装饰性图像减少屏幕阅读器的混乱?
===
SwiftUI 会自动使用图像名称作为屏幕阅读器标签,如果您使用的图像名称为 “Paul Hudson的照片” 或 “带有Swift徽标的图片”,这将很有用。 但是,某些图像并非仅仅是为了装饰而已被阅读 - 它们不会传达屏幕上其他地方还没有的信息,或者只是传达信息,以使用户界面看起来更具吸引力。
如果您使用 `Image("star")` 之类的图片创建这些图像,则屏幕阅读器会将其作为标准UI传递的一部分读出。一个更好的主意是使用 `Image(decorative:)` 初始化程序创建它们,该初始化程序告诉 SwiftUI 该图像不应暴露于屏幕阅读器:
```swift
Image(decorative: "star")
```
建立用户界面后,值得使用 `VoiceOver` 进行最后检查,以确保您正确标记了图像 - 最后,您需要的是屏幕阅读器说出您认为仅在代码中使用过的奇怪的内部文件名 !
================================================
FILE: example/accessibility/demo6/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DEA7D5B2609BBAD00EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7D482609BBAC00EA5E6F /* DemoApp.swift */; };
7DEA7D5C2609BBAD00EA5E6F /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7D482609BBAC00EA5E6F /* DemoApp.swift */; };
7DEA7D5D2609BBAD00EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7D492609BBAC00EA5E6F /* ContentView.swift */; };
7DEA7D5E2609BBAD00EA5E6F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DEA7D492609BBAC00EA5E6F /* ContentView.swift */; };
7DEA7D5F2609BBAD00EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7D4A2609BBAD00EA5E6F /* Assets.xcassets */; };
7DEA7D602609BBAD00EA5E6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DEA7D4A2609BBAD00EA5E6F /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DEA7D482609BBAC00EA5E6F /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DEA7D492609BBAC00EA5E6F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DEA7D4A2609BBAD00EA5E6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DEA7D4F2609BBAD00EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7D522609BBAD00EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7D572609BBAD00EA5E6F /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DEA7D592609BBAD00EA5E6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DEA7D5A2609BBAD00EA5E6F /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DEA7D4C2609BBAD00EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7D542609BBAD00EA5E6F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DEA7D422609BBAC00EA5E6F = {
isa = PBXGroup;
children = (
7DEA7D472609BBAC00EA5E6F /* Shared */,
7DEA7D512609BBAD00EA5E6F /* iOS */,
7DEA7D582609BBAD00EA5E6F /* macOS */,
7DEA7D502609BBAD00EA5E6F /* Products */,
);
sourceTree = "";
};
7DEA7D472609BBAC00EA5E6F /* Shared */ = {
isa = PBXGroup;
children = (
7DEA7D482609BBAC00EA5E6F /* DemoApp.swift */,
7DEA7D492609BBAC00EA5E6F /* ContentView.swift */,
7DEA7D4A2609BBAD00EA5E6F /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DEA7D502609BBAD00EA5E6F /* Products */ = {
isa = PBXGroup;
children = (
7DEA7D4F2609BBAD00EA5E6F /* Demo.app */,
7DEA7D572609BBAD00EA5E6F /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DEA7D512609BBAD00EA5E6F /* iOS */ = {
isa = PBXGroup;
children = (
7DEA7D522609BBAD00EA5E6F /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DEA7D582609BBAD00EA5E6F /* macOS */ = {
isa = PBXGroup;
children = (
7DEA7D592609BBAD00EA5E6F /* Info.plist */,
7DEA7D5A2609BBAD00EA5E6F /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DEA7D4E2609BBAD00EA5E6F /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7D632609BBAD00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DEA7D4B2609BBAD00EA5E6F /* Sources */,
7DEA7D4C2609BBAD00EA5E6F /* Frameworks */,
7DEA7D4D2609BBAD00EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DEA7D4F2609BBAD00EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DEA7D562609BBAD00EA5E6F /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DEA7D662609BBAD00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DEA7D532609BBAD00EA5E6F /* Sources */,
7DEA7D542609BBAD00EA5E6F /* Frameworks */,
7DEA7D552609BBAD00EA5E6F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DEA7D572609BBAD00EA5E6F /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DEA7D432609BBAC00EA5E6F /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DEA7D4E2609BBAD00EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
7DEA7D562609BBAD00EA5E6F = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DEA7D462609BBAC00EA5E6F /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DEA7D422609BBAC00EA5E6F;
productRefGroup = 7DEA7D502609BBAD00EA5E6F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DEA7D4E2609BBAD00EA5E6F /* Demo (iOS) */,
7DEA7D562609BBAD00EA5E6F /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DEA7D4D2609BBAD00EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D5F2609BBAD00EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7D552609BBAD00EA5E6F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D602609BBAD00EA5E6F /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DEA7D4B2609BBAD00EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D5D2609BBAD00EA5E6F /* ContentView.swift in Sources */,
7DEA7D5B2609BBAD00EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DEA7D532609BBAD00EA5E6F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DEA7D5E2609BBAD00EA5E6F /* ContentView.swift in Sources */,
7DEA7D5C2609BBAD00EA5E6F /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DEA7D612609BBAD00EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DEA7D622609BBAD00EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DEA7D642609BBAD00EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DEA7D652609BBAD00EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DEA7D672609BBAD00EA5E6F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DEA7D682609BBAD00EA5E6F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DEA7D462609BBAC00EA5E6F /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7D612609BBAD00EA5E6F /* Debug */,
7DEA7D622609BBAD00EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7D632609BBAD00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7D642609BBAD00EA5E6F /* Debug */,
7DEA7D652609BBAD00EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DEA7D662609BBAD00EA5E6F /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DEA7D672609BBAD00EA5E6F /* Debug */,
7DEA7D682609BBAD00EA5E6F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DEA7D432609BBAC00EA5E6F /* Project object */;
}
================================================
FILE: example/accessibility/demo6/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/accessibility/demo6/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/accessibility/demo6/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo6/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo6/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/accessibility/demo6/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
struct ContentView: View {
@State private var scale: CGFloat = 1
var body: some View {
Text("Hello, World!")
.scaleEffect(scale)
.onTapGesture {
withOptionalAnimation {
scale *= 1.5
}
}
}
func withOptionalAnimation(_ animation: Animation? = .default, _ body: () throws -> Result) rethrows -> Result {
if UIAccessibility.isReduceMotionEnabled {
return try body()
} else {
return try withAnimation(animation, body)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/accessibility/demo6/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/23.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/accessibility/demo6/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/accessibility/demo6/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/accessibility/demo6/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/accessibility/demo6/README.md
================================================
如何在请求时减少动画?
===
SwiftUI 的 `withAnimation()` 函数可让我们轻松地在视图上执行自定义动画,但它不遵守 “Reduce Motion” 可访问性设置,因此可能会使您的应用难以为许多人使用。
如果您还想使用 `withAnimation()` 并同时遵守该设置,建议您添加一个像这样的全局函数:
```swift
func withOptionalAnimation(_ animation: Animation? = .default, _ body: () throws -> Result) rethrows -> Result {
if UIAccessibility.isReduceMotionEnabled {
return try body()
} else {
return try withAnimation(animation, body)
}
}
```
该功能会自动检查每次触发动画时是否启用了“降低运动”功能,并针对专门请求较少动画的用户将其禁用。
如果您想知道,`withAnimation()` 也是一个全局函数–该函数位于任何其他类型的外部–因此,新的 `withOptionalAnimation()`函数的行为将相同。
因此,您可以在与 `withAnimation()` 一起使用的任何地方使用它,如下所示:
```swift
struct ContentView: View {
@State private var scale: CGFloat = 1
var body: some View {
Text("Hello, World!")
.scaleEffect(scale)
.onTapGesture {
withOptionalAnimation {
scale *= 1.5
}
}
}
}
```
================================================
FILE: example/advanced-state/demo1/Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo1/Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo1/Demo/Demo/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo1/Demo/Demo/ContentView.swift
================================================
//
// ContentView.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
struct ContentView: View {
@State private var tapCount = 0
var body: some View {
Button("Tap count: \(tapCount)") {
tapCount += 1
}
.padding(100)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/advanced-state/demo1/Demo/Demo/Demo.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/advanced-state/demo1/Demo/Demo/DemoApp.swift
================================================
//
// DemoApp.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/advanced-state/demo1/Demo/Demo/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/advanced-state/demo1/Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo1/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D4990992600F87100504434 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D4990982600F87100504434 /* DemoApp.swift */; };
7D49909B2600F87100504434 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D49909A2600F87100504434 /* ContentView.swift */; };
7D49909D2600F87300504434 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D49909C2600F87300504434 /* Assets.xcassets */; };
7D4990A02600F87300504434 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D49909F2600F87300504434 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D4990952600F87100504434 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D4990982600F87100504434 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D49909A2600F87100504434 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D49909C2600F87300504434 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D49909F2600F87300504434 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
7D4990A12600F87300504434 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D4990A22600F87300504434 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D4990922600F87100504434 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D49908C2600F87100504434 = {
isa = PBXGroup;
children = (
7D4990972600F87100504434 /* Demo */,
7D4990962600F87100504434 /* Products */,
);
sourceTree = "";
};
7D4990962600F87100504434 /* Products */ = {
isa = PBXGroup;
children = (
7D4990952600F87100504434 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D4990972600F87100504434 /* Demo */ = {
isa = PBXGroup;
children = (
7D4990982600F87100504434 /* DemoApp.swift */,
7D49909A2600F87100504434 /* ContentView.swift */,
7D49909C2600F87300504434 /* Assets.xcassets */,
7D4990A12600F87300504434 /* Info.plist */,
7D4990A22600F87300504434 /* Demo.entitlements */,
7D49909E2600F87300504434 /* Preview Content */,
);
path = Demo;
sourceTree = "";
};
7D49909E2600F87300504434 /* Preview Content */ = {
isa = PBXGroup;
children = (
7D49909F2600F87300504434 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D4990942600F87100504434 /* Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D4990A52600F87300504434 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
7D4990912600F87100504434 /* Sources */,
7D4990922600F87100504434 /* Frameworks */,
7D4990932600F87100504434 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Demo;
productName = Demo;
productReference = 7D4990952600F87100504434 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D49908D2600F87100504434 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D4990942600F87100504434 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D4990902600F87100504434 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D49908C2600F87100504434;
productRefGroup = 7D4990962600F87100504434 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D4990942600F87100504434 /* Demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D4990932600F87100504434 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D4990A02600F87300504434 /* Preview Assets.xcassets in Resources */,
7D49909D2600F87300504434 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D4990912600F87100504434 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D49909B2600F87100504434 /* ContentView.swift in Sources */,
7D4990992600F87100504434 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D4990A32600F87300504434 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D4990A42600F87300504434 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D4990A62600F87300504434 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D4990A72600F87300504434 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D4990902600F87100504434 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D4990A32600F87300504434 /* Debug */,
7D4990A42600F87300504434 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D4990A52600F87300504434 /* Build configuration list for PBXNativeTarget "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D4990A62600F87300504434 /* Debug */,
7D4990A72600F87300504434 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D49908D2600F87100504434 /* Project object */;
}
================================================
FILE: example/advanced-state/demo1/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/advanced-state/demo1/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/advanced-state/demo1/README.md
================================================
`@ObservedObject`,`@State` 和 `@EnvironmentObject` 有什么区别?
===
在任何现代应用中,状态都是不可避免的,但是使用 `SwiftUI` 时要记住,我们所有的视图只是其状态的简单功能-我们不直接更改视图,而是操纵状态并由其决定结果。

`SwiftUI` 为我们提供了几种在应用程序中存储状态的方法,但是它们有些微的不同,因此,重要的是要了解它们的不同之处,以便正确使用框架。
使用状态的最简单方法是 `@State` 属性包装器,其用法如下:
```swift
struct ContentView: View {
@State private var tapCount = 0
var body: some View {
Button("Tap count: \(tapCount)") {
tapCount += 1
}
.padding(100)
}
}
```
这会在视图内部创建一个属性,但是它使用 `@State` 属性包装器来请求 `SwiftUI` 管理内存。 这很重要:我们所有的视图都是结构,这意味着它们无法更改,如果我们甚至无法在应用程序中修改整数,那么我们将无能为力。
因此,当我们说 `@State` 做一个属性时,我们将其控制权交给 `SwiftUI`,以便只要视图存在,它就在内存中保持持久。 当状态发生变化时,`SwiftUI` 会自动将视图的最新更改重新加载到视图中,以便它可以反映其新信息。
`@State` 对于属于特定视图且永远不会在该视图之外使用的简单属性非常有用,因此,将这些属性标记为私有很重要,以加强这种状态是专门为当前视图视图使用的而设计的。
## 什么是 `@ObservedObject` ?
对于更复杂的属性;当您要使用的自定义类型可能具有多个属性和方法,或者可能在多个视图之间共享时,通常会使用 `@ObservedObject`。
这与 `@State` 非常相似,不同之处在于,我们现在使用的是外部引用类型,而不是简单的本地属性(例如 `String` 或 `Integer`)。您仍然说的是,视图依赖于会发生变化的数据,但现在您负责管理自己的数据除外-您需要创建该类的实例,创建其自己的属性,等等。
与 `@ObservedObject` 一起使用的任何类型都应符合 `ObservableObject` 协议。在将属性添加到可观察对象时,您可以决定是否对每个属性进行更改都应强制正在刷新正在监视对象的视图。您通常会这样做,但这不是必需的。
观察对象可以通过多种方式通知视图重要数据已更改,但是最简单的方法是使用 `@Published` 属性包装器。如果需要更多控制,也可以从 `Combine` 框架使用自定义发布者,但是实际上这很少见。如果可观察对象使用其数据碰巧有多个视图,则任一选项都会自动通知所有对象。
警告:当您使用自定义发布者宣布您的对象已更改时,这必须在主线程上发生。
## 什么是 `@StateObject`?
`@State` 和 `@ObservedObject` 之间的某个位置是 `@StateObject`。 这是 `@ObservedObject` 的专用版本,其工作方式几乎完全相同:您必须遵守 `ObservableObject` 协议,可以使用 `@Published` 将属性标记为引起更改通知,并且当对象改变时,所有监视 `@StateObject` 的视图都将刷新。
`@StateObject` 和 `@ObservedObject` 之间有一个重要的区别,那就是所有权 – 哪个视图创建了该对象,以及哪个视图仅在监视它。
规则是这样的:无论哪个视图是第一个创建对象的视图,都必须使用 `@StateObject` 来告诉 `SwiftUI` 它是数据的所有者,并负责保持其活动状态。 所有其他视图必须使用 `@ObservedObject`,以告诉 `SwiftUI` 他们想监视对象的更改,但不直接拥有它。
## 什么是 `@EnvironmentObject`?
您已经了解了 `@State` 如何为类型声明简单属性,该类型在更改时会自动刷新视图,以及 `@ObservedObject` 如何为外部类型声明属性,当更改时可能会或不会导致视图刷新。这两个都必须由您的视图设置,但是 `@ObservedObject` 可能与其他视图共享。
还有另一种可以使用的属性包装器,即 `@EnvironmentObject`。这个值可通过应用程序本身提供给视图,它是每个视图都可以读取的共享数据。因此,如果您的应用程序具有一些重要的模型数据,所有视图都需要读取这些数据,则可以将其从一个视图到另一个视图,或者只是将其置于每个视图都可以即时访问它的环境中。
当需要在应用程序中传递大量数据时,`@EnvironmentObject` 可以为您带来极大的便利。由于所有视图都指向同一模型,因此,如果一个视图更改了模型,则所有视图都将立即更新-这样就不会冒着使应用程序的不同部分不同步的风险。
## 总结差异
初始化 `ObservableObject` 时,应使用 `@StateObject` 而不是 `@ObservedObject`。 您的视图可以接收其他视图拥有的对象,例如 `@ObservedObject`或`@EnvironmentObject`,但是数据的所有者应始终使用 `@StateObject` 创建数据对象。
- 将 `@State` 用于属于单个视图的简单属性。 通常应将其标记为私有。
- 将 `@ObservedObject` 用于可能属于多个视图的复杂属性。 大多数情况下,您应该使用引用类型 `@ObservedObject` 。
- 对于您使用的每个可观察对象,请使用 `@StateObject` 一次,无论代码的哪个部分负责创建它。
- 将 `@EnvironmentObject` 用于在应用程序其他位置创建的属性,例如共享数据。
在这四个中,如果不确定从哪个位置开始使用。您会发现 `@ObservedObject` 既最有用,也是最常用的。
================================================
FILE: example/advanced-state/demo2/Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo2/Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo2/Demo/Demo/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo2/Demo/Demo/ContentView.swift
================================================
//
// ContentView.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
class Player: ObservableObject {
@Published var name = "Taylor"
@Published var age = 26
}
struct ContentView: View {
@StateObject var player = Player()
var body: some View {
NavigationView {
NavigationLink(destination: PlayerNameView(player: player)) {
Text("Show detail view")
}
}
}
}
struct PlayerNameView: View {
@ObservedObject var player: Player
var body: some View {
Text("Hello, \(player.name)!")
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/advanced-state/demo2/Demo/Demo/Demo.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/advanced-state/demo2/Demo/Demo/DemoApp.swift
================================================
//
// DemoApp.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/advanced-state/demo2/Demo/Demo/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/advanced-state/demo2/Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo2/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D36491025FFDC0500C13C01 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36490F25FFDC0500C13C01 /* DemoApp.swift */; };
7D36491225FFDC0500C13C01 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36491125FFDC0500C13C01 /* ContentView.swift */; };
7D36491425FFDC0600C13C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36491325FFDC0600C13C01 /* Assets.xcassets */; };
7D36491725FFDC0600C13C01 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36491625FFDC0600C13C01 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D36490C25FFDC0500C13C01 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D36490F25FFDC0500C13C01 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D36491125FFDC0500C13C01 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D36491325FFDC0600C13C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D36491625FFDC0600C13C01 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
7D36491825FFDC0600C13C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D36491925FFDC0600C13C01 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D36490925FFDC0500C13C01 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D36490325FFDC0500C13C01 = {
isa = PBXGroup;
children = (
7D36490E25FFDC0500C13C01 /* Demo */,
7D36490D25FFDC0500C13C01 /* Products */,
);
sourceTree = "";
};
7D36490D25FFDC0500C13C01 /* Products */ = {
isa = PBXGroup;
children = (
7D36490C25FFDC0500C13C01 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D36490E25FFDC0500C13C01 /* Demo */ = {
isa = PBXGroup;
children = (
7D36490F25FFDC0500C13C01 /* DemoApp.swift */,
7D36491125FFDC0500C13C01 /* ContentView.swift */,
7D36491325FFDC0600C13C01 /* Assets.xcassets */,
7D36491825FFDC0600C13C01 /* Info.plist */,
7D36491925FFDC0600C13C01 /* Demo.entitlements */,
7D36491525FFDC0600C13C01 /* Preview Content */,
);
path = Demo;
sourceTree = "";
};
7D36491525FFDC0600C13C01 /* Preview Content */ = {
isa = PBXGroup;
children = (
7D36491625FFDC0600C13C01 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D36490B25FFDC0500C13C01 /* Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D36491C25FFDC0600C13C01 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
7D36490825FFDC0500C13C01 /* Sources */,
7D36490925FFDC0500C13C01 /* Frameworks */,
7D36490A25FFDC0500C13C01 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Demo;
productName = Demo;
productReference = 7D36490C25FFDC0500C13C01 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D36490425FFDC0500C13C01 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D36490B25FFDC0500C13C01 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D36490725FFDC0500C13C01 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D36490325FFDC0500C13C01;
productRefGroup = 7D36490D25FFDC0500C13C01 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D36490B25FFDC0500C13C01 /* Demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D36490A25FFDC0500C13C01 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36491725FFDC0600C13C01 /* Preview Assets.xcassets in Resources */,
7D36491425FFDC0600C13C01 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D36490825FFDC0500C13C01 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36491225FFDC0500C13C01 /* ContentView.swift in Sources */,
7D36491025FFDC0500C13C01 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D36491A25FFDC0600C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D36491B25FFDC0600C13C01 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D36491D25FFDC0600C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D36491E25FFDC0600C13C01 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D36490725FFDC0500C13C01 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36491A25FFDC0600C13C01 /* Debug */,
7D36491B25FFDC0600C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D36491C25FFDC0600C13C01 /* Build configuration list for PBXNativeTarget "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36491D25FFDC0600C13C01 /* Debug */,
7D36491E25FFDC0600C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D36490425FFDC0500C13C01 /* Project object */;
}
================================================
FILE: example/advanced-state/demo2/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/advanced-state/demo2/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/advanced-state/demo2/README.md
================================================
如何使用 `@StateObject` 创建和监视外部对象?
===
`SwiftUI` 的 `@StateObject` 属性包装器是 `@ObservedObject` 的一种特殊形式,具有所有相同的功能,但还有一个重要的附加功能:它应该用于创建观察到的对象,而不仅仅是存储从外部传入的对象。
当您使用 `@StateObject` 向视图添加属性时,`SwiftUI` 认为该视图是可观察对象的所有者。 传递该对象的所有其他视图应使用 `@ObservedObject`。
这真的很重要。 严重的是,如果您弄错了,您的对象可能会被意外破坏,这将导致您的应用看似随机崩溃。
因此,要明确一点:您应该使用 `@StateObject` 在某个位置创建可观察对象,并且在传递该对象的所有后续位置中,都应该使用 `@ObservedObject`。
这是代码示例:
```swift
class Player: ObservableObject {
@Published var name = "Taylor"
@Published var age = 26
}
struct ContentView: View {
@StateObject var player = Player()
var body: some View {
NavigationView {
NavigationLink(destination: PlayerNameView(player: player)) {
Text("Show detail view")
}
}
}
}
struct PlayerNameView: View {
@ObservedObject var player: Player
var body: some View {
Text("Hello, \(player.name)!")
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
```
如果您很难记住区别,请尝试以下操作:每当在属性包装程序中看到 `State` 时,例如 `@State`,`@StateObject`,`@GestureState`,表示“当前视图拥有此数据”。
================================================
FILE: example/advanced-state/demo3/Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo3/Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo3/Demo/Demo/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo3/Demo/Demo/ContentView.swift
================================================
//
// ContentView.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
class UserProgress: ObservableObject {
@Published var score = 0
}
struct InnerView: View {
@ObservedObject var progress: UserProgress
var body: some View {
Button("Increase Score") {
progress.score += 1
}
}
}
struct ContentView: View {
@StateObject var progress = UserProgress()
var body: some View {
VStack {
Text("Your score is \(progress.score)")
InnerView(progress: progress)
}
.padding(100)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/advanced-state/demo3/Demo/Demo/Demo.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/advanced-state/demo3/Demo/Demo/DemoApp.swift
================================================
//
// DemoApp.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/advanced-state/demo3/Demo/Demo/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/advanced-state/demo3/Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo3/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D36492D25FFDCF600C13C01 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36492C25FFDCF600C13C01 /* DemoApp.swift */; };
7D36492F25FFDCF600C13C01 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36492E25FFDCF600C13C01 /* ContentView.swift */; };
7D36493125FFDCF700C13C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36493025FFDCF700C13C01 /* Assets.xcassets */; };
7D36493425FFDCF700C13C01 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36493325FFDCF700C13C01 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D36492925FFDCF600C13C01 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D36492C25FFDCF600C13C01 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D36492E25FFDCF600C13C01 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D36493025FFDCF700C13C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D36493325FFDCF700C13C01 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
7D36493525FFDCF700C13C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D36493625FFDCF700C13C01 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D36492625FFDCF600C13C01 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D36492025FFDCF600C13C01 = {
isa = PBXGroup;
children = (
7D36492B25FFDCF600C13C01 /* Demo */,
7D36492A25FFDCF600C13C01 /* Products */,
);
sourceTree = "";
};
7D36492A25FFDCF600C13C01 /* Products */ = {
isa = PBXGroup;
children = (
7D36492925FFDCF600C13C01 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D36492B25FFDCF600C13C01 /* Demo */ = {
isa = PBXGroup;
children = (
7D36492C25FFDCF600C13C01 /* DemoApp.swift */,
7D36492E25FFDCF600C13C01 /* ContentView.swift */,
7D36493025FFDCF700C13C01 /* Assets.xcassets */,
7D36493525FFDCF700C13C01 /* Info.plist */,
7D36493625FFDCF700C13C01 /* Demo.entitlements */,
7D36493225FFDCF700C13C01 /* Preview Content */,
);
path = Demo;
sourceTree = "";
};
7D36493225FFDCF700C13C01 /* Preview Content */ = {
isa = PBXGroup;
children = (
7D36493325FFDCF700C13C01 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D36492825FFDCF600C13C01 /* Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D36493925FFDCF700C13C01 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
7D36492525FFDCF600C13C01 /* Sources */,
7D36492625FFDCF600C13C01 /* Frameworks */,
7D36492725FFDCF600C13C01 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Demo;
productName = Demo;
productReference = 7D36492925FFDCF600C13C01 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D36492125FFDCF600C13C01 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D36492825FFDCF600C13C01 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D36492425FFDCF600C13C01 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D36492025FFDCF600C13C01;
productRefGroup = 7D36492A25FFDCF600C13C01 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D36492825FFDCF600C13C01 /* Demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D36492725FFDCF600C13C01 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36493425FFDCF700C13C01 /* Preview Assets.xcassets in Resources */,
7D36493125FFDCF700C13C01 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D36492525FFDCF600C13C01 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36492F25FFDCF600C13C01 /* ContentView.swift in Sources */,
7D36492D25FFDCF600C13C01 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D36493725FFDCF700C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D36493825FFDCF700C13C01 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D36493A25FFDCF700C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D36493B25FFDCF700C13C01 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D36492425FFDCF600C13C01 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36493725FFDCF700C13C01 /* Debug */,
7D36493825FFDCF700C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D36493925FFDCF700C13C01 /* Build configuration list for PBXNativeTarget "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36493A25FFDCF700C13C01 /* Debug */,
7D36493B25FFDCF700C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D36492125FFDCF600C13C01 /* Project object */;
}
================================================
FILE: example/advanced-state/demo3/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/advanced-state/demo3/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/advanced-state/demo3/README.md
================================================
如何使用 `@ObservedObject` 管理外部对象的状态?
===
使用观察对象时,我们需要处理三个关键事项:`ObservableObject` 协议与某种可以存储数据的类一起使用,`@ObservedObject` 属性包装器用于在视图内部存储可观察对象的实例,以及 `@Published` 的属性包装器将添加到观察对象内部的任何属性,这些属性应导致视图在更改时进行更新。
提示:仅将 `@ObservedObject` 用于从其他位置传入的视图,这一点非常重要。 您不应使用此属性包装器来创建可观察对象的初始实例,这就是 `@StateObject` 的目的。
举例来说,这是一个符合 `ObservableObject` 的 `UserProgress` 类:
```swift
class UserProgress: ObservableObject {
@Published var score = 0
}
```
我知道代码看起来不多,但这是因为 `SwiftUI` 代表我们做了很多工作! 里面有两件事很重要:
- `ObservableObject`一致性允许在视图内部使用此类的实例,以便在发生重要更改时重新加载视图。
- `@Published` 属性包装器告诉 `SwiftUI` 得分的更改应触发视图重新加载。
我们可以将 `UserProgress` 类与以下代码一起使用:
```swift
class UserProgress: ObservableObject {
@Published var score = 0
}
struct InnerView: View {
@ObservedObject var progress: UserProgress
var body: some View {
Button("Increase Score") {
progress.score += 1
}
}
}
struct ContentView: View {
@StateObject var progress = UserProgress()
var body: some View {
VStack {
Text("Your score is \(progress.score)")
InnerView(progress: progress)
}
.padding(100)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
```
如您所见,除了使用 `@ObservedObject` 属性包装器进行进度处理外,其他所有内容或多或少看起来都是相同的– `SwiftUI` 为我们处理了所有实现细节。
不过,有一个重要的区别:`progress` 属性未声明为私有。 这是因为绑定的对象可以被多个视图使用,因此通常将其公开共享。
请记住,请不要使用 `@ObservedObject` 创建对象的实例。 如果您要这样做,请改用 `@StateObject`。
================================================
FILE: example/advanced-state/demo4/Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo4/Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo4/Demo/Demo/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo4/Demo/Demo/ContentView.swift
================================================
//
// ContentView.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
// 我们的可观察对象类
class GameSettings: ObservableObject {
@Published var score = 0
}
// 期望找到 GameSettings 对象的视图
// 在环境中,并显示其得分。
struct ScoreView: View {
@EnvironmentObject var settings: GameSettings
var body: some View {
Text("Score: \(settings.score)")
}
}
struct ContentView: View {
@StateObject var settings = GameSettings()
var body: some View {
NavigationView {
VStack {
// 写入 environment settings 的按钮
Button("Increase Score") {
settings.score += 1
}
NavigationLink(destination: ScoreView()) {
Text("Show Detail View")
}
}
.frame(height: 200)
}
.environmentObject(settings)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/advanced-state/demo4/Demo/Demo/Demo.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/advanced-state/demo4/Demo/Demo/DemoApp.swift
================================================
//
// DemoApp.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/advanced-state/demo4/Demo/Demo/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/advanced-state/demo4/Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo4/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D36494A25FFDF5300C13C01 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36494925FFDF5300C13C01 /* DemoApp.swift */; };
7D36494C25FFDF5300C13C01 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36494B25FFDF5300C13C01 /* ContentView.swift */; };
7D36494E25FFDF5400C13C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36494D25FFDF5400C13C01 /* Assets.xcassets */; };
7D36495125FFDF5400C13C01 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36495025FFDF5400C13C01 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D36494625FFDF5300C13C01 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D36494925FFDF5300C13C01 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D36494B25FFDF5300C13C01 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D36494D25FFDF5400C13C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D36495025FFDF5400C13C01 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
7D36495225FFDF5400C13C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D36495325FFDF5400C13C01 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D36494325FFDF5300C13C01 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D36493D25FFDF5300C13C01 = {
isa = PBXGroup;
children = (
7D36494825FFDF5300C13C01 /* Demo */,
7D36494725FFDF5300C13C01 /* Products */,
);
sourceTree = "";
};
7D36494725FFDF5300C13C01 /* Products */ = {
isa = PBXGroup;
children = (
7D36494625FFDF5300C13C01 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D36494825FFDF5300C13C01 /* Demo */ = {
isa = PBXGroup;
children = (
7D36494925FFDF5300C13C01 /* DemoApp.swift */,
7D36494B25FFDF5300C13C01 /* ContentView.swift */,
7D36494D25FFDF5400C13C01 /* Assets.xcassets */,
7D36495225FFDF5400C13C01 /* Info.plist */,
7D36495325FFDF5400C13C01 /* Demo.entitlements */,
7D36494F25FFDF5400C13C01 /* Preview Content */,
);
path = Demo;
sourceTree = "";
};
7D36494F25FFDF5400C13C01 /* Preview Content */ = {
isa = PBXGroup;
children = (
7D36495025FFDF5400C13C01 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D36494525FFDF5300C13C01 /* Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D36495625FFDF5400C13C01 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
7D36494225FFDF5300C13C01 /* Sources */,
7D36494325FFDF5300C13C01 /* Frameworks */,
7D36494425FFDF5300C13C01 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Demo;
productName = Demo;
productReference = 7D36494625FFDF5300C13C01 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D36493E25FFDF5300C13C01 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D36494525FFDF5300C13C01 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D36494125FFDF5300C13C01 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D36493D25FFDF5300C13C01;
productRefGroup = 7D36494725FFDF5300C13C01 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D36494525FFDF5300C13C01 /* Demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D36494425FFDF5300C13C01 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36495125FFDF5400C13C01 /* Preview Assets.xcassets in Resources */,
7D36494E25FFDF5400C13C01 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D36494225FFDF5300C13C01 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36494C25FFDF5300C13C01 /* ContentView.swift in Sources */,
7D36494A25FFDF5300C13C01 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D36495425FFDF5400C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D36495525FFDF5400C13C01 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D36495725FFDF5400C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D36495825FFDF5400C13C01 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D36494125FFDF5300C13C01 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36495425FFDF5400C13C01 /* Debug */,
7D36495525FFDF5400C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D36495625FFDF5400C13C01 /* Build configuration list for PBXNativeTarget "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36495725FFDF5400C13C01 /* Debug */,
7D36495825FFDF5400C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D36493E25FFDF5300C13C01 /* Project object */;
}
================================================
FILE: example/advanced-state/demo4/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/advanced-state/demo4/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/advanced-state/demo4/README.md
================================================
如何使用 `@EnvironmentObject` 在视图之间共享数据?
===
对于应与应用程序中的许多视图共享的数据,`SwiftUI` 为我们提供了 `@EnvironmentObject` 属性包装器。 这样一来,我们就可以在需要的任何地方共享模型数据,同时还可以确保在数据更改时我们的视图自动保持更新。
将 `@EnvironmentObject` 视为在许多视图上使用 `@ObservedObject` 的更智能,更简单的方法。 与其在视图 `A` 中创建一些数据,然后将其传递到视图 `B`,视图 `C`,然后在最终使用它之前将其传递给视图 `D`,您可以在视图中创建它并将其放入环境中,以便视图`B`,`C` 和 `D`将 自动访问它。
就像 `@ObservedObject` 一样,您永远不会将值分配给 `@EnvironmentObject` 属性。 相反,它应该从其他地方传入,最终您可能会想使用 `@StateObject` 在某个地方创建它。
但是,与 `@ObservedObject` 不同,我们不会手动将对象传递到其他视图中。 取而代之的是,我们将数据发送到一个名为 `environmentObject()` 的修饰符中,该修饰符使该对象及其视图中的其他视图在 `SwiftUI` 的环境中可用。
注意:环境对象必须由祖先视图提供-如果 `SwiftUI` 找不到正确类型的环境对象,则会崩溃。 这也适用于预览,因此请小心。
为了演示环境对象,我们将定义三件事:
- 一个 `GameSettings` 类,包含一个发布的单个属性,称为 `score`。
- 期望在环境中接收 `GameSettings` 对象的 `ScoreView` 视图,并显示其 `score` 属性。
- 创建一个 `GameSettings` 对象的 `ContentView` 视图,具有一个将其得分属性加1的按钮,以及一个用于显示详细信息视图的 `NavigationLink`。
这是代码:
```swift
// 我们的可观察对象类
class GameSettings: ObservableObject {
@Published var score = 0
}
// 期望找到 GameSettings 对象的视图
// 在环境中,并显示其得分。
struct ScoreView: View {
@EnvironmentObject var settings: GameSettings
var body: some View {
Text("Score: \(settings.score)")
}
}
struct ContentView: View {
@StateObject var settings = GameSettings()
var body: some View {
NavigationView {
VStack {
// 写入 environment settings 的按钮
Button("Increase Score") {
settings.score += 1
}
NavigationLink(destination: ScoreView()) {
Text("Show Detail View")
}
}
.frame(height: 200)
}
.environmentObject(settings)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
```
我想在该代码中挑选出几个重要的部分:
- 就像 `@StateObject` 和 `@ObservedObject` 一样,与 `@EnvironmentObject` 一起使用的所有类都必须符合 `ObservableObject` 协议。
- 我们将 `GameSettings` 放入导航视图的环境中,这意味着导航视图内的所有视图都可以读取该对象(如果需要)以及该导航视图显示的任何视图。
- 使用 `@EnvironmentObject` 属性包装器时,您声明了您希望接收的东西的类型,但是您没有创建它-毕竟您希望从环境中接收它。
- 因为我们的详细信息视图显示在导航视图内部,所以它可以访问相同的环境,这又意味着它可以读取我们创建的 `GameSettings` 对象。
- 我们不需要将环境中的 `GameSettings` 实例与 `ScoreView` 中的 `settings` 属性显式关联- `SwiftUI` 会自动发现它在环境中具有 `GameSettings` 实例,因此就是它所使用的实例。
警告:既然我们的视图依赖于当前的环境对象,那么还必须更新预览代码以提供一些示例设置供您使用,这一点很重要。 例如,为预览使用诸如 `ScoreView().environmentObject(GameSettings())` 之类的东西就可以做到。
如果需要向环境中添加多个对象,则应添加多个 `environmentObject()` 修饰符–只需一个接一个地调用它们即可。
================================================
FILE: example/advanced-state/demo5/Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo5/Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo5/Demo/Demo/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo5/Demo/Demo/ContentView.swift
================================================
//
// ContentView.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
// 创建一个可观察的对象类,它宣布
// 更改为其唯一属性
class UserAuthentication: ObservableObject {
var username = "Taylor" {
willSet {
objectWillChange.send()
}
}
}
struct ContentView: View {
@StateObject var user = UserAuthentication()
var body: some View {
VStack(alignment: .leading) {
TextField("Enter your name", text: $user.username)
Text("Your username is: \(user.username)")
}
.padding(100)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/advanced-state/demo5/Demo/Demo/Demo.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/advanced-state/demo5/Demo/Demo/DemoApp.swift
================================================
//
// DemoApp.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/advanced-state/demo5/Demo/Demo/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/advanced-state/demo5/Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo5/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D36496725FFE34B00C13C01 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36496625FFE34B00C13C01 /* DemoApp.swift */; };
7D36496925FFE34B00C13C01 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36496825FFE34B00C13C01 /* ContentView.swift */; };
7D36496B25FFE34C00C13C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36496A25FFE34C00C13C01 /* Assets.xcassets */; };
7D36496E25FFE34C00C13C01 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36496D25FFE34C00C13C01 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D36496325FFE34B00C13C01 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D36496625FFE34B00C13C01 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D36496825FFE34B00C13C01 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D36496A25FFE34C00C13C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D36496D25FFE34C00C13C01 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
7D36496F25FFE34C00C13C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D36497025FFE34C00C13C01 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D36496025FFE34B00C13C01 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D36495A25FFE34B00C13C01 = {
isa = PBXGroup;
children = (
7D36496525FFE34B00C13C01 /* Demo */,
7D36496425FFE34B00C13C01 /* Products */,
);
sourceTree = "";
};
7D36496425FFE34B00C13C01 /* Products */ = {
isa = PBXGroup;
children = (
7D36496325FFE34B00C13C01 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D36496525FFE34B00C13C01 /* Demo */ = {
isa = PBXGroup;
children = (
7D36496625FFE34B00C13C01 /* DemoApp.swift */,
7D36496825FFE34B00C13C01 /* ContentView.swift */,
7D36496A25FFE34C00C13C01 /* Assets.xcassets */,
7D36496F25FFE34C00C13C01 /* Info.plist */,
7D36497025FFE34C00C13C01 /* Demo.entitlements */,
7D36496C25FFE34C00C13C01 /* Preview Content */,
);
path = Demo;
sourceTree = "";
};
7D36496C25FFE34C00C13C01 /* Preview Content */ = {
isa = PBXGroup;
children = (
7D36496D25FFE34C00C13C01 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D36496225FFE34B00C13C01 /* Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D36497325FFE34C00C13C01 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
7D36495F25FFE34B00C13C01 /* Sources */,
7D36496025FFE34B00C13C01 /* Frameworks */,
7D36496125FFE34B00C13C01 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Demo;
productName = Demo;
productReference = 7D36496325FFE34B00C13C01 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D36495B25FFE34B00C13C01 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D36496225FFE34B00C13C01 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D36495E25FFE34B00C13C01 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D36495A25FFE34B00C13C01;
productRefGroup = 7D36496425FFE34B00C13C01 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D36496225FFE34B00C13C01 /* Demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D36496125FFE34B00C13C01 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36496E25FFE34C00C13C01 /* Preview Assets.xcassets in Resources */,
7D36496B25FFE34C00C13C01 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D36495F25FFE34B00C13C01 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36496925FFE34B00C13C01 /* ContentView.swift in Sources */,
7D36496725FFE34B00C13C01 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D36497125FFE34C00C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D36497225FFE34C00C13C01 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D36497425FFE34C00C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D36497525FFE34C00C13C01 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D36495E25FFE34B00C13C01 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36497125FFE34C00C13C01 /* Debug */,
7D36497225FFE34C00C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D36497325FFE34C00C13C01 /* Build configuration list for PBXNativeTarget "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36497425FFE34C00C13C01 /* Debug */,
7D36497525FFE34C00C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D36495B25FFE34B00C13C01 /* Project object */;
}
================================================
FILE: example/advanced-state/demo5/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/advanced-state/demo5/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/advanced-state/demo5/README.md
================================================
如何使用 `objectWillChange` 手动发送状态更新?
===
尽管使用 `@Published` 是控制状态更新的最简单方法,但是如果需要特定的操作,也可以手动执行。例如,您可能只希望对给定的值感到满意才刷新视图。
所有可观察的对象都会自动访问 `objectWillChange` 属性,该属性本身具有 `send()`方法,只要我们想刷新观察的视图,就可以调用该方法。
例如:
```swift
// 创建一个可观察的对象类,它宣布
// 更改为其唯一属性
class UserAuthentication: ObservableObject {
var username = "Taylor" {
willSet {
objectWillChange.send()
}
}
}
struct ContentView: View {
@StateObject var user = UserAuthentication()
var body: some View {
VStack(alignment: .leading) {
TextField("Enter your name", text: $user.username)
Text("Your username is: \(user.username)")
}
.padding(100)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
```
请注意,我们如何将 `willSet` 属性观察器附加到 `UserAuthentication` 的 `username` 属性上,从而使我们可以在该值更改时运行代码。 在示例代码中,每当用户名更改时,我们都调用 `objectWillChange.send()`,这告诉 `ObjectWillChange` 发布者发布有关我们的数据已更改的消息,以便任何订阅的视图都可以刷新。
提示:该示例与在属性上使用 `@Published` 没什么不同,但是现在我们有了对 `objectWillChange.send()` 的自定义调用,我们可以添加额外的功能–例如,可以将值保存到磁盘。
================================================
FILE: example/advanced-state/demo6/Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo6/Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo6/Demo/Demo/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo6/Demo/Demo/ContentView.swift
================================================
//
// ContentView.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
struct ContentView: View {
var body: some View {
Toggle(isOn: .constant(true)) {
Text("Show advanced options")
}
.padding(100)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/advanced-state/demo6/Demo/Demo/Demo.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/advanced-state/demo6/Demo/Demo/DemoApp.swift
================================================
//
// DemoApp.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/advanced-state/demo6/Demo/Demo/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/advanced-state/demo6/Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo6/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D36498425FFE4E500C13C01 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36498325FFE4E500C13C01 /* DemoApp.swift */; };
7D36498625FFE4E500C13C01 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D36498525FFE4E500C13C01 /* ContentView.swift */; };
7D36498825FFE4E500C13C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36498725FFE4E500C13C01 /* Assets.xcassets */; };
7D36498B25FFE4E500C13C01 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D36498A25FFE4E500C13C01 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D36498025FFE4E400C13C01 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D36498325FFE4E500C13C01 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D36498525FFE4E500C13C01 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D36498725FFE4E500C13C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D36498A25FFE4E500C13C01 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
7D36498C25FFE4E500C13C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D36498D25FFE4E500C13C01 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D36497D25FFE4E400C13C01 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D36497725FFE4E400C13C01 = {
isa = PBXGroup;
children = (
7D36498225FFE4E400C13C01 /* Demo */,
7D36498125FFE4E400C13C01 /* Products */,
);
sourceTree = "";
};
7D36498125FFE4E400C13C01 /* Products */ = {
isa = PBXGroup;
children = (
7D36498025FFE4E400C13C01 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D36498225FFE4E400C13C01 /* Demo */ = {
isa = PBXGroup;
children = (
7D36498325FFE4E500C13C01 /* DemoApp.swift */,
7D36498525FFE4E500C13C01 /* ContentView.swift */,
7D36498725FFE4E500C13C01 /* Assets.xcassets */,
7D36498C25FFE4E500C13C01 /* Info.plist */,
7D36498D25FFE4E500C13C01 /* Demo.entitlements */,
7D36498925FFE4E500C13C01 /* Preview Content */,
);
path = Demo;
sourceTree = "";
};
7D36498925FFE4E500C13C01 /* Preview Content */ = {
isa = PBXGroup;
children = (
7D36498A25FFE4E500C13C01 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D36497F25FFE4E400C13C01 /* Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D36499025FFE4E500C13C01 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
7D36497C25FFE4E400C13C01 /* Sources */,
7D36497D25FFE4E400C13C01 /* Frameworks */,
7D36497E25FFE4E400C13C01 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Demo;
productName = Demo;
productReference = 7D36498025FFE4E400C13C01 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D36497825FFE4E400C13C01 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D36497F25FFE4E400C13C01 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D36497B25FFE4E400C13C01 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D36497725FFE4E400C13C01;
productRefGroup = 7D36498125FFE4E400C13C01 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D36497F25FFE4E400C13C01 /* Demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D36497E25FFE4E400C13C01 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36498B25FFE4E500C13C01 /* Preview Assets.xcassets in Resources */,
7D36498825FFE4E500C13C01 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D36497C25FFE4E400C13C01 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D36498625FFE4E500C13C01 /* ContentView.swift in Sources */,
7D36498425FFE4E500C13C01 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D36498E25FFE4E500C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D36498F25FFE4E500C13C01 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D36499125FFE4E500C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D36499225FFE4E500C13C01 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D36497B25FFE4E400C13C01 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36498E25FFE4E500C13C01 /* Debug */,
7D36498F25FFE4E500C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D36499025FFE4E500C13C01 /* Build configuration list for PBXNativeTarget "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D36499125FFE4E500C13C01 /* Debug */,
7D36499225FFE4E500C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D36497825FFE4E400C13C01 /* Project object */;
}
================================================
FILE: example/advanced-state/demo6/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/advanced-state/demo6/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/advanced-state/demo6/README.md
================================================
如何创建常量绑定?
===
当您在制作一些UI原型时,或者只需要传递一个值以使 SwiftUI 预览有意义地显示时,您会发现使用常量绑定会有所帮助:不变的硬编码值,但是可以 仍然像常规绑定一样使用,因此您的代码可以正常工作。
例如,如果要创建切换开关,通常必须创建一个 `@State` 属性来存储布尔值,然后在创建它时将其发送到切换开关中。 但是,如果您只是在设计用户界面的原型,则可以改用常量绑定,如下所示:
```swift
Toggle(isOn: .constant(true)) {
Text("Show advanced options")
}
```
该开关是只读的,并且始终处于打开状态,因为这就是我们不变的绑定所说的内容,但是现在足以让您动起来了–您可以稍后再将其替换为完整的 `@State` 属性。
这些常量绑定有各种类型:布尔值,字符串,整数等都可用,并且 `Swift` 会确保为每种视图类型使用正确的绑定。
================================================
FILE: example/advanced-state/demo7/Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo7/Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo7/Demo/Demo/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo7/Demo/Demo/ContentView.swift
================================================
//
// ContentView.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
struct ContentView: View {
@State private var firstToggle = false
@State private var secondToggle = false
var body: some View {
let firstBinding = Binding(
get: { self.firstToggle },
set: {
self.firstToggle = $0
if $0 == true {
self.secondToggle = false
}
}
)
let secondBinding = Binding(
get: { self.secondToggle },
set: {
self.secondToggle = $0
if $0 == true {
self.firstToggle = false
}
}
)
return VStack {
Toggle(isOn: firstBinding) {
Text("First toggle")
}
Toggle(isOn: secondBinding) {
Text("Second toggle")
}
}
.padding(100)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/advanced-state/demo7/Demo/Demo/Demo.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/advanced-state/demo7/Demo/Demo/DemoApp.swift
================================================
//
// DemoApp.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/advanced-state/demo7/Demo/Demo/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/advanced-state/demo7/Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo7/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D3649A125FFE57700C13C01 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3649A025FFE57700C13C01 /* DemoApp.swift */; };
7D3649A325FFE57700C13C01 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3649A225FFE57700C13C01 /* ContentView.swift */; };
7D3649A525FFE57800C13C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D3649A425FFE57800C13C01 /* Assets.xcassets */; };
7D3649A825FFE57800C13C01 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D3649A725FFE57800C13C01 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D36499D25FFE57700C13C01 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D3649A025FFE57700C13C01 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D3649A225FFE57700C13C01 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D3649A425FFE57800C13C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D3649A725FFE57800C13C01 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
7D3649A925FFE57800C13C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D3649AA25FFE57800C13C01 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D36499A25FFE57700C13C01 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D36499425FFE57700C13C01 = {
isa = PBXGroup;
children = (
7D36499F25FFE57700C13C01 /* Demo */,
7D36499E25FFE57700C13C01 /* Products */,
);
sourceTree = "";
};
7D36499E25FFE57700C13C01 /* Products */ = {
isa = PBXGroup;
children = (
7D36499D25FFE57700C13C01 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D36499F25FFE57700C13C01 /* Demo */ = {
isa = PBXGroup;
children = (
7D3649A025FFE57700C13C01 /* DemoApp.swift */,
7D3649A225FFE57700C13C01 /* ContentView.swift */,
7D3649A425FFE57800C13C01 /* Assets.xcassets */,
7D3649A925FFE57800C13C01 /* Info.plist */,
7D3649AA25FFE57800C13C01 /* Demo.entitlements */,
7D3649A625FFE57800C13C01 /* Preview Content */,
);
path = Demo;
sourceTree = "";
};
7D3649A625FFE57800C13C01 /* Preview Content */ = {
isa = PBXGroup;
children = (
7D3649A725FFE57800C13C01 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D36499C25FFE57700C13C01 /* Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D3649AD25FFE57800C13C01 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
7D36499925FFE57700C13C01 /* Sources */,
7D36499A25FFE57700C13C01 /* Frameworks */,
7D36499B25FFE57700C13C01 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Demo;
productName = Demo;
productReference = 7D36499D25FFE57700C13C01 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D36499525FFE57700C13C01 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D36499C25FFE57700C13C01 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D36499825FFE57700C13C01 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D36499425FFE57700C13C01;
productRefGroup = 7D36499E25FFE57700C13C01 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D36499C25FFE57700C13C01 /* Demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D36499B25FFE57700C13C01 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D3649A825FFE57800C13C01 /* Preview Assets.xcassets in Resources */,
7D3649A525FFE57800C13C01 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D36499925FFE57700C13C01 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D3649A325FFE57700C13C01 /* ContentView.swift in Sources */,
7D3649A125FFE57700C13C01 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D3649AB25FFE57800C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D3649AC25FFE57800C13C01 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D3649AE25FFE57800C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D3649AF25FFE57800C13C01 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D36499825FFE57700C13C01 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D3649AB25FFE57800C13C01 /* Debug */,
7D3649AC25FFE57800C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D3649AD25FFE57800C13C01 /* Build configuration list for PBXNativeTarget "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D3649AE25FFE57800C13C01 /* Debug */,
7D3649AF25FFE57800C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D36499525FFE57700C13C01 /* Project object */;
}
================================================
FILE: example/advanced-state/demo7/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/advanced-state/demo7/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/advanced-state/demo7/README.md
================================================
如何创建自定义绑定?
===
当我们使用 `SwiftUI` 的 `@State` 属性包装器时,它代表我们进行了大量工作,以允许用户界面控件进行双向绑定。 但是,我们也可以使用 `Binding` 类型手动创建绑定,该类型可以与自定义 `get` 和 `set` 闭包一起提供,以在读取或写入值时运行。
例如,这将创建一个琐碎的绑定,该绑定仅充当另一个属性的传递:
```swift
struct ContentView: View {
@State private var username = ""
var body: some View {
let binding = Binding(
get: { self.username },
set: { self.username = $0 }
)
return VStack {
TextField("Enter your name", text: binding)
}
}
}
```
提示:绑定到自定义 `Binding` 实例时,无需在绑定名称前使用美元符号-您已经在阅读双向绑定。
当您想为正在读取或写入的绑定添加额外的逻辑时,自定义绑定非常有用–您可能需要在返回值之前执行一些计算,或者在更改值时希望执行一些额外的操作。
例如,我们可以创建一个由两个拨动开关组成的堆栈,两个拨动开关都可以关闭,而一个可以打开,但是两个不能同时打开–启用一个将始终禁用另一个。 这就是代码中的样子:
```swift
struct ContentView: View {
@State private var firstToggle = false
@State private var secondToggle = false
var body: some View {
let firstBinding = Binding(
get: { self.firstToggle },
set: {
self.firstToggle = $0
if $0 == true {
self.secondToggle = false
}
}
)
let secondBinding = Binding(
get: { self.secondToggle },
set: {
self.secondToggle = $0
if $0 == true {
self.firstToggle = false
}
}
)
return VStack {
Toggle(isOn: firstBinding) {
Text("First toggle")
}
Toggle(isOn: secondBinding) {
Text("Second toggle")
}
}
.padding(100)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
```
================================================
FILE: example/advanced-state/demo8/Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo8/Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo8/Demo/Demo/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo8/Demo/Demo/ContentView.swift
================================================
//
// ContentView.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
struct ContentView: View {
@State var timeRemaining = 10
let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()
var body: some View {
Text("\(timeRemaining)")
.onReceive(timer) { _ in
if timeRemaining > 0 {
timeRemaining -= 1
}
}
.padding(100)
.frame(width: 300)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/advanced-state/demo8/Demo/Demo/Demo.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/advanced-state/demo8/Demo/Demo/DemoApp.swift
================================================
//
// DemoApp.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/advanced-state/demo8/Demo/Demo/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/advanced-state/demo8/Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo8/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D3649BE25FFE7C800C13C01 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3649BD25FFE7C800C13C01 /* DemoApp.swift */; };
7D3649C025FFE7C800C13C01 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3649BF25FFE7C800C13C01 /* ContentView.swift */; };
7D3649C225FFE7C900C13C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D3649C125FFE7C900C13C01 /* Assets.xcassets */; };
7D3649C525FFE7C900C13C01 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D3649C425FFE7C900C13C01 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D3649BA25FFE7C800C13C01 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D3649BD25FFE7C800C13C01 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D3649BF25FFE7C800C13C01 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D3649C125FFE7C900C13C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D3649C425FFE7C900C13C01 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
7D3649C625FFE7C900C13C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D3649C725FFE7C900C13C01 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D3649B725FFE7C800C13C01 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D3649B125FFE7C800C13C01 = {
isa = PBXGroup;
children = (
7D3649BC25FFE7C800C13C01 /* Demo */,
7D3649BB25FFE7C800C13C01 /* Products */,
);
sourceTree = "";
};
7D3649BB25FFE7C800C13C01 /* Products */ = {
isa = PBXGroup;
children = (
7D3649BA25FFE7C800C13C01 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D3649BC25FFE7C800C13C01 /* Demo */ = {
isa = PBXGroup;
children = (
7D3649BD25FFE7C800C13C01 /* DemoApp.swift */,
7D3649BF25FFE7C800C13C01 /* ContentView.swift */,
7D3649C125FFE7C900C13C01 /* Assets.xcassets */,
7D3649C625FFE7C900C13C01 /* Info.plist */,
7D3649C725FFE7C900C13C01 /* Demo.entitlements */,
7D3649C325FFE7C900C13C01 /* Preview Content */,
);
path = Demo;
sourceTree = "";
};
7D3649C325FFE7C900C13C01 /* Preview Content */ = {
isa = PBXGroup;
children = (
7D3649C425FFE7C900C13C01 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D3649B925FFE7C800C13C01 /* Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D3649CA25FFE7C900C13C01 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
7D3649B625FFE7C800C13C01 /* Sources */,
7D3649B725FFE7C800C13C01 /* Frameworks */,
7D3649B825FFE7C800C13C01 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Demo;
productName = Demo;
productReference = 7D3649BA25FFE7C800C13C01 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D3649B225FFE7C800C13C01 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D3649B925FFE7C800C13C01 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D3649B525FFE7C800C13C01 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D3649B125FFE7C800C13C01;
productRefGroup = 7D3649BB25FFE7C800C13C01 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D3649B925FFE7C800C13C01 /* Demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D3649B825FFE7C800C13C01 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D3649C525FFE7C900C13C01 /* Preview Assets.xcassets in Resources */,
7D3649C225FFE7C900C13C01 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D3649B625FFE7C800C13C01 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D3649C025FFE7C800C13C01 /* ContentView.swift in Sources */,
7D3649BE25FFE7C800C13C01 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D3649C825FFE7C900C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D3649C925FFE7C900C13C01 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D3649CB25FFE7C900C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D3649CC25FFE7C900C13C01 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D3649B525FFE7C800C13C01 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D3649C825FFE7C900C13C01 /* Debug */,
7D3649C925FFE7C900C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D3649CA25FFE7C900C13C01 /* Build configuration list for PBXNativeTarget "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D3649CB25FFE7C900C13C01 /* Debug */,
7D3649CC25FFE7C900C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D3649B225FFE7C800C13C01 /* Project object */;
}
================================================
FILE: example/advanced-state/demo8/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/advanced-state/demo8/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/advanced-state/demo8/README.md
================================================
如何在 SwiftUI 中使用计时器?
===
如果要定期运行某些代码(例如制作倒数计时器或类似的计时器),则应使用 `Timer` 和 `onReceive()` 修饰符。
例如,此代码创建一个计时器发布程序,该计时器每秒触发一次,并使用当前时间更新标签:
```swift
struct ContentView: View {
@State var currentDate = Date()
let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()
var body: some View {
Text("\(currentDate)")
.onReceive(timer) { input in
currentDate = input
}
}
}
```
将 `.main` 用作 `runloop` 选项非常重要,因为我们的计时器会更新用户界面。 至于 `.common` 模式,它允许计时器与其他常见事件一起运行-例如,如果文本在滚动的滚动视图中。
如您所见,`onReceive()` 闭包在包含当前日期的某些输入中传递。 在上面的代码中,我们直接将其分配给 `currentDate`,但是您可以使用它来计算自上一个日期以来经过了多少时间。
如果您特别想创建一个倒数计时器或秒表,则应创建某种状态来跟踪剩余时间,然后在计时器启动时从中减去。
例如,我们可以创建一个倒数计时器,以显示标签中剩余的时间,如下所示:
```swift
struct ContentView: View {
@State var timeRemaining = 10
let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()
var body: some View {
Text("\(timeRemaining)")
.onReceive(timer) { _ in
if timeRemaining > 0 {
timeRemaining -= 1
}
}
.padding(100)
.frame(width: 300)
}
}
```
================================================
FILE: example/advanced-state/demo9/Demo/Demo/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo9/Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo9/Demo/Demo/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo9/Demo/Demo/ContentView.swift
================================================
//
// ContentView.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
extension Binding {
func onChange(_ handler: @escaping (Value) -> Void) -> Binding {
Binding(
get: { self.wrappedValue },
set: { newValue in
self.wrappedValue = newValue
handler(newValue)
}
)
}
}
struct ContentView: View {
@State private var name = ""
var body: some View {
TextField("Enter your name:", text: $name.onChange(nameChanged))
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(100)
}
func nameChanged(to value: String) {
print("Name changed to \(name)!")
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/advanced-state/demo9/Demo/Demo/Demo.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/advanced-state/demo9/Demo/Demo/DemoApp.swift
================================================
//
// DemoApp.swift
// Demo
//
// Created by 王楚江 on 2021/3/16.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/advanced-state/demo9/Demo/Demo/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/advanced-state/demo9/Demo/Demo/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/advanced-state/demo9/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D3649DB25FFE95D00C13C01 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3649DA25FFE95D00C13C01 /* DemoApp.swift */; };
7D3649DD25FFE95D00C13C01 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3649DC25FFE95D00C13C01 /* ContentView.swift */; };
7D3649DF25FFE95E00C13C01 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D3649DE25FFE95E00C13C01 /* Assets.xcassets */; };
7D3649E225FFE95E00C13C01 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D3649E125FFE95E00C13C01 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D3649D725FFE95D00C13C01 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D3649DA25FFE95D00C13C01 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D3649DC25FFE95D00C13C01 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D3649DE25FFE95E00C13C01 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D3649E125FFE95E00C13C01 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
7D3649E325FFE95E00C13C01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D3649E425FFE95E00C13C01 /* Demo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Demo.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D3649D425FFE95D00C13C01 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D3649CE25FFE95D00C13C01 = {
isa = PBXGroup;
children = (
7D3649D925FFE95D00C13C01 /* Demo */,
7D3649D825FFE95D00C13C01 /* Products */,
);
sourceTree = "";
};
7D3649D825FFE95D00C13C01 /* Products */ = {
isa = PBXGroup;
children = (
7D3649D725FFE95D00C13C01 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D3649D925FFE95D00C13C01 /* Demo */ = {
isa = PBXGroup;
children = (
7D3649DA25FFE95D00C13C01 /* DemoApp.swift */,
7D3649DC25FFE95D00C13C01 /* ContentView.swift */,
7D3649DE25FFE95E00C13C01 /* Assets.xcassets */,
7D3649E325FFE95E00C13C01 /* Info.plist */,
7D3649E425FFE95E00C13C01 /* Demo.entitlements */,
7D3649E025FFE95E00C13C01 /* Preview Content */,
);
path = Demo;
sourceTree = "";
};
7D3649E025FFE95E00C13C01 /* Preview Content */ = {
isa = PBXGroup;
children = (
7D3649E125FFE95E00C13C01 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D3649D625FFE95D00C13C01 /* Demo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D3649E725FFE95E00C13C01 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
7D3649D325FFE95D00C13C01 /* Sources */,
7D3649D425FFE95D00C13C01 /* Frameworks */,
7D3649D525FFE95D00C13C01 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Demo;
productName = Demo;
productReference = 7D3649D725FFE95D00C13C01 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D3649CF25FFE95D00C13C01 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D3649D625FFE95D00C13C01 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D3649D225FFE95D00C13C01 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D3649CE25FFE95D00C13C01;
productRefGroup = 7D3649D825FFE95D00C13C01 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D3649D625FFE95D00C13C01 /* Demo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D3649D525FFE95D00C13C01 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D3649E225FFE95E00C13C01 /* Preview Assets.xcassets in Resources */,
7D3649DF25FFE95E00C13C01 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D3649D325FFE95D00C13C01 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D3649DD25FFE95D00C13C01 /* ContentView.swift in Sources */,
7D3649DB25FFE95D00C13C01 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D3649E525FFE95E00C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D3649E625FFE95E00C13C01 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D3649E825FFE95E00C13C01 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D3649E925FFE95E00C13C01 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Demo/Demo.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo/Preview Content\"";
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D3649D225FFE95D00C13C01 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D3649E525FFE95E00C13C01 /* Debug */,
7D3649E625FFE95E00C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D3649E725FFE95E00C13C01 /* Build configuration list for PBXNativeTarget "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D3649E825FFE95E00C13C01 /* Debug */,
7D3649E925FFE95E00C13C01 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D3649CF25FFE95D00C13C01 /* Project object */;
}
================================================
FILE: example/advanced-state/demo9/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/advanced-state/demo9/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/advanced-state/demo9/README.md
================================================
当使用 `onChange()` 改变状态时如何运行一些代码?
===
SwiftUI 允许我们将 `onChange()` 修饰符附加到任何视图,当程序中的某些状态发生更改时,该修饰符将运行我们选择的代码。 这很重要,因为我们不能总是将诸如 `didSet` 之类的属性观察器与 `@State` 之类一起使用。
例如,这将在键入名称时打印名称更改:
```swift
struct ContentView: View {
@State private var name = ""
var body: some View {
TextField("Enter your name:", text: $name)
.textFieldStyle(RoundedBorderTextFieldStyle())
.onChange(of: name) { newValue in
print("Name changed to \(name)!")
}
}
}
```
就个人而言,我更喜欢为 `Binding` 添加一个自定义扩展,以便将观察代码直接附加到绑定而不是视图上–它使我可以将观察者放置在它所观察的对象旁边,而不是附加许多 `onChange()` 修饰符 我认为其他地方。
因此,我将使用如下代码:
```swift
extension Binding {
func onChange(_ handler: @escaping (Value) -> Void) -> Binding {
Binding(
get: { self.wrappedValue },
set: { newValue in
self.wrappedValue = newValue
handler(newValue)
}
)
}
}
struct ContentView: View {
@State private var name = ""
var body: some View {
TextField("Enter your name:", text: $name.onChange(nameChanged))
.textFieldStyle(RoundedBorderTextFieldStyle())
}
func nameChanged(to value: String) {
print("Name changed to \(name)!")
}
}
```
================================================
FILE: example/alerts-and-menus/demo1/README.md
================================================
使用简介
===
SwiftUI 的声明式编程方法意味着我们不会像在 `UIKit` 中那样创建和呈现警报和操作表。相反,我们定义了显示它们的条件,告诉它们应该是什么样,然后让它自己解决其余的问题。
所有这些都可以使用修饰符完成,这些修饰符会将新的 `UI` 附加到我们的视图中,当满足条件时将显示该 `UI`。您可以根据需要附加任意数量,它们实际上是在等待观看,直到其条件变为真为止,此时它们将显示其 `UI`。例如,您可以在按钮按下时切换一个布尔值,从而触发显示警报。
您可以将演示文稿附加到主视图或其任何子视图,甚至可以附加到调整状态的按钮,以便触发演示文稿。这是一个微妙的区别,但重要的是要了解这些演示文稿并没有附加到按钮上,因为它是一个按钮-也就是说,由于轻按了按钮,因此不会以任何方式显示警报。相反,我们将其附加到我们的视图层次结构,以便 `SwiftUI` 意识到它可以随时显示。
================================================
FILE: example/alerts-and-menus/demo10/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D43E1F0260D6F80001FCE99 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 7D43E1EF260D6F80001FCE99 /* Credits.rtf */; };
7D43E1F1260D6F80001FCE99 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 7D43E1EF260D6F80001FCE99 /* Credits.rtf */; };
7DB68558260D033E00505AD0 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB68545260D033D00505AD0 /* DemoApp.swift */; };
7DB68559260D033E00505AD0 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB68545260D033D00505AD0 /* DemoApp.swift */; };
7DB6855A260D033E00505AD0 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB68546260D033D00505AD0 /* ContentView.swift */; };
7DB6855B260D033E00505AD0 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB68546260D033D00505AD0 /* ContentView.swift */; };
7DB6855C260D033E00505AD0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB68547260D033E00505AD0 /* Assets.xcassets */; };
7DB6855D260D033E00505AD0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB68547260D033E00505AD0 /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D43E1EF260D6F80001FCE99 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = ""; };
7DB68545260D033D00505AD0 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DB68546260D033D00505AD0 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DB68547260D033E00505AD0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DB6854C260D033E00505AD0 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB6854F260D033E00505AD0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB68554260D033E00505AD0 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB68556260D033E00505AD0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB68557260D033E00505AD0 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DB68549260D033E00505AD0 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB68551260D033E00505AD0 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DB6853F260D033D00505AD0 = {
isa = PBXGroup;
children = (
7DB68544260D033D00505AD0 /* Shared */,
7DB6854E260D033E00505AD0 /* iOS */,
7DB68555260D033E00505AD0 /* macOS */,
7DB6854D260D033E00505AD0 /* Products */,
);
sourceTree = "";
};
7DB68544260D033D00505AD0 /* Shared */ = {
isa = PBXGroup;
children = (
7DB68545260D033D00505AD0 /* DemoApp.swift */,
7DB68546260D033D00505AD0 /* ContentView.swift */,
7DB68547260D033E00505AD0 /* Assets.xcassets */,
7D43E1EF260D6F80001FCE99 /* Credits.rtf */,
);
path = Shared;
sourceTree = "";
};
7DB6854D260D033E00505AD0 /* Products */ = {
isa = PBXGroup;
children = (
7DB6854C260D033E00505AD0 /* Demo.app */,
7DB68554260D033E00505AD0 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DB6854E260D033E00505AD0 /* iOS */ = {
isa = PBXGroup;
children = (
7DB6854F260D033E00505AD0 /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DB68555260D033E00505AD0 /* macOS */ = {
isa = PBXGroup;
children = (
7DB68556260D033E00505AD0 /* Info.plist */,
7DB68557260D033E00505AD0 /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DB6854B260D033E00505AD0 /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB68560260D033E00505AD0 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DB68548260D033E00505AD0 /* Sources */,
7DB68549260D033E00505AD0 /* Frameworks */,
7DB6854A260D033E00505AD0 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DB6854C260D033E00505AD0 /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DB68553260D033E00505AD0 /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB68563260D033E00505AD0 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DB68550260D033E00505AD0 /* Sources */,
7DB68551260D033E00505AD0 /* Frameworks */,
7DB68552260D033E00505AD0 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DB68554260D033E00505AD0 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DB68540260D033D00505AD0 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DB6854B260D033E00505AD0 = {
CreatedOnToolsVersion = 12.4;
};
7DB68553260D033E00505AD0 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DB68543260D033D00505AD0 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DB6853F260D033D00505AD0;
productRefGroup = 7DB6854D260D033E00505AD0 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DB6854B260D033E00505AD0 /* Demo (iOS) */,
7DB68553260D033E00505AD0 /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DB6854A260D033E00505AD0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB6855C260D033E00505AD0 /* Assets.xcassets in Resources */,
7D43E1F0260D6F80001FCE99 /* Credits.rtf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB68552260D033E00505AD0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB6855D260D033E00505AD0 /* Assets.xcassets in Resources */,
7D43E1F1260D6F80001FCE99 /* Credits.rtf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DB68548260D033E00505AD0 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB6855A260D033E00505AD0 /* ContentView.swift in Sources */,
7DB68558260D033E00505AD0 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB68550260D033E00505AD0 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB6855B260D033E00505AD0 /* ContentView.swift in Sources */,
7DB68559260D033E00505AD0 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DB6855E260D033E00505AD0 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DB6855F260D033E00505AD0 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DB68561260D033E00505AD0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DB68562260D033E00505AD0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DB68564260D033E00505AD0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DB68565260D033E00505AD0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DB68543260D033D00505AD0 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB6855E260D033E00505AD0 /* Debug */,
7DB6855F260D033E00505AD0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB68560260D033E00505AD0 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB68561260D033E00505AD0 /* Debug */,
7DB68562260D033E00505AD0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB68563260D033E00505AD0 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB68564260D033E00505AD0 /* Debug */,
7DB68565260D033E00505AD0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DB68540260D033D00505AD0 /* Project object */;
}
================================================
FILE: example/alerts-and-menus/demo10/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/alerts-and-menus/demo10/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/alerts-and-menus/demo10/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo10/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo10/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo10/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/26.
//
import SwiftUI
struct ContentView: View {
var body: some View {
Text("Hello, world!")
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/alerts-and-menus/demo10/Demo/Shared/Credits.rtf
================================================
{\rtf1\ansi\ansicpg936\cocoartf2578
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw12240\paperh15840\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\fs24 \cf0 \
\
{\field{\*\fldinst{HYPERLINK "https://github.com/jaywcjlove"}}{\fldrslt https://github.com/jaywcjlove}}}
================================================
FILE: example/alerts-and-menus/demo10/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/26.
//
import SwiftUI
struct AppCommands: Commands {
func action() {}
func anotherAction() {}
@CommandsBuilder var body: some Commands {
CommandMenu("Menu") {
Button(action: {
action()
}) {
Text("Action")
}
Button(action: {
anotherAction()
}) {
Text("Another action")
}
}
}
}
struct MenuCommands: Commands {
@Binding var toggleSetting: Bool
var body: some Commands {
CommandMenu("Custom Menu") {
Button(action: {
print("Menu Button selected")
}, label: {
Text("Menu Button")
})
Divider()
Toggle(isOn: $toggleSetting, label: {
Text("Toggle")
})
}
}
}
@main
struct DemoApp: App {
@State private var toggleSetting = true
var body: some Scene {
WindowGroup {
ContentView()
}
.commands {
CommandGroup(replacing: CommandGroupPlacement.appVisibility) {
EmptyView()
}
CommandGroup(replacing: CommandGroupPlacement.systemServices) {
EmptyView()
}
CommandGroup(replacing: CommandGroupPlacement.pasteboard) {
EmptyView()
}
CommandGroup(replacing: CommandGroupPlacement.windowSize) {
EmptyView()
}
CommandGroup(replacing: CommandGroupPlacement.sidebar) {
Button(action: {
print("Sidebar Help!")
}) {
Text("Sidebar Help")
}
.keyboardShortcut("b", modifiers: .control)
}
// ToolbarCommands()
// CommandGroup(replacing: ToolbarCommands) {
//// EmptyView()
// }
// ToolbarCommands
// CommandMenu("View") {
// Button(action: {}) {
// Text("MyApp Help")
// }
// }
//// CommandGroup(replacing: .appInfo) {}
// CommandGroup(replacing: .pasteboard) {}
// CommandGroup(replacing: .systemServices) {}
// CommandGroup(replacing: .appTermination) {}
//// CommandGroup(replacing: .textEditing) {}
// CommandGroup(replacing: .textFormatting) {}
//// CommandGroupPlacement(replacing: .windowList) {}
//// CommandGroupPlacement(replacing: .windowSize) {}
//
// CommandGroup(replacing: .undoRedo) {
//// Button(action: {
////
//// }) {
//// Text("MyApp2 Help")
//// }
// }
//
// CommandMenu("Custom Menu") {
// Button(action: {
// print("Menu Button selected")
// }, label: {
// Text("Menu Button")
// })
//
// Divider()
// }
AppCommands()
MenuCommands(toggleSetting: $toggleSetting)
}
}
}
================================================
FILE: example/alerts-and-menus/demo10/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/alerts-and-menus/demo10/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/alerts-and-menus/demo10/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/alerts-and-menus/demo10/README.md
================================================
如何更改 macOS 应用中主菜单?
===
在 `macOS` 上,主菜单使用可用的命令菜单和组来组织其主菜单项。每个菜单都表示为顶层菜单栏菜单,并且每个命令组在一个顶层菜单中都有一组对应的菜单项,这些菜单项由分隔符菜单项分隔。
在 `iPadOS` 上,带有键盘快捷键的命令在快捷键可发现性 HUD 中公开,用户按住 `Command(⌘)` 键时可以看到它们。
```swift
@main
struct passwordApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
.commands {
CommandGroup(replacing: .help) {
Button(action: {
print("Menu Button selected")
}, label: {
Text("Menu Button")
})
.keyboardShortcut("b", modifiers: [.command, .shift, .control)
Divider()
Button(action: {}) {
Text("MyApp Help")
}
.keyboardShortcut("b", modifiers: .control)
}
CommandMenu("Edit") {
}
}
}
}
```
菜单项通常最好用分隔符分开,这可以通过在 `SwiftUI` 中添加 `Divider()` 来完成。
## 编辑现有菜单
已经介绍了创建新菜单,但是如何将新项目添加到现有菜单呢?
在这种情况下,请使用 `CommandGroup` 而不是 `CommandMenu`。 不同之处在于,您无需为菜单设置标题,而是给它提供了一个放置选项,并引用了现有的标准菜单项。
```swift
CommandGroup(after:, addition:)
CommandGroup(before:, addition:)
CommandGroup(replacing:, addition:)
CommandGroup(replacing: .appInfo) {}
```
在每种情况下,第一个参数都是 `CommandGroupPlacement`,它指定有限范围的标准菜单项中的一个。
## 删除标准菜单项
如果您真的想摆脱默认菜单项(或项目组)之一,则可以使用 `CommandGroupPlacement` 并将现有的菜单项替换为 `EmptyView()`。 就人机界面指南而言,这可能不是一个好主意,但是如果需要的话,它是一个选择。
```swift
CommandGroup(replacing: CommandGroupPlacement.appVisibility) {
EmptyView()
}
```
如果您希望能够以更自定义的方式响应它,也可以用自己的版本替换现有的菜单项。 我可以想象对“帮助”菜单项执行此操作,因为我不喜欢使用Apple的“帮助”系统,而是希望将用户定向到其他地方。
## 使用单独的文件
如果要添加许多菜单,则可能开始感觉到您的 `DemoApp.swift` 文件有点拥挤。 您可以将这些菜单命令分成一个或多个单独的文件,只要它们包含在符合 `Commands` 协议且主体也符合 `Commands` 的结构中即可。
```swift
struct MenuCommands: Commands {
@Binding var toggleSetting: Bool
var body: some Commands {
CommandMenu("Custom Menu") {
Button(action: {
print("Menu Button selected")
}, label: {
Text("Menu Button")
})
Divider()
Toggle(isOn: $toggleSetting, label: {
Text("Toggle")
})
}
}
}
```
该结构不能拥有自己的数据,否则您会收到很多警告,但可以从其父级绑定到数据。 就像在 `Apple` 预设中一样,在命令修饰符中插入对此结构以及您创建的任何其他结构的调用。
```swift
@main
struct DemoApp: App {
@State private var toggleSetting = true
var body: some Scene {
WindowGroup {
ContentView()
}
.commands {
MenuCommands(toggleSetting: $toggleSetting)
}
}
}
```
## Bonus: Credits
每个Mac应用程序都有一个 `关于...` 菜单项,该菜单项会弹出一个简单的对话框,其中包含基本的应用程序信息:图标,应用程序名称和版本号。 这些将始终出现,但是有一种简单的方法可以在此信息下添加更多信息,并且可以包括格式化的文本和链接。
创建一个名为 `Credits.rtf` 的新文件 - `New` => `File` 对话框具有 `Rich Text File` 选项。具有此确切名称的文件中的任何内容都将在 `About` 框中的标准信息下方显示。
Xcode的RTF编辑器虽然不是很好,但是已经足够了。 文本编辑器上方有一些基本的格式设置工具,但您也可以右键单击文本以获取更多选项,包括“字体”和“颜色”面板。
要插入网络链接,请转到 `Editor` 菜单,然后选择 `Add Link...`。
================================================
FILE: example/alerts-and-menus/demo11/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7D99C67C260E5A7200D0ECDD /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D99C669260E5A7000D0ECDD /* DemoApp.swift */; };
7D99C67D260E5A7200D0ECDD /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D99C669260E5A7000D0ECDD /* DemoApp.swift */; };
7D99C67E260E5A7200D0ECDD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D99C66A260E5A7000D0ECDD /* ContentView.swift */; };
7D99C67F260E5A7200D0ECDD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D99C66A260E5A7000D0ECDD /* ContentView.swift */; };
7D99C680260E5A7200D0ECDD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D99C66B260E5A7200D0ECDD /* Assets.xcassets */; };
7D99C681260E5A7200D0ECDD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D99C66B260E5A7200D0ECDD /* Assets.xcassets */; };
7D99C68D260E5A8C00D0ECDD /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D99C68C260E5A8C00D0ECDD /* SettingsView.swift */; };
7D99C68E260E5A8C00D0ECDD /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D99C68C260E5A8C00D0ECDD /* SettingsView.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7D99C669260E5A7000D0ECDD /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7D99C66A260E5A7000D0ECDD /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7D99C66B260E5A7200D0ECDD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7D99C670260E5A7200D0ECDD /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D99C673260E5A7200D0ECDD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D99C678260E5A7200D0ECDD /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7D99C67A260E5A7200D0ECDD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7D99C67B260E5A7200D0ECDD /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
7D99C68C260E5A8C00D0ECDD /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7D99C66D260E5A7200D0ECDD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7D99C675260E5A7200D0ECDD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7D99C663260E5A7000D0ECDD = {
isa = PBXGroup;
children = (
7D99C668260E5A7000D0ECDD /* Shared */,
7D99C672260E5A7200D0ECDD /* iOS */,
7D99C679260E5A7200D0ECDD /* macOS */,
7D99C671260E5A7200D0ECDD /* Products */,
);
sourceTree = "";
};
7D99C668260E5A7000D0ECDD /* Shared */ = {
isa = PBXGroup;
children = (
7D99C669260E5A7000D0ECDD /* DemoApp.swift */,
7D99C66A260E5A7000D0ECDD /* ContentView.swift */,
7D99C66B260E5A7200D0ECDD /* Assets.xcassets */,
7D99C68C260E5A8C00D0ECDD /* SettingsView.swift */,
);
path = Shared;
sourceTree = "";
};
7D99C671260E5A7200D0ECDD /* Products */ = {
isa = PBXGroup;
children = (
7D99C670260E5A7200D0ECDD /* Demo.app */,
7D99C678260E5A7200D0ECDD /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7D99C672260E5A7200D0ECDD /* iOS */ = {
isa = PBXGroup;
children = (
7D99C673260E5A7200D0ECDD /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7D99C679260E5A7200D0ECDD /* macOS */ = {
isa = PBXGroup;
children = (
7D99C67A260E5A7200D0ECDD /* Info.plist */,
7D99C67B260E5A7200D0ECDD /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7D99C66F260E5A7200D0ECDD /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D99C684260E5A7200D0ECDD /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7D99C66C260E5A7200D0ECDD /* Sources */,
7D99C66D260E5A7200D0ECDD /* Frameworks */,
7D99C66E260E5A7200D0ECDD /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7D99C670260E5A7200D0ECDD /* Demo.app */;
productType = "com.apple.product-type.application";
};
7D99C677260E5A7200D0ECDD /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7D99C687260E5A7200D0ECDD /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7D99C674260E5A7200D0ECDD /* Sources */,
7D99C675260E5A7200D0ECDD /* Frameworks */,
7D99C676260E5A7200D0ECDD /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7D99C678260E5A7200D0ECDD /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7D99C664260E5A7000D0ECDD /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7D99C66F260E5A7200D0ECDD = {
CreatedOnToolsVersion = 12.4;
};
7D99C677260E5A7200D0ECDD = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7D99C667260E5A7000D0ECDD /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7D99C663260E5A7000D0ECDD;
productRefGroup = 7D99C671260E5A7200D0ECDD /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7D99C66F260E5A7200D0ECDD /* Demo (iOS) */,
7D99C677260E5A7200D0ECDD /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7D99C66E260E5A7200D0ECDD /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D99C680260E5A7200D0ECDD /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7D99C676260E5A7200D0ECDD /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D99C681260E5A7200D0ECDD /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7D99C66C260E5A7200D0ECDD /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D99C68D260E5A8C00D0ECDD /* SettingsView.swift in Sources */,
7D99C67E260E5A7200D0ECDD /* ContentView.swift in Sources */,
7D99C67C260E5A7200D0ECDD /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7D99C674260E5A7200D0ECDD /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D99C68E260E5A8C00D0ECDD /* SettingsView.swift in Sources */,
7D99C67F260E5A7200D0ECDD /* ContentView.swift in Sources */,
7D99C67D260E5A7200D0ECDD /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7D99C682260E5A7200D0ECDD /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7D99C683260E5A7200D0ECDD /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7D99C685260E5A7200D0ECDD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7D99C686260E5A7200D0ECDD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7D99C688260E5A7200D0ECDD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7D99C689260E5A7200D0ECDD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7D99C667260E5A7000D0ECDD /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D99C682260E5A7200D0ECDD /* Debug */,
7D99C683260E5A7200D0ECDD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D99C684260E5A7200D0ECDD /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D99C685260E5A7200D0ECDD /* Debug */,
7D99C686260E5A7200D0ECDD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7D99C687260E5A7200D0ECDD /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7D99C688260E5A7200D0ECDD /* Debug */,
7D99C689260E5A7200D0ECDD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7D99C664260E5A7000D0ECDD /* Project object */;
}
================================================
FILE: example/alerts-and-menus/demo11/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/alerts-and-menus/demo11/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/alerts-and-menus/demo11/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo11/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo11/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo11/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/27.
//
import SwiftUI
struct ContentView: View {
var body: some View {
Text("Hello, world!")
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/alerts-and-menus/demo11/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/27.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
#if os(macOS)
Settings {
SettingsView()
}
#endif
}
}
================================================
FILE: example/alerts-and-menus/demo11/Demo/Shared/SettingsView.swift
================================================
//
// Settings.swift
// Demo
//
// Created by 王楚江 on 2021/3/27.
//
import SwiftUI
struct SettingsView: View {
// @AppStorage("Color.zoom")
@State private var selection = "Red"
let colors = ["Red", "Green", "Blue", "Black", "Tartan"]
var body: some View {
Form {
Picker("Select a paint color", selection: $selection) {
ForEach(colors, id: \.self) {
Text($0)
}
}
.pickerStyle(InlinePickerStyle())
}
.frame(width: 300)
.navigationTitle("Demo Settings")
.padding(80)
}
}
struct SettingsView_Previews: PreviewProvider {
static var previews: some View {
SettingsView()
}
}
================================================
FILE: example/alerts-and-menus/demo11/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/alerts-and-menus/demo11/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/alerts-and-menus/demo11/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/alerts-and-menus/demo11/README.md
================================================
如何添加偏好设置界面?
===
在 `macOS` 上,SwiftUI 的 `Settings` 是官方提供的方法为 `偏好设置界面` 添加界面。
```swift
struct SettingsView: View {
@State private var selection = "Red"
let colors = ["Red", "Green", "Blue", "Black", "Tartan"]
var body: some View {
Form {
Picker("Select a paint color", selection: $selection) {
ForEach(colors, id: \.self) {
Text($0)
}
}
.pickerStyle(InlinePickerStyle())
}
.frame(width: 300)
.navigationTitle("Demo Settings")
.padding(80)
}
}
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
#if os(macOS)
Settings {
SettingsView()
}
#endif
}
}
```
================================================
FILE: example/alerts-and-menus/demo2/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DB7F6C3260AE439008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F6B0260AE439008F3D92 /* DemoApp.swift */; };
7DB7F6C4260AE439008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F6B0260AE439008F3D92 /* DemoApp.swift */; };
7DB7F6C5260AE439008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F6B1260AE439008F3D92 /* ContentView.swift */; };
7DB7F6C6260AE439008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F6B1260AE439008F3D92 /* ContentView.swift */; };
7DB7F6C7260AE439008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F6B2260AE439008F3D92 /* Assets.xcassets */; };
7DB7F6C8260AE439008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F6B2260AE439008F3D92 /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DB7F6B0260AE439008F3D92 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DB7F6B1260AE439008F3D92 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DB7F6B2260AE439008F3D92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DB7F6B7260AE439008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F6BA260AE439008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F6BF260AE439008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F6C1260AE439008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F6C2260AE439008F3D92 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DB7F6B4260AE439008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F6BC260AE439008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DB7F6AA260AE439008F3D92 = {
isa = PBXGroup;
children = (
7DB7F6AF260AE439008F3D92 /* Shared */,
7DB7F6B9260AE439008F3D92 /* iOS */,
7DB7F6C0260AE439008F3D92 /* macOS */,
7DB7F6B8260AE439008F3D92 /* Products */,
);
sourceTree = "";
};
7DB7F6AF260AE439008F3D92 /* Shared */ = {
isa = PBXGroup;
children = (
7DB7F6B0260AE439008F3D92 /* DemoApp.swift */,
7DB7F6B1260AE439008F3D92 /* ContentView.swift */,
7DB7F6B2260AE439008F3D92 /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DB7F6B8260AE439008F3D92 /* Products */ = {
isa = PBXGroup;
children = (
7DB7F6B7260AE439008F3D92 /* Demo.app */,
7DB7F6BF260AE439008F3D92 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DB7F6B9260AE439008F3D92 /* iOS */ = {
isa = PBXGroup;
children = (
7DB7F6BA260AE439008F3D92 /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DB7F6C0260AE439008F3D92 /* macOS */ = {
isa = PBXGroup;
children = (
7DB7F6C1260AE439008F3D92 /* Info.plist */,
7DB7F6C2260AE439008F3D92 /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DB7F6B6260AE439008F3D92 /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F6CB260AE439008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DB7F6B3260AE439008F3D92 /* Sources */,
7DB7F6B4260AE439008F3D92 /* Frameworks */,
7DB7F6B5260AE439008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DB7F6B7260AE439008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DB7F6BE260AE439008F3D92 /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F6CE260AE439008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DB7F6BB260AE439008F3D92 /* Sources */,
7DB7F6BC260AE439008F3D92 /* Frameworks */,
7DB7F6BD260AE439008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DB7F6BF260AE439008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DB7F6AB260AE439008F3D92 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DB7F6B6260AE439008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
7DB7F6BE260AE439008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DB7F6AE260AE439008F3D92 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DB7F6AA260AE439008F3D92;
productRefGroup = 7DB7F6B8260AE439008F3D92 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DB7F6B6260AE439008F3D92 /* Demo (iOS) */,
7DB7F6BE260AE439008F3D92 /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DB7F6B5260AE439008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F6C7260AE439008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F6BD260AE439008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F6C8260AE439008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DB7F6B3260AE439008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F6C5260AE439008F3D92 /* ContentView.swift in Sources */,
7DB7F6C3260AE439008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F6BB260AE439008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F6C6260AE439008F3D92 /* ContentView.swift in Sources */,
7DB7F6C4260AE439008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DB7F6C9260AE439008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DB7F6CA260AE439008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DB7F6CC260AE439008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DB7F6CD260AE439008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DB7F6CF260AE439008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DB7F6D0260AE439008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DB7F6AE260AE439008F3D92 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F6C9260AE439008F3D92 /* Debug */,
7DB7F6CA260AE439008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F6CB260AE439008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F6CC260AE439008F3D92 /* Debug */,
7DB7F6CD260AE439008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F6CE260AE439008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F6CF260AE439008F3D92 /* Debug */,
7DB7F6D0260AE439008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DB7F6AB260AE439008F3D92 /* Project object */;
}
================================================
FILE: example/alerts-and-menus/demo2/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/alerts-and-menus/demo2/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/alerts-and-menus/demo2/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo2/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo2/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo2/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
struct TVShow: Identifiable {
var id: String { name }
let name: String
}
struct ContentView: View {
@State private var selectedShow: TVShow?
var body: some View {
VStack(spacing: 20) {
Text("What is your favorite TV show?")
.font(.headline)
Button("Select Ted Lasso") {
selectedShow = TVShow(name: "Ted Lasso")
}
Button("Select Bridgerton") {
selectedShow = TVShow(name: "Bridgerton")
}
}
.alert(item: $selectedShow) { show in
Alert(title: Text(show.name), message: Text("Great choice!"), dismissButton: .cancel())
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/alerts-and-menus/demo2/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/alerts-and-menus/demo2/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/alerts-and-menus/demo2/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/alerts-and-menus/demo2/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/alerts-and-menus/demo2/README.md
================================================
如何显示警报?
===
SwiftUI 提供了两种显示警报的方式,具体取决于您是要在布尔值变为true还是设置可选值时显示警报。
创建基本 SwiftUI 警报的代码如下所示:
```swift
Alert(title: Text("Important message"), message: Text("Wear sunscreen"), dismissButton: .default(Text("Got it!")))
```
就像在 `UIAlertController` 中看到的那样,它定义了标题和消息,然后添加了具有默认样式和文本 `知道了!` 的关闭按钮。
为了显示警报,第一种方法是定义某种可绑定条件,该条件确定警报是否可见。 然后,将其附加到您的主视图,该主视图在条件为真时立即显示该警报。
例如,此代码创建一个 `showingAlert` 布尔值,该值跟踪是否应显示防晒霜消息,在点击按钮时将该 `Boolean` 设置为 `true`,然后使用该布尔值创建并附加警报视图,以便在点击按钮时显示该警告视图 :
```swift
struct ContentView: View {
@State private var showingAlert = false
var body: some View {
Button("Show Alert") {
showingAlert = true
}
.alert(isPresented: $showingAlert) {
Alert(title: Text("Important message"), message: Text("Wear sunscreen"), dismissButton: .default(Text("知道了!")))
}
}
}
```
提示:按下这样的警报时,在点击关闭按钮时,`showingAlert` 会自动设置为 `false`。
创建警报的第二种方法是绑定到符合 `Identifiable` 的某些可选状态,这将导致在对象的值更改时显示警报。
此方法有两个优点:
- 您可以在运行时附加任何您喜欢的对象,因此您的警报可以显示任意数量的不同数据。
- SwiftUI在有值时会自动将其拆包,因此您可以确定要在显示警报之前将其存在 - 无需自己检查和拆包该值。
例如,根据选择的电视节目,这将显示一个具有两个不同值的警报:
```swift
struct TVShow: Identifiable {
var id: String { name }
let name: String
}
struct ContentView: View {
@State private var selectedShow: TVShow?
var body: some View {
VStack(spacing: 20) {
Text("What is your favorite TV show?")
.font(.headline)
Button("Select Ted Lasso") {
selectedShow = TVShow(name: "Ted Lasso")
}
Button("Select Bridgerton") {
selectedShow = TVShow(name: "Bridgerton")
}
}
.alert(item: $selectedShow) { show in
Alert(title: Text(show.name), message: Text("Great choice!"), dismissButton: .cancel())
}
}
}
```
================================================
FILE: example/alerts-and-menus/demo3/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DB7F6EC260AE5F0008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F6D9260AE5EF008F3D92 /* DemoApp.swift */; };
7DB7F6ED260AE5F0008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F6D9260AE5EF008F3D92 /* DemoApp.swift */; };
7DB7F6EE260AE5F0008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F6DA260AE5EF008F3D92 /* ContentView.swift */; };
7DB7F6EF260AE5F0008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F6DA260AE5EF008F3D92 /* ContentView.swift */; };
7DB7F6F0260AE5F0008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F6DB260AE5F0008F3D92 /* Assets.xcassets */; };
7DB7F6F1260AE5F0008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F6DB260AE5F0008F3D92 /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DB7F6D9260AE5EF008F3D92 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DB7F6DA260AE5EF008F3D92 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DB7F6DB260AE5F0008F3D92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DB7F6E0260AE5F0008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F6E3260AE5F0008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F6E8260AE5F0008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F6EA260AE5F0008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F6EB260AE5F0008F3D92 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DB7F6DD260AE5F0008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F6E5260AE5F0008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DB7F6D3260AE5EF008F3D92 = {
isa = PBXGroup;
children = (
7DB7F6D8260AE5EF008F3D92 /* Shared */,
7DB7F6E2260AE5F0008F3D92 /* iOS */,
7DB7F6E9260AE5F0008F3D92 /* macOS */,
7DB7F6E1260AE5F0008F3D92 /* Products */,
);
sourceTree = "";
};
7DB7F6D8260AE5EF008F3D92 /* Shared */ = {
isa = PBXGroup;
children = (
7DB7F6D9260AE5EF008F3D92 /* DemoApp.swift */,
7DB7F6DA260AE5EF008F3D92 /* ContentView.swift */,
7DB7F6DB260AE5F0008F3D92 /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DB7F6E1260AE5F0008F3D92 /* Products */ = {
isa = PBXGroup;
children = (
7DB7F6E0260AE5F0008F3D92 /* Demo.app */,
7DB7F6E8260AE5F0008F3D92 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DB7F6E2260AE5F0008F3D92 /* iOS */ = {
isa = PBXGroup;
children = (
7DB7F6E3260AE5F0008F3D92 /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DB7F6E9260AE5F0008F3D92 /* macOS */ = {
isa = PBXGroup;
children = (
7DB7F6EA260AE5F0008F3D92 /* Info.plist */,
7DB7F6EB260AE5F0008F3D92 /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DB7F6DF260AE5F0008F3D92 /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F6F4260AE5F0008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DB7F6DC260AE5F0008F3D92 /* Sources */,
7DB7F6DD260AE5F0008F3D92 /* Frameworks */,
7DB7F6DE260AE5F0008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DB7F6E0260AE5F0008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DB7F6E7260AE5F0008F3D92 /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F6F7260AE5F0008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DB7F6E4260AE5F0008F3D92 /* Sources */,
7DB7F6E5260AE5F0008F3D92 /* Frameworks */,
7DB7F6E6260AE5F0008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DB7F6E8260AE5F0008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DB7F6D4260AE5EF008F3D92 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DB7F6DF260AE5F0008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
7DB7F6E7260AE5F0008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DB7F6D7260AE5EF008F3D92 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DB7F6D3260AE5EF008F3D92;
productRefGroup = 7DB7F6E1260AE5F0008F3D92 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DB7F6DF260AE5F0008F3D92 /* Demo (iOS) */,
7DB7F6E7260AE5F0008F3D92 /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DB7F6DE260AE5F0008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F6F0260AE5F0008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F6E6260AE5F0008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F6F1260AE5F0008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DB7F6DC260AE5F0008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F6EE260AE5F0008F3D92 /* ContentView.swift in Sources */,
7DB7F6EC260AE5F0008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F6E4260AE5F0008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F6EF260AE5F0008F3D92 /* ContentView.swift in Sources */,
7DB7F6ED260AE5F0008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DB7F6F2260AE5F0008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DB7F6F3260AE5F0008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DB7F6F5260AE5F0008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DB7F6F6260AE5F0008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DB7F6F8260AE5F0008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DB7F6F9260AE5F0008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DB7F6D7260AE5EF008F3D92 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F6F2260AE5F0008F3D92 /* Debug */,
7DB7F6F3260AE5F0008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F6F4260AE5F0008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F6F5260AE5F0008F3D92 /* Debug */,
7DB7F6F6260AE5F0008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F6F7260AE5F0008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F6F8260AE5F0008F3D92 /* Debug */,
7DB7F6F9260AE5F0008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DB7F6D4260AE5EF008F3D92 /* Project object */;
}
================================================
FILE: example/alerts-and-menus/demo3/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/alerts-and-menus/demo3/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/alerts-and-menus/demo3/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo3/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo3/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo3/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
struct ContentView: View {
@State private var showingAlert = false
var body: some View {
Button("Show Alert") {
showingAlert = true
}
.alert(isPresented:$showingAlert) {
Alert(
title: Text("Are you sure you want to delete this?"),
message: Text("There is no undo"),
primaryButton: .destructive(Text("Delete")) {
print("Deleting...")
},
secondaryButton: .cancel()
)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/alerts-and-menus/demo3/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/alerts-and-menus/demo3/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/alerts-and-menus/demo3/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/alerts-and-menus/demo3/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/alerts-and-menus/demo3/README.md
================================================
如何为 `alert` 按钮添加动作?
===
基本的SwiftUI警报如下所示:
```swift
Alert(
title: Text("Important message"),
message: Text("Wear sunscreen"),
dismissButton: .default(Text("Got it!"))
)
```
但是,您经常需要将动作附加到按钮上,以便在点击它们时执行特定的动作。 为此,请在您的按钮上附加一个闭包,当您点击按钮时将其关闭,如下所示:
```swift
struct ContentView: View {
@State private var showingAlert = false
var body: some View {
Button("Show Alert") {
showingAlert = true
}
.alert(isPresented:$showingAlert) {
Alert(
title: Text("Are you sure you want to delete this?"),
message: Text("There is no undo"),
primaryButton: .destructive(Text("Delete")) {
print("Deleting...")
},
secondaryButton: .cancel()
)
}
}
}
```
无法为警报添加两个以上的按钮 - 如果您要这样做,则应改用操作表。
================================================
FILE: example/alerts-and-menus/demo4/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DB7F715260AEC28008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F702260AEC27008F3D92 /* DemoApp.swift */; };
7DB7F716260AEC28008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F702260AEC27008F3D92 /* DemoApp.swift */; };
7DB7F717260AEC28008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F703260AEC27008F3D92 /* ContentView.swift */; };
7DB7F718260AEC28008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F703260AEC27008F3D92 /* ContentView.swift */; };
7DB7F719260AEC28008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F704260AEC28008F3D92 /* Assets.xcassets */; };
7DB7F71A260AEC28008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F704260AEC28008F3D92 /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DB7F702260AEC27008F3D92 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DB7F703260AEC27008F3D92 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DB7F704260AEC28008F3D92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DB7F709260AEC28008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F70C260AEC28008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F711260AEC28008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F713260AEC28008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F714260AEC28008F3D92 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DB7F706260AEC28008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F70E260AEC28008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DB7F6FC260AEC27008F3D92 = {
isa = PBXGroup;
children = (
7DB7F701260AEC27008F3D92 /* Shared */,
7DB7F70B260AEC28008F3D92 /* iOS */,
7DB7F712260AEC28008F3D92 /* macOS */,
7DB7F70A260AEC28008F3D92 /* Products */,
);
sourceTree = "";
};
7DB7F701260AEC27008F3D92 /* Shared */ = {
isa = PBXGroup;
children = (
7DB7F702260AEC27008F3D92 /* DemoApp.swift */,
7DB7F703260AEC27008F3D92 /* ContentView.swift */,
7DB7F704260AEC28008F3D92 /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DB7F70A260AEC28008F3D92 /* Products */ = {
isa = PBXGroup;
children = (
7DB7F709260AEC28008F3D92 /* Demo.app */,
7DB7F711260AEC28008F3D92 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DB7F70B260AEC28008F3D92 /* iOS */ = {
isa = PBXGroup;
children = (
7DB7F70C260AEC28008F3D92 /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DB7F712260AEC28008F3D92 /* macOS */ = {
isa = PBXGroup;
children = (
7DB7F713260AEC28008F3D92 /* Info.plist */,
7DB7F714260AEC28008F3D92 /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DB7F708260AEC28008F3D92 /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F71D260AEC28008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DB7F705260AEC28008F3D92 /* Sources */,
7DB7F706260AEC28008F3D92 /* Frameworks */,
7DB7F707260AEC28008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DB7F709260AEC28008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DB7F710260AEC28008F3D92 /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F720260AEC28008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DB7F70D260AEC28008F3D92 /* Sources */,
7DB7F70E260AEC28008F3D92 /* Frameworks */,
7DB7F70F260AEC28008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DB7F711260AEC28008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DB7F6FD260AEC27008F3D92 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DB7F708260AEC28008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
7DB7F710260AEC28008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DB7F700260AEC27008F3D92 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DB7F6FC260AEC27008F3D92;
productRefGroup = 7DB7F70A260AEC28008F3D92 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DB7F708260AEC28008F3D92 /* Demo (iOS) */,
7DB7F710260AEC28008F3D92 /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DB7F707260AEC28008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F719260AEC28008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F70F260AEC28008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F71A260AEC28008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DB7F705260AEC28008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F717260AEC28008F3D92 /* ContentView.swift in Sources */,
7DB7F715260AEC28008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F70D260AEC28008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F718260AEC28008F3D92 /* ContentView.swift in Sources */,
7DB7F716260AEC28008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DB7F71B260AEC28008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DB7F71C260AEC28008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DB7F71E260AEC28008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DB7F71F260AEC28008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DB7F721260AEC28008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DB7F722260AEC28008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DB7F700260AEC27008F3D92 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F71B260AEC28008F3D92 /* Debug */,
7DB7F71C260AEC28008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F71D260AEC28008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F71E260AEC28008F3D92 /* Debug */,
7DB7F71F260AEC28008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F720260AEC28008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F721260AEC28008F3D92 /* Debug */,
7DB7F722260AEC28008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DB7F6FD260AEC27008F3D92 /* Project object */;
}
================================================
FILE: example/alerts-and-menus/demo4/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/alerts-and-menus/demo4/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/alerts-and-menus/demo4/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo4/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo4/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo4/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
struct ContentView: View {
@State private var showingAlert1 = false
@State private var showingAlert2 = false
var body: some View {
VStack {
Button("Show 1") {
showingAlert1 = true
}
.alert(isPresented: $showingAlert1) {
Alert(title: Text("One"), message: nil, dismissButton: .cancel())
}
Button("Show 2") {
showingAlert2 = true
}
.alert(isPresented: $showingAlert2) {
Alert(title: Text("Two"), message: nil, dismissButton: .cancel())
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/alerts-and-menus/demo4/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/alerts-and-menus/demo4/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/alerts-and-menus/demo4/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/alerts-and-menus/demo4/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/alerts-and-menus/demo4/README.md
================================================
如何在单个视图中显示多个 `alert`?
===
SwiftUI 使得显示单个警报相对容易,但是,如果您尝试从单个视图中显示两个或多个警报,则事情将变得更加棘手-例如,您可能会发现一个警报有效而另一个警报无效。
要解决此问题,您需要确保在每个视图上附加不超过一个 `alert()` 修饰符。 听起来可能有限制,但请记住:您无需将警报附加到同一视图–您可以将它们附加在任何地方。 实际上,您可能会发现将它们直接附加到显示它们的内容(例如按钮)上最适合您。
例如,我们可以编写一些代码定义两个 `@State` 属性,每个属性控制显示的警报。 与其将两个 `alert()` 修饰符都附加到同一个 `VStack` 上,不如将它们分别附加到负责显示该警告的任何按钮上:
```swift
struct ContentView: View {
@State private var showingAlert1 = false
@State private var showingAlert2 = false
var body: some View {
VStack {
Button("Show 1") {
showingAlert1 = true
}
.alert(isPresented: $showingAlert1) {
Alert(title: Text("One"), message: nil, dismissButton: .cancel())
}
Button("Show 2") {
showingAlert2 = true
}
.alert(isPresented: $showingAlert2) {
Alert(title: Text("Two"), message: nil, dismissButton: .cancel())
}
}
}
}
```
如果您尝试将两个 `alert()` 修饰符都移至 `VStack`,则会发现只有一个起作用,这就是上述方法如此有用的原因。
================================================
FILE: example/alerts-and-menus/demo5/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DB7F73E260AECDF008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F72B260AECDF008F3D92 /* DemoApp.swift */; };
7DB7F73F260AECDF008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F72B260AECDF008F3D92 /* DemoApp.swift */; };
7DB7F740260AECDF008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F72C260AECDF008F3D92 /* ContentView.swift */; };
7DB7F741260AECDF008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F72C260AECDF008F3D92 /* ContentView.swift */; };
7DB7F742260AECDF008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F72D260AECDF008F3D92 /* Assets.xcassets */; };
7DB7F743260AECDF008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F72D260AECDF008F3D92 /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DB7F72B260AECDF008F3D92 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DB7F72C260AECDF008F3D92 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DB7F72D260AECDF008F3D92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DB7F732260AECDF008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F735260AECDF008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F73A260AECDF008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F73C260AECDF008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F73D260AECDF008F3D92 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DB7F72F260AECDF008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F737260AECDF008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DB7F725260AECDF008F3D92 = {
isa = PBXGroup;
children = (
7DB7F72A260AECDF008F3D92 /* Shared */,
7DB7F734260AECDF008F3D92 /* iOS */,
7DB7F73B260AECDF008F3D92 /* macOS */,
7DB7F733260AECDF008F3D92 /* Products */,
);
sourceTree = "";
};
7DB7F72A260AECDF008F3D92 /* Shared */ = {
isa = PBXGroup;
children = (
7DB7F72B260AECDF008F3D92 /* DemoApp.swift */,
7DB7F72C260AECDF008F3D92 /* ContentView.swift */,
7DB7F72D260AECDF008F3D92 /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DB7F733260AECDF008F3D92 /* Products */ = {
isa = PBXGroup;
children = (
7DB7F732260AECDF008F3D92 /* Demo.app */,
7DB7F73A260AECDF008F3D92 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DB7F734260AECDF008F3D92 /* iOS */ = {
isa = PBXGroup;
children = (
7DB7F735260AECDF008F3D92 /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DB7F73B260AECDF008F3D92 /* macOS */ = {
isa = PBXGroup;
children = (
7DB7F73C260AECDF008F3D92 /* Info.plist */,
7DB7F73D260AECDF008F3D92 /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DB7F731260AECDF008F3D92 /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F746260AECDF008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DB7F72E260AECDF008F3D92 /* Sources */,
7DB7F72F260AECDF008F3D92 /* Frameworks */,
7DB7F730260AECDF008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DB7F732260AECDF008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DB7F739260AECDF008F3D92 /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F749260AECDF008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DB7F736260AECDF008F3D92 /* Sources */,
7DB7F737260AECDF008F3D92 /* Frameworks */,
7DB7F738260AECDF008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DB7F73A260AECDF008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DB7F726260AECDF008F3D92 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DB7F731260AECDF008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
7DB7F739260AECDF008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DB7F729260AECDF008F3D92 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DB7F725260AECDF008F3D92;
productRefGroup = 7DB7F733260AECDF008F3D92 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DB7F731260AECDF008F3D92 /* Demo (iOS) */,
7DB7F739260AECDF008F3D92 /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DB7F730260AECDF008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F742260AECDF008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F738260AECDF008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F743260AECDF008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DB7F72E260AECDF008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F740260AECDF008F3D92 /* ContentView.swift in Sources */,
7DB7F73E260AECDF008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F736260AECDF008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F741260AECDF008F3D92 /* ContentView.swift in Sources */,
7DB7F73F260AECDF008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DB7F744260AECDF008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DB7F745260AECDF008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DB7F747260AECDF008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DB7F748260AECDF008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DB7F74A260AECDF008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DB7F74B260AECDF008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DB7F729260AECDF008F3D92 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F744260AECDF008F3D92 /* Debug */,
7DB7F745260AECDF008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F746260AECDF008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F747260AECDF008F3D92 /* Debug */,
7DB7F748260AECDF008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F749260AECDF008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F74A260AECDF008F3D92 /* Debug */,
7DB7F74B260AECDF008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DB7F726260AECDF008F3D92 /* Project object */;
}
================================================
FILE: example/alerts-and-menus/demo5/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/alerts-and-menus/demo5/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/alerts-and-menus/demo5/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo5/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo5/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo5/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
struct ContentView: View {
@State private var showingSheet = false
var body: some View {
Button("Show Action Sheet") {
showingSheet = true
}
.actionSheet(isPresented: $showingSheet) {
#if os(iOS)
return ActionSheet(
title: Text("What do you want to do?"),
message: Text("There's only one choice..."),
buttons: [.default(Text("Dismiss Action Sheet"))]
)
#endif
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/alerts-and-menus/demo5/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/alerts-and-menus/demo5/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/alerts-and-menus/demo5/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/alerts-and-menus/demo5/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/alerts-and-menus/demo5/README.md
================================================
如何显示动作面板?
===
SwiftUI 为我们提供了用于创建操作表以供用户选择的 `ActionSheet` 视图,其工作方式与警报类似。
与警报一样,您需要定义一个属性,该属性将跟踪操作表是否可见。 然后,使用 `actionSheet()` 修饰符监视该属性,并在条件变为true时显示您选择的操作表。
重要:操作表在 `macOS` 上不可用。
例如,这是一个示例视图,当点击按钮时会触发一个动作表:
```swift
struct ContentView: View {
@State private var showingSheet = false
var body: some View {
Button("Show Action Sheet") {
showingSheet = true
}
.actionSheet(isPresented: $showingSheet) {
ActionSheet(
title: Text("What do you want to do?"),
message: Text("There's only one choice..."),
buttons: [.default(Text("Dismiss Action Sheet"))]
)
}
}
}
```
================================================
FILE: example/alerts-and-menus/demo6/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DB7F767260AF8D9008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F754260AF8D7008F3D92 /* DemoApp.swift */; };
7DB7F768260AF8D9008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F754260AF8D7008F3D92 /* DemoApp.swift */; };
7DB7F769260AF8D9008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F755260AF8D7008F3D92 /* ContentView.swift */; };
7DB7F76A260AF8D9008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F755260AF8D7008F3D92 /* ContentView.swift */; };
7DB7F76B260AF8D9008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F756260AF8D9008F3D92 /* Assets.xcassets */; };
7DB7F76C260AF8D9008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F756260AF8D9008F3D92 /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DB7F754260AF8D7008F3D92 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DB7F755260AF8D7008F3D92 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DB7F756260AF8D9008F3D92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DB7F75B260AF8D9008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F75E260AF8D9008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F763260AF8D9008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F765260AF8D9008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F766260AF8D9008F3D92 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DB7F758260AF8D9008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F760260AF8D9008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DB7F74E260AF8D7008F3D92 = {
isa = PBXGroup;
children = (
7DB7F753260AF8D7008F3D92 /* Shared */,
7DB7F75D260AF8D9008F3D92 /* iOS */,
7DB7F764260AF8D9008F3D92 /* macOS */,
7DB7F75C260AF8D9008F3D92 /* Products */,
);
sourceTree = "";
};
7DB7F753260AF8D7008F3D92 /* Shared */ = {
isa = PBXGroup;
children = (
7DB7F754260AF8D7008F3D92 /* DemoApp.swift */,
7DB7F755260AF8D7008F3D92 /* ContentView.swift */,
7DB7F756260AF8D9008F3D92 /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DB7F75C260AF8D9008F3D92 /* Products */ = {
isa = PBXGroup;
children = (
7DB7F75B260AF8D9008F3D92 /* Demo.app */,
7DB7F763260AF8D9008F3D92 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DB7F75D260AF8D9008F3D92 /* iOS */ = {
isa = PBXGroup;
children = (
7DB7F75E260AF8D9008F3D92 /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DB7F764260AF8D9008F3D92 /* macOS */ = {
isa = PBXGroup;
children = (
7DB7F765260AF8D9008F3D92 /* Info.plist */,
7DB7F766260AF8D9008F3D92 /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DB7F75A260AF8D9008F3D92 /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F76F260AF8D9008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DB7F757260AF8D9008F3D92 /* Sources */,
7DB7F758260AF8D9008F3D92 /* Frameworks */,
7DB7F759260AF8D9008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DB7F75B260AF8D9008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DB7F762260AF8D9008F3D92 /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F772260AF8D9008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DB7F75F260AF8D9008F3D92 /* Sources */,
7DB7F760260AF8D9008F3D92 /* Frameworks */,
7DB7F761260AF8D9008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DB7F763260AF8D9008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DB7F74F260AF8D7008F3D92 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DB7F75A260AF8D9008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
7DB7F762260AF8D9008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DB7F752260AF8D7008F3D92 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DB7F74E260AF8D7008F3D92;
productRefGroup = 7DB7F75C260AF8D9008F3D92 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DB7F75A260AF8D9008F3D92 /* Demo (iOS) */,
7DB7F762260AF8D9008F3D92 /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DB7F759260AF8D9008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F76B260AF8D9008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F761260AF8D9008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F76C260AF8D9008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DB7F757260AF8D9008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F769260AF8D9008F3D92 /* ContentView.swift in Sources */,
7DB7F767260AF8D9008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F75F260AF8D9008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F76A260AF8D9008F3D92 /* ContentView.swift in Sources */,
7DB7F768260AF8D9008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DB7F76D260AF8D9008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DB7F76E260AF8D9008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DB7F770260AF8D9008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DB7F771260AF8D9008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DB7F773260AF8D9008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DB7F774260AF8D9008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DB7F752260AF8D7008F3D92 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F76D260AF8D9008F3D92 /* Debug */,
7DB7F76E260AF8D9008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F76F260AF8D9008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F770260AF8D9008F3D92 /* Debug */,
7DB7F771260AF8D9008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F772260AF8D9008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F773260AF8D9008F3D92 /* Debug */,
7DB7F774260AF8D9008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DB7F74F260AF8D7008F3D92 /* Project object */;
}
================================================
FILE: example/alerts-and-menus/demo6/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/alerts-and-menus/demo6/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/alerts-and-menus/demo6/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo6/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo6/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo6/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Text("选项")
.contextMenu {
Button {
print("Change country setting")
} label: {
Label("Choose Country", systemImage: "globe")
}
Button {
print("Enable geolocation")
} label: {
Label("Detect Location", systemImage: "location.circle")
}
}
}
.frame(width: 200, height: 360, alignment: .center)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/alerts-and-menus/demo6/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/alerts-and-menus/demo6/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/alerts-and-menus/demo6/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/alerts-and-menus/demo6/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/alerts-and-menus/demo6/README.md
================================================
如何显示上下文菜单?
===
SwiftUI 为我们提供了 `ContextMenu` 修饰符,用于在我们的应用中创建弹出菜单。 在 `iOS` 中,通常长按即可触发此操作,但其功能与在macOS上单击鼠标右键相同-这是一种灵活的API。
上下文菜单由一组按钮组成,每个按钮都有自己的操作,文本和图标。 文本和图标可以直接在按钮内部提供,因为 `SwiftUI` 将提供隐式的 `HStack` 来确保它们适合系统标准外观。
因此,如果我们希望将上下文菜单附加到某些文本,则可以为该菜单提供两个按钮,如下所示:
```swift
Text("选项")
.contextMenu {
Button {
print("Change country setting")
} label: {
Label("Choose Country", systemImage: "globe")
}
Button {
print("Enable geolocation")
} label: {
Label("Detect Location", systemImage: "location.circle")
}
}
```
要在 `iOS` 上进行尝试,请长按 `选项` 文本以调出菜单,或右键单击 `macOS`。 值得补充的是,您可以将这些类型的菜单附加到任何 `SwiftUI` 视图,而不仅仅是文本视图。
================================================
FILE: example/alerts-and-menus/demo7/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DB7F790260AF9D0008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F77D260AF9CF008F3D92 /* DemoApp.swift */; };
7DB7F791260AF9D0008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F77D260AF9CF008F3D92 /* DemoApp.swift */; };
7DB7F792260AF9D0008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F77E260AF9CF008F3D92 /* ContentView.swift */; };
7DB7F793260AF9D0008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F77E260AF9CF008F3D92 /* ContentView.swift */; };
7DB7F794260AF9D0008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F77F260AF9D0008F3D92 /* Assets.xcassets */; };
7DB7F795260AF9D0008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F77F260AF9D0008F3D92 /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DB7F77D260AF9CF008F3D92 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DB7F77E260AF9CF008F3D92 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DB7F77F260AF9D0008F3D92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DB7F784260AF9D0008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F787260AF9D0008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F78C260AF9D0008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F78E260AF9D0008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F78F260AF9D0008F3D92 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DB7F781260AF9D0008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F789260AF9D0008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DB7F777260AF9CF008F3D92 = {
isa = PBXGroup;
children = (
7DB7F77C260AF9CF008F3D92 /* Shared */,
7DB7F786260AF9D0008F3D92 /* iOS */,
7DB7F78D260AF9D0008F3D92 /* macOS */,
7DB7F785260AF9D0008F3D92 /* Products */,
);
sourceTree = "";
};
7DB7F77C260AF9CF008F3D92 /* Shared */ = {
isa = PBXGroup;
children = (
7DB7F77D260AF9CF008F3D92 /* DemoApp.swift */,
7DB7F77E260AF9CF008F3D92 /* ContentView.swift */,
7DB7F77F260AF9D0008F3D92 /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DB7F785260AF9D0008F3D92 /* Products */ = {
isa = PBXGroup;
children = (
7DB7F784260AF9D0008F3D92 /* Demo.app */,
7DB7F78C260AF9D0008F3D92 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DB7F786260AF9D0008F3D92 /* iOS */ = {
isa = PBXGroup;
children = (
7DB7F787260AF9D0008F3D92 /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DB7F78D260AF9D0008F3D92 /* macOS */ = {
isa = PBXGroup;
children = (
7DB7F78E260AF9D0008F3D92 /* Info.plist */,
7DB7F78F260AF9D0008F3D92 /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DB7F783260AF9D0008F3D92 /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F798260AF9D0008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DB7F780260AF9D0008F3D92 /* Sources */,
7DB7F781260AF9D0008F3D92 /* Frameworks */,
7DB7F782260AF9D0008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DB7F784260AF9D0008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DB7F78B260AF9D0008F3D92 /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F79B260AF9D0008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DB7F788260AF9D0008F3D92 /* Sources */,
7DB7F789260AF9D0008F3D92 /* Frameworks */,
7DB7F78A260AF9D0008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DB7F78C260AF9D0008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DB7F778260AF9CF008F3D92 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DB7F783260AF9D0008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
7DB7F78B260AF9D0008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DB7F77B260AF9CF008F3D92 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DB7F777260AF9CF008F3D92;
productRefGroup = 7DB7F785260AF9D0008F3D92 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DB7F783260AF9D0008F3D92 /* Demo (iOS) */,
7DB7F78B260AF9D0008F3D92 /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DB7F782260AF9D0008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F794260AF9D0008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F78A260AF9D0008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F795260AF9D0008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DB7F780260AF9D0008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F792260AF9D0008F3D92 /* ContentView.swift in Sources */,
7DB7F790260AF9D0008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F788260AF9D0008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F793260AF9D0008F3D92 /* ContentView.swift in Sources */,
7DB7F791260AF9D0008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DB7F796260AF9D0008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DB7F797260AF9D0008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DB7F799260AF9D0008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DB7F79A260AF9D0008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DB7F79C260AF9D0008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DB7F79D260AF9D0008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DB7F77B260AF9CF008F3D92 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F796260AF9D0008F3D92 /* Debug */,
7DB7F797260AF9D0008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F798260AF9D0008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F799260AF9D0008F3D92 /* Debug */,
7DB7F79A260AF9D0008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F79B260AF9D0008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F79C260AF9D0008F3D92 /* Debug */,
7DB7F79D260AF9D0008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DB7F778260AF9CF008F3D92 /* Project object */;
}
================================================
FILE: example/alerts-and-menus/demo7/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/alerts-and-menus/demo7/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/alerts-and-menus/demo7/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo7/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo7/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo7/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
import StoreKit
struct ContentView: View {
@State private var showRecommended = false
var body: some View {
Button("Show Recommended App") {
showRecommended.toggle()
}
.appStoreOverlay(isPresented: $showRecommended) {
SKOverlay.AppConfiguration(appIdentifier: "1440611372", position: .bottom)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/alerts-and-menus/demo7/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/alerts-and-menus/demo7/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
UIApplicationSupportsIndirectInputEvents
UILaunchScreen
UIRequiredDeviceCapabilities
armv7
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
================================================
FILE: example/alerts-and-menus/demo7/Demo/macOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIconFile
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
================================================
FILE: example/alerts-and-menus/demo7/Demo/macOS/macOS.entitlements
================================================
com.apple.security.app-sandbox
com.apple.security.files.user-selected.read-only
================================================
FILE: example/alerts-and-menus/demo7/README.md
================================================
如何使用 `appStoreOverlay()` 推荐另一个应用程序?
===
SwiftUI 为我们提供了一个专用的修饰符,可以在 `App Store` 上推荐其他应用,这是与用户交叉销售的好方法 - “如果您喜欢它,您也会喜欢它”,依此类推。 如果您使用的是应用剪辑,这将特别有用,一旦用户执行了主要操作,您就可以在剪辑中推荐完整的应用。
此修改器需要观察一些状态,这些状态将确定 `App Store` 叠加层是否处于活动状态,以及 `SKOverlay.AppConfiguration` 来确定推荐哪个应用程序。
重要: `appStoreOverlay()`在 `macOS`上不可用,需要添加 `import StoreKit`。
例如,当按下按钮时,这将推荐一个特定的应用程序:
```swift
import StoreKit
struct ContentView: View {
@State private var showRecommended = false
var body: some View {
Button("Show Recommended App") {
showRecommended.toggle()
}
.appStoreOverlay(isPresented: $showRecommended) {
SKOverlay.AppConfiguration(appIdentifier: "1440611372", position: .bottom)
}
}
}
```
================================================
FILE: example/alerts-and-menus/demo8/Demo/Demo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
7DB7F7B9260AFEDF008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F7A6260AFEDE008F3D92 /* DemoApp.swift */; };
7DB7F7BA260AFEDF008F3D92 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F7A6260AFEDE008F3D92 /* DemoApp.swift */; };
7DB7F7BB260AFEDF008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F7A7260AFEDE008F3D92 /* ContentView.swift */; };
7DB7F7BC260AFEDF008F3D92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB7F7A7260AFEDE008F3D92 /* ContentView.swift */; };
7DB7F7BD260AFEDF008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F7A8260AFEDF008F3D92 /* Assets.xcassets */; };
7DB7F7BE260AFEDF008F3D92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB7F7A8260AFEDF008F3D92 /* Assets.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
7DB7F7A6260AFEDE008F3D92 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; };
7DB7F7A7260AFEDE008F3D92 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
7DB7F7A8260AFEDF008F3D92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
7DB7F7AD260AFEDF008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F7B0260AFEDF008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F7B5260AFEDF008F3D92 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7DB7F7B7260AFEDF008F3D92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
7DB7F7B8260AFEDF008F3D92 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7DB7F7AA260AFEDF008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F7B2260AFEDF008F3D92 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7DB7F7A0260AFEDE008F3D92 = {
isa = PBXGroup;
children = (
7DB7F7A5260AFEDE008F3D92 /* Shared */,
7DB7F7AF260AFEDF008F3D92 /* iOS */,
7DB7F7B6260AFEDF008F3D92 /* macOS */,
7DB7F7AE260AFEDF008F3D92 /* Products */,
);
sourceTree = "";
};
7DB7F7A5260AFEDE008F3D92 /* Shared */ = {
isa = PBXGroup;
children = (
7DB7F7A6260AFEDE008F3D92 /* DemoApp.swift */,
7DB7F7A7260AFEDE008F3D92 /* ContentView.swift */,
7DB7F7A8260AFEDF008F3D92 /* Assets.xcassets */,
);
path = Shared;
sourceTree = "";
};
7DB7F7AE260AFEDF008F3D92 /* Products */ = {
isa = PBXGroup;
children = (
7DB7F7AD260AFEDF008F3D92 /* Demo.app */,
7DB7F7B5260AFEDF008F3D92 /* Demo.app */,
);
name = Products;
sourceTree = "";
};
7DB7F7AF260AFEDF008F3D92 /* iOS */ = {
isa = PBXGroup;
children = (
7DB7F7B0260AFEDF008F3D92 /* Info.plist */,
);
path = iOS;
sourceTree = "";
};
7DB7F7B6260AFEDF008F3D92 /* macOS */ = {
isa = PBXGroup;
children = (
7DB7F7B7260AFEDF008F3D92 /* Info.plist */,
7DB7F7B8260AFEDF008F3D92 /* macOS.entitlements */,
);
path = macOS;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7DB7F7AC260AFEDF008F3D92 /* Demo (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F7C1260AFEDF008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */;
buildPhases = (
7DB7F7A9260AFEDF008F3D92 /* Sources */,
7DB7F7AA260AFEDF008F3D92 /* Frameworks */,
7DB7F7AB260AFEDF008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (iOS)";
productName = "Demo (iOS)";
productReference = 7DB7F7AD260AFEDF008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
7DB7F7B4260AFEDF008F3D92 /* Demo (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7DB7F7C4260AFEDF008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */;
buildPhases = (
7DB7F7B1260AFEDF008F3D92 /* Sources */,
7DB7F7B2260AFEDF008F3D92 /* Frameworks */,
7DB7F7B3260AFEDF008F3D92 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Demo (macOS)";
productName = "Demo (macOS)";
productReference = 7DB7F7B5260AFEDF008F3D92 /* Demo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
7DB7F7A1260AFEDE008F3D92 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
7DB7F7AC260AFEDF008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
7DB7F7B4260AFEDF008F3D92 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 7DB7F7A4260AFEDE008F3D92 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 7DB7F7A0260AFEDE008F3D92;
productRefGroup = 7DB7F7AE260AFEDF008F3D92 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
7DB7F7AC260AFEDF008F3D92 /* Demo (iOS) */,
7DB7F7B4260AFEDF008F3D92 /* Demo (macOS) */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7DB7F7AB260AFEDF008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F7BD260AFEDF008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F7B3260AFEDF008F3D92 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F7BE260AFEDF008F3D92 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7DB7F7A9260AFEDF008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F7BB260AFEDF008F3D92 /* ContentView.swift in Sources */,
7DB7F7B9260AFEDF008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7DB7F7B1260AFEDF008F3D92 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7DB7F7BC260AFEDF008F3D92 /* ContentView.swift in Sources */,
7DB7F7BA260AFEDF008F3D92 /* DemoApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
7DB7F7BF260AFEDF008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
7DB7F7C0260AFEDF008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
7DB7F7C2260AFEDF008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7DB7F7C3260AFEDF008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
7DB7F7C5260AFEDF008F3D92 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
7DB7F7C6260AFEDF008F3D92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 968DSZ49MT;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = demo.Demo;
PRODUCT_NAME = Demo;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7DB7F7A4260AFEDE008F3D92 /* Build configuration list for PBXProject "Demo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F7BF260AFEDF008F3D92 /* Debug */,
7DB7F7C0260AFEDF008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F7C1260AFEDF008F3D92 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F7C2260AFEDF008F3D92 /* Debug */,
7DB7F7C3260AFEDF008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7DB7F7C4260AFEDF008F3D92 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7DB7F7C5260AFEDF008F3D92 /* Debug */,
7DB7F7C6260AFEDF008F3D92 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 7DB7F7A1260AFEDE008F3D92 /* Project object */;
}
================================================
FILE: example/alerts-and-menus/demo8/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
================================================
FILE: example/alerts-and-menus/demo8/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
IDEDidComputeMac32BitWarning
================================================
FILE: example/alerts-and-menus/demo8/Demo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo8/Demo/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo8/Demo/Shared/Assets.xcassets/Contents.json
================================================
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
================================================
FILE: example/alerts-and-menus/demo8/Demo/Shared/ContentView.swift
================================================
//
// ContentView.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
struct ContentView: View {
var body: some View {
Menu("Options") {
Button("Order Now", action: placeOrder)
Button("Adjust Order", action: adjustOrder)
Menu("Advanced") {
Button("Rename", action: rename)
Button("Delay", action: delay)
}
Button("Cancel", action: cancelOrder)
}
Menu {
Button("Order Now", action: placeOrder)
Button("Adjust Order", action: adjustOrder)
} label: {
Label("Options", systemImage: "paperplane")
}
}
func placeOrder() { }
func adjustOrder() { }
func rename() { }
func delay() { }
func cancelOrder() { }
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
================================================
FILE: example/alerts-and-menus/demo8/Demo/Shared/DemoApp.swift
================================================
//
// DemoApp.swift
// Shared
//
// Created by 王楚江 on 2021/3/24.
//
import SwiftUI
@main
struct DemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
================================================
FILE: example/alerts-and-menus/demo8/Demo/iOS/Info.plist
================================================
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
$(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleShortVersionString
1.0
CFBundleVersion
1
LSRequiresIPhoneOS
UIApplicationSceneManifest