├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── .swiftpm
└── xcode
│ └── package.xcworkspace
│ └── contents.xcworkspacedata
├── Cartfile.private
├── Cartfile.resolved
├── Carthage
└── Checkouts
│ ├── DiffableDataSources
│ ├── .github
│ │ ├── ISSUE_TEMPLATE
│ │ │ ├── BUG_REPORT.md
│ │ │ ├── FEATURE_REQUEST.md
│ │ │ └── QUESTION.md
│ │ └── PULL_REQUEST_TEMPLATE.md
│ ├── .gitignore
│ ├── .gitmodules
│ ├── .jazzy.yml
│ ├── .swift-version
│ ├── .swiftlint.yml
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── Cartfile
│ ├── Cartfile.resolved
│ ├── Carthage
│ │ └── Checkouts
│ │ │ └── DifferenceKit
│ │ │ ├── .github
│ │ │ ├── ISSUE_TEMPLATE
│ │ │ │ ├── BUG_REPORT.md
│ │ │ │ ├── FEATURE_REQUEST.md
│ │ │ │ └── QUESTION.md
│ │ │ └── PULL_REQUEST_TEMPLATE.md
│ │ │ ├── .gitignore
│ │ │ ├── .hound.yml
│ │ │ ├── .jazzy.yaml
│ │ │ ├── .swift-version
│ │ │ ├── .swiftlint.yml
│ │ │ ├── Benchmark
│ │ │ ├── Benchmark.xcodeproj
│ │ │ │ ├── project.pbxproj
│ │ │ │ ├── project.xcworkspace
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata
│ │ │ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ │ │ └── WorkspaceSettings.xcsettings
│ │ │ │ └── xcshareddata
│ │ │ │ │ └── xcschemes
│ │ │ │ │ └── Benchmark.xcscheme
│ │ │ ├── Benchmark.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ │ └── WorkspaceSettings.xcsettings
│ │ │ ├── Gemfile
│ │ │ ├── Gemfile.lock
│ │ │ ├── Makefile
│ │ │ ├── Podfile
│ │ │ ├── Podfile.lock
│ │ │ ├── README.md
│ │ │ └── Sources
│ │ │ │ ├── BenchmarkTools.swift
│ │ │ │ ├── Info.plist
│ │ │ │ └── main.swift
│ │ │ ├── CODE_OF_CONDUCT.md
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── DifferenceKit.playground
│ │ │ ├── Contents.swift
│ │ │ ├── Sources
│ │ │ │ └── TableViewController.swift
│ │ │ └── contents.xcplayground
│ │ │ ├── DifferenceKit.podspec
│ │ │ ├── DifferenceKit.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ └── DifferenceKit.xcscheme
│ │ │ ├── DifferenceKit.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ ├── Examples
│ │ │ ├── Example-iOS
│ │ │ │ ├── Example-iOS.xcodeproj
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace
│ │ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ │ └── xcshareddata
│ │ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ └── Sources
│ │ │ │ │ ├── AppDelegate.swift
│ │ │ │ │ ├── Assets.xcassets
│ │ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── Base.lproj
│ │ │ │ │ └── LaunchScreen.storyboard
│ │ │ │ │ ├── Common
│ │ │ │ │ ├── NibLoadable.swift
│ │ │ │ │ ├── Reusable.swift
│ │ │ │ │ ├── ReusableViewExtensions.swift
│ │ │ │ │ └── StringExtensions.swift
│ │ │ │ │ ├── HeaderFooter
│ │ │ │ │ ├── HeaderFooterCell.swift
│ │ │ │ │ ├── HeaderFooterMoreView.swift
│ │ │ │ │ ├── HeaderFooterMoreView.xib
│ │ │ │ │ ├── HeaderFooterSectionModel.swift
│ │ │ │ │ └── HeaderFooterViewController.swift
│ │ │ │ │ ├── Home
│ │ │ │ │ ├── HomeCell.swift
│ │ │ │ │ ├── HomeCell.xib
│ │ │ │ │ └── HomeViewController.swift
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── Random
│ │ │ │ │ ├── RandomLabelView.swift
│ │ │ │ │ ├── RandomLabelView.xib
│ │ │ │ │ ├── RandomModel.swift
│ │ │ │ │ ├── RandomPlainCell.swift
│ │ │ │ │ ├── RandomViewController.swift
│ │ │ │ │ └── RandomViewController.xib
│ │ │ │ │ └── ShuffleEmoticon
│ │ │ │ │ ├── EmojiCell.swift
│ │ │ │ │ ├── EmojiCell.xib
│ │ │ │ │ ├── EmojiViewController.swift
│ │ │ │ │ └── EmojiViewController.xib
│ │ │ ├── Example-macOS
│ │ │ │ ├── Example-macOS.xcodeproj
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ └── project.xcworkspace
│ │ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ │ └── xcshareddata
│ │ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ └── Sources
│ │ │ │ │ ├── AppDelegate.swift
│ │ │ │ │ ├── Assets.xcassets
│ │ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── Base.lproj
│ │ │ │ │ └── MainMenu.xib
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── ShuffleEmoticonCollectionViewItem.swift
│ │ │ │ │ ├── ShuffleEmoticonViewController.swift
│ │ │ │ │ └── StringExtensions.swift
│ │ │ └── Example-tvOS
│ │ │ │ ├── Example-tvOS.xcodeproj
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ └── xcshareddata
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ └── Sources
│ │ │ │ ├── AppDelegate.swift
│ │ │ │ ├── Assets.xcassets
│ │ │ │ ├── App Icon & Top Shelf Image.brandassets
│ │ │ │ │ ├── App Icon - App Store.imagestack
│ │ │ │ │ │ ├── Back.imagestacklayer
│ │ │ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ ├── Front.imagestacklayer
│ │ │ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Middle.imagestacklayer
│ │ │ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── App Icon.imagestack
│ │ │ │ │ │ ├── Back.imagestacklayer
│ │ │ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── Contents.json
│ │ │ │ │ │ ├── Front.imagestacklayer
│ │ │ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ └── Middle.imagestacklayer
│ │ │ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ ├── Top Shelf Image Wide.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Top Shelf Image.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ │ ├── EmojiCell.swift
│ │ │ │ ├── EmojiCell.xib
│ │ │ │ ├── EmojiViewController.swift
│ │ │ │ ├── EmojiViewController.xib
│ │ │ │ ├── Info.plist
│ │ │ │ ├── NibLoadable.swift
│ │ │ │ ├── Reusable.swift
│ │ │ │ ├── ReusableViewExtensions.swift
│ │ │ │ └── StringExtensions.swift
│ │ │ ├── Gemfile
│ │ │ ├── Gemfile.lock
│ │ │ ├── LICENSE
│ │ │ ├── LinuxMain.swift
│ │ │ ├── Makefile
│ │ │ ├── Package.swift
│ │ │ ├── Package@swift-4.2.swift
│ │ │ ├── README.md
│ │ │ ├── Sources
│ │ │ ├── Algorithm.swift
│ │ │ ├── AnyDifferentiable.swift
│ │ │ ├── ArraySection.swift
│ │ │ ├── Changeset.swift
│ │ │ ├── ContentEquatable.swift
│ │ │ ├── Differentiable.swift
│ │ │ ├── DifferentiableSection.swift
│ │ │ ├── ElementPath.swift
│ │ │ ├── Extensions
│ │ │ │ ├── AppKitExtension.swift
│ │ │ │ └── UIKitExtension.swift
│ │ │ ├── Info.plist
│ │ │ └── StagedChangeset.swift
│ │ │ ├── Tests
│ │ │ ├── AlgorithmTest.swift
│ │ │ ├── AnyDifferentiableTest.swift
│ │ │ ├── ArraySectionTest.swift
│ │ │ ├── ChangesetTest.swift
│ │ │ ├── ContentEquatableTest.swift
│ │ │ ├── ElementPathTest.swift
│ │ │ ├── Info.plist
│ │ │ ├── MeasurementTest.swift
│ │ │ ├── StagedChangesetTest.swift
│ │ │ ├── TestTools.swift
│ │ │ └── XCTestManifests.swift
│ │ │ ├── XCConfigs
│ │ │ └── DifferenceKit.xcconfig
│ │ │ ├── assets
│ │ │ ├── logo.png
│ │ │ └── sample.gif
│ │ │ ├── azure-pipelines.yml
│ │ │ ├── docs
│ │ │ ├── Changeset.html
│ │ │ ├── Diffing.html
│ │ │ ├── Extensions
│ │ │ │ ├── Optional.html
│ │ │ │ ├── UICollectionView.html
│ │ │ │ └── UITableView.html
│ │ │ ├── Protocols
│ │ │ │ ├── ContentEquatable.html
│ │ │ │ ├── Differentiable.html
│ │ │ │ └── DifferentiableSection.html
│ │ │ ├── Structs
│ │ │ │ ├── AnyDifferentiable.html
│ │ │ │ ├── ArraySection.html
│ │ │ │ ├── Changeset.html
│ │ │ │ ├── ElementPath.html
│ │ │ │ └── StagedChangeset.html
│ │ │ ├── UI Extensions.html
│ │ │ ├── badge.svg
│ │ │ ├── css
│ │ │ │ ├── highlight.css
│ │ │ │ └── jazzy.css
│ │ │ ├── img
│ │ │ │ ├── carat.png
│ │ │ │ ├── dash.png
│ │ │ │ ├── gh.png
│ │ │ │ └── spinner.gif
│ │ │ ├── index.html
│ │ │ ├── js
│ │ │ │ ├── jazzy.js
│ │ │ │ ├── jazzy.search.js
│ │ │ │ ├── jquery.min.js
│ │ │ │ ├── lunr.min.js
│ │ │ │ └── typeahead.jquery.js
│ │ │ └── search.json
│ │ │ └── test-linux.sh
│ ├── DiffableDataSources.podspec
│ ├── DiffableDataSources.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── DiffableDataSources.xcscheme
│ │ │ └── Tests.xcscheme
│ ├── DiffableDataSources.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Examples
│ │ ├── DiffableDataSourcesExamples.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ └── Example-iOS.xcscheme
│ │ ├── DiffableDataSourcesExamples.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── Example-iOS
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ ├── Base.lproj
│ │ │ │ └── LaunchScreen.storyboard
│ │ │ ├── Extension.swift
│ │ │ ├── Info.plist
│ │ │ ├── InsertionSortViewController.swift
│ │ │ ├── InsertionSortViewController.xib
│ │ │ ├── LabelCell.swift
│ │ │ ├── LabelCell.xib
│ │ │ ├── MountainsViewController.swift
│ │ │ ├── MountainsViewController.xib
│ │ │ ├── TopViewController.swift
│ │ │ └── TopViewController.xib
│ │ ├── Example-macOS
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ ├── Base.lproj
│ │ │ │ └── Main.storyboard
│ │ │ ├── Example_macOS.entitlements
│ │ │ ├── Info.plist
│ │ │ ├── LabelItem.swift
│ │ │ └── MountainsViewController.swift
│ │ ├── MountainsRawData.swift
│ │ └── README.md
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── LICENSE
│ ├── Makefile
│ ├── Package.resolved
│ ├── Package.swift
│ ├── README.md
│ ├── Sources
│ │ ├── AppKit
│ │ │ └── CocoaCollectionViewDiffableDataSource.swift
│ │ ├── DiffableDataSourceSnapshot.swift
│ │ ├── Info.plist
│ │ ├── Internal
│ │ │ ├── DiffableDataSourceCore.swift
│ │ │ ├── HashableExtension.swift
│ │ │ ├── MainThreadSerialDispatcher.swift
│ │ │ ├── SnapshotStructure.swift
│ │ │ └── UniversalError.swift
│ │ └── UIKit
│ │ │ ├── CollectionViewDiffableDataSource.swift
│ │ │ └── TableViewDiffableDataSource.swift
│ ├── Tests
│ │ ├── CocoaCollectionViewDiffableDataSourceTests.swift
│ │ ├── CollectionViewDiffableDataSourceTests.swift
│ │ ├── DiffableDataSourceTests.swift
│ │ ├── Info.plist
│ │ ├── MainThreadSerialDispatcherTests.swift
│ │ └── TableViewDiffableDataSourceTests.swift
│ ├── XCConfigs
│ │ └── DiffableDataSources.xcconfig
│ ├── assets
│ │ ├── insertion_sort.gif
│ │ └── mountains.gif
│ ├── azure-pipelines.yml
│ └── docs
│ │ ├── Classes
│ │ ├── CollectionViewDiffableDataSource.html
│ │ └── TableViewDiffableDataSource.html
│ │ ├── DataSources.html
│ │ ├── Snapshot.html
│ │ ├── Structs
│ │ └── DiffableDataSourceSnapshot.html
│ │ ├── badge.svg
│ │ ├── css
│ │ ├── highlight.css
│ │ └── jazzy.css
│ │ ├── img
│ │ ├── carat.png
│ │ ├── dash.png
│ │ ├── gh.png
│ │ └── spinner.gif
│ │ ├── index.html
│ │ ├── js
│ │ ├── jazzy.js
│ │ ├── jazzy.search.js
│ │ ├── jquery.min.js
│ │ ├── lunr.min.js
│ │ └── typeahead.jquery.js
│ │ └── search.json
│ └── DifferenceKit
│ ├── .github
│ ├── ISSUE_TEMPLATE
│ │ ├── BUG_REPORT.md
│ │ ├── FEATURE_REQUEST.md
│ │ └── QUESTION.md
│ └── PULL_REQUEST_TEMPLATE.md
│ ├── .gitignore
│ ├── .hound.yml
│ ├── .jazzy.yaml
│ ├── .swift-version
│ ├── .swiftlint.yml
│ ├── Benchmark
│ ├── Benchmark.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Benchmark.xcscheme
│ ├── Benchmark.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── Makefile
│ ├── Podfile
│ ├── Podfile.lock
│ ├── README.md
│ └── Sources
│ │ ├── BenchmarkTools.swift
│ │ ├── Info.plist
│ │ └── main.swift
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── DifferenceKit.playground
│ ├── Contents.swift
│ ├── Sources
│ │ └── TableViewController.swift
│ └── contents.xcplayground
│ ├── DifferenceKit.podspec
│ ├── DifferenceKit.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── DifferenceKit.xcscheme
│ ├── DifferenceKit.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ ├── Examples
│ ├── Example-iOS
│ │ ├── Example-iOS.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── Sources
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ │ ├── Base.lproj
│ │ │ └── LaunchScreen.storyboard
│ │ │ ├── Common
│ │ │ ├── NibLoadable.swift
│ │ │ ├── Reusable.swift
│ │ │ ├── ReusableViewExtensions.swift
│ │ │ └── StringExtensions.swift
│ │ │ ├── HeaderFooter
│ │ │ ├── HeaderFooterCell.swift
│ │ │ ├── HeaderFooterMoreView.swift
│ │ │ ├── HeaderFooterMoreView.xib
│ │ │ ├── HeaderFooterSectionModel.swift
│ │ │ └── HeaderFooterViewController.swift
│ │ │ ├── Home
│ │ │ ├── HomeCell.swift
│ │ │ ├── HomeCell.xib
│ │ │ └── HomeViewController.swift
│ │ │ ├── Info.plist
│ │ │ ├── Random
│ │ │ ├── RandomLabelView.swift
│ │ │ ├── RandomLabelView.xib
│ │ │ ├── RandomModel.swift
│ │ │ ├── RandomPlainCell.swift
│ │ │ ├── RandomViewController.swift
│ │ │ └── RandomViewController.xib
│ │ │ └── ShuffleEmoticon
│ │ │ ├── EmojiCell.swift
│ │ │ ├── EmojiCell.xib
│ │ │ ├── EmojiViewController.swift
│ │ │ └── EmojiViewController.xib
│ ├── Example-macOS
│ │ ├── Example-macOS.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── Sources
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ │ ├── Base.lproj
│ │ │ └── MainMenu.xib
│ │ │ ├── Info.plist
│ │ │ ├── ShuffleEmoticonCollectionViewItem.swift
│ │ │ ├── ShuffleEmoticonViewController.swift
│ │ │ └── StringExtensions.swift
│ └── Example-tvOS
│ │ ├── Example-tvOS.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── Sources
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── App Icon & Top Shelf Image.brandassets
│ │ │ ├── App Icon - App Store.imagestack
│ │ │ │ ├── Back.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Front.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Middle.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ ├── App Icon.imagestack
│ │ │ │ ├── Back.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Front.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Middle.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── Top Shelf Image Wide.imageset
│ │ │ │ └── Contents.json
│ │ │ └── Top Shelf Image.imageset
│ │ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── EmojiCell.swift
│ │ ├── EmojiCell.xib
│ │ ├── EmojiViewController.swift
│ │ ├── EmojiViewController.xib
│ │ ├── Info.plist
│ │ ├── NibLoadable.swift
│ │ ├── Reusable.swift
│ │ ├── ReusableViewExtensions.swift
│ │ └── StringExtensions.swift
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── LICENSE
│ ├── LinuxMain.swift
│ ├── Makefile
│ ├── Package.swift
│ ├── Package@swift-4.2.swift
│ ├── README.md
│ ├── Sources
│ ├── Algorithm.swift
│ ├── AnyDifferentiable.swift
│ ├── ArraySection.swift
│ ├── Changeset.swift
│ ├── ContentEquatable.swift
│ ├── Differentiable.swift
│ ├── DifferentiableSection.swift
│ ├── ElementPath.swift
│ ├── Extensions
│ │ ├── AppKitExtension.swift
│ │ └── UIKitExtension.swift
│ ├── Info.plist
│ └── StagedChangeset.swift
│ ├── Tests
│ ├── AlgorithmTest.swift
│ ├── AnyDifferentiableTest.swift
│ ├── ArraySectionTest.swift
│ ├── ChangesetTest.swift
│ ├── ContentEquatableTest.swift
│ ├── ElementPathTest.swift
│ ├── Info.plist
│ ├── MeasurementTest.swift
│ ├── StagedChangesetTest.swift
│ ├── TestTools.swift
│ └── XCTestManifests.swift
│ ├── XCConfigs
│ └── DifferenceKit.xcconfig
│ ├── assets
│ ├── logo.png
│ └── sample.gif
│ ├── azure-pipelines.yml
│ ├── docs
│ ├── Changeset.html
│ ├── Diffing.html
│ ├── Extensions
│ │ ├── Optional.html
│ │ ├── UICollectionView.html
│ │ └── UITableView.html
│ ├── Protocols
│ │ ├── ContentEquatable.html
│ │ ├── Differentiable.html
│ │ └── DifferentiableSection.html
│ ├── Structs
│ │ ├── AnyDifferentiable.html
│ │ ├── ArraySection.html
│ │ ├── Changeset.html
│ │ ├── ElementPath.html
│ │ └── StagedChangeset.html
│ ├── UI Extensions.html
│ ├── badge.svg
│ ├── css
│ │ ├── highlight.css
│ │ └── jazzy.css
│ ├── img
│ │ ├── carat.png
│ │ ├── dash.png
│ │ ├── gh.png
│ │ └── spinner.gif
│ ├── index.html
│ ├── js
│ │ ├── jazzy.js
│ │ ├── jazzy.search.js
│ │ ├── jquery.min.js
│ │ ├── lunr.min.js
│ │ └── typeahead.jquery.js
│ └── search.json
│ └── test-linux.sh
├── Configurations
├── HostApp-Debug.xcconfig
├── HostApp-Release.xcconfig
├── HostApp-Shared.xcconfig
├── IBPCollectionViewCompositionalLayout.xcconfig
├── IBPCollectionViewCompositionalLayoutTests.xcconfig
├── Project-Debug.xcconfig
├── Project-Release.xcconfig
└── Project-Shared.xcconfig
├── Example
├── Example.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Example.xcscheme
└── Example
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── cat.imageset
│ │ ├── Contents.json
│ │ └── cat.jpg
│ ├── chevron.left.imageset
│ │ ├── Contents.json
│ │ └── chevron.left.pdf
│ └── chevron.right.imageset
│ │ ├── Contents.json
│ │ └── chevron.right.pdf
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Configurations
│ ├── Example.xcconfig
│ ├── Project-Debug.xcconfig
│ ├── Project-Release.xcconfig
│ └── Project-Shared.xcconfig
│ ├── DiffableDataSourceInteroperability.swift
│ ├── IBPCollectionViewCompositionalLayoutInteroperability.swift
│ ├── Info.plist
│ ├── Samples from Apple
│ ├── Advanced Layouts View Controllers
│ │ ├── NestedGroupsViewController.swift
│ │ ├── OrthogonalScrollBehaviorViewController.swift
│ │ └── OrthogonalScrollingViewController.swift
│ ├── App Samples View Controllers
│ │ ├── ConferenceNewsFeedViewController.swift
│ │ └── ConferenceVideoSessionsViewController.swift
│ ├── Basics View Controllers
│ │ ├── AdaptiveSectionsViewController.swift
│ │ ├── DistinctSectionsViewController.swift
│ │ ├── GridViewController.swift
│ │ ├── InsetItemsGridViewController.swift
│ │ ├── ItemBadgeSupplementaryViewController.swift
│ │ ├── ListViewController.swift
│ │ ├── PinnedSectionHeaderFooterViewController.swift
│ │ ├── SectionDecorationViewController.swift
│ │ ├── SectionHeadersFootersViewController.swift
│ │ └── TwoColumnViewController.swift
│ ├── Cells and Supplementary Views
│ │ ├── BadgeSupplementrayView.swift
│ │ ├── ConferenceNewsFeedCell.swift
│ │ ├── ConferenceVideoCell.swift
│ │ ├── ListCell.swift
│ │ ├── SectionBackgroundDecorationView.swift
│ │ ├── TextCell.swift
│ │ └── TitleSupplementaryView.swift
│ ├── Controllers
│ │ ├── ConferenceNewsController.swift
│ │ └── ConferenceVideoController.swift
│ ├── Diffable
│ │ ├── Cells And Supplementary Views
│ │ │ └── LabelCell.swift
│ │ ├── InsertionSortViewController.swift
│ │ ├── MountainsController.swift
│ │ ├── MountainsRawData.swift
│ │ └── MountainsViewController.swift
│ └── InsertionSortArray.swift
│ ├── Samples from IceFloe:UICollectionViewCompositionalLayout
│ ├── Cells
│ │ ├── ListCell2.swift
│ │ └── ListCell2.xib
│ ├── ViewControllers
│ │ ├── BackgroundViewController.swift
│ │ ├── CheckmarkGridViewController.swift
│ │ ├── ComplexGroupViewController.swift
│ │ ├── EdgedListViewController.swift
│ │ ├── EstimatedGridViewController.swift
│ │ ├── EstimatedListViewController.swift
│ │ ├── HeaderFooterViewController.swift
│ │ ├── ListViewController2.swift
│ │ └── OrthoViewController.swift
│ └── Views
│ │ ├── BackgroundView.swift
│ │ ├── CheckmarkView.swift
│ │ ├── CheckmarkView.xib
│ │ ├── TitleView.swift
│ │ └── TitleView.xib
│ ├── Samples from jVirus:compositional-layouts-kit
│ ├── Cells
│ │ ├── ImageCell.swift
│ │ └── OutlineItemCell.swift
│ ├── Compositional Layouts VCs
│ │ ├── BannerTileGridViewController.swift
│ │ ├── GalleryViewController.swift
│ │ ├── GroupGridViewController.swift
│ │ ├── MosaicReduxViewController.swift
│ │ ├── MosaicViewController.swift
│ │ ├── PortraitTileGridViewController.swift
│ │ ├── ShowcaseGalleryViewController.swift
│ │ ├── TileGalleryViewController.swift
│ │ ├── TileGridViewController.swift
│ │ └── WaterfallViewController.swift
│ ├── Factories
│ │ └── ImageFactory.swift
│ ├── Models
│ │ └── ImageModel.swift
│ └── Protocols
│ │ ├── Configurable.swift
│ │ └── ReuseIdentifiable.swift
│ ├── UIKitInteroperability.swift
│ └── ViewController.swift
├── HostApp
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
├── Base.lproj
│ └── LaunchScreen.storyboard
└── Info.plist
├── IBPCollectionViewCompositionalLayout.podspec
├── IBPCollectionViewCompositionalLayout.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── xcshareddata
│ └── xcschemes
│ ├── HostApp.xcscheme
│ └── IBPCollectionViewCompositionalLayout.xcscheme
├── IBPCollectionViewCompositionalLayout.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── IBPCollectionViewCompositionalLayoutInteroperability.swift
├── LICENSE
├── Package.swift
├── README.md
├── Sources
├── IBPCollectionViewCompositionalLayout
│ ├── IBPCollectionCompositionalLayoutSolver.h
│ ├── IBPCollectionCompositionalLayoutSolver.m
│ ├── IBPCollectionCompositionalLayoutSolverResult.h
│ ├── IBPCollectionCompositionalLayoutSolverResult.m
│ ├── IBPCollectionViewOrthogonalScrollerEmbeddedScrollView.h
│ ├── IBPCollectionViewOrthogonalScrollerEmbeddedScrollView.m
│ ├── IBPCollectionViewOrthogonalScrollerSectionController.h
│ ├── IBPCollectionViewOrthogonalScrollerSectionController.m
│ ├── IBPNSCollectionLayoutAnchor.m
│ ├── IBPNSCollectionLayoutAnchor_Private.h
│ ├── IBPNSCollectionLayoutBoundarySupplementaryItem.m
│ ├── IBPNSCollectionLayoutContainer.h
│ ├── IBPNSCollectionLayoutContainer.m
│ ├── IBPNSCollectionLayoutDecorationItem.m
│ ├── IBPNSCollectionLayoutDimension.m
│ ├── IBPNSCollectionLayoutEdgeSpacing.m
│ ├── IBPNSCollectionLayoutEdgeSpacing_Private.h
│ ├── IBPNSCollectionLayoutEnvironment.h
│ ├── IBPNSCollectionLayoutEnvironment.m
│ ├── IBPNSCollectionLayoutGroup.m
│ ├── IBPNSCollectionLayoutGroupCustomItem.m
│ ├── IBPNSCollectionLayoutGroup_Private.h
│ ├── IBPNSCollectionLayoutItem.m
│ ├── IBPNSCollectionLayoutItem_Private.h
│ ├── IBPNSCollectionLayoutSection.m
│ ├── IBPNSCollectionLayoutSection_Private.h
│ ├── IBPNSCollectionLayoutSize.m
│ ├── IBPNSCollectionLayoutSize_Private.h
│ ├── IBPNSCollectionLayoutSpacing.m
│ ├── IBPNSCollectionLayoutSpacing_Private.h
│ ├── IBPNSCollectionLayoutSupplementaryItem.m
│ ├── IBPNSCollectionLayoutSupplementaryItem_Private.h
│ ├── IBPNSDirectionalEdgeInsets.m
│ ├── IBPUICollectionViewCompositionalLayout.m
│ ├── IBPUICollectionViewCompositionalLayoutConfiguration.m
│ ├── IBPUICollectionViewCompositionalLayoutConfiguration_Private.h
│ └── include
│ │ ├── IBPCollectionViewCompositionalLayout.h
│ │ ├── IBPNSCollectionLayoutAnchor.h
│ │ ├── IBPNSCollectionLayoutBoundarySupplementaryItem.h
│ │ ├── IBPNSCollectionLayoutContainer_Protocol.h
│ │ ├── IBPNSCollectionLayoutDecorationItem.h
│ │ ├── IBPNSCollectionLayoutDimension.h
│ │ ├── IBPNSCollectionLayoutEdgeSpacing.h
│ │ ├── IBPNSCollectionLayoutEnvironment_Protocol.h
│ │ ├── IBPNSCollectionLayoutForwardCompatibility.h
│ │ ├── IBPNSCollectionLayoutGroup.h
│ │ ├── IBPNSCollectionLayoutGroupCustomItem.h
│ │ ├── IBPNSCollectionLayoutItem.h
│ │ ├── IBPNSCollectionLayoutSection.h
│ │ ├── IBPNSCollectionLayoutSize.h
│ │ ├── IBPNSCollectionLayoutSpacing.h
│ │ ├── IBPNSCollectionLayoutSupplementaryItem.h
│ │ ├── IBPNSCollectionLayoutVisibleItem.h
│ │ ├── IBPNSDirectionalEdgeInsets.h
│ │ ├── IBPNSDirectionalRectEdge.h
│ │ ├── IBPNSRectAlignment.h
│ │ ├── IBPUICollectionLayoutSectionOrthogonalScrollingBehavior.h
│ │ ├── IBPUICollectionViewCompositionalLayout.h
│ │ ├── IBPUICollectionViewCompositionalLayoutConfiguration.h
│ │ └── module.modulemap
└── Info.plist
├── Tests
├── IBPCollectionViewCompositionalLayoutTests
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── chevron.left.imageset
│ │ │ ├── Contents.json
│ │ │ └── chevron.left.pdf
│ │ └── chevron.right.imageset
│ │ │ ├── Contents.json
│ │ │ └── chevron.right.pdf
│ ├── DiffableDataSourceInteroperability.swift
│ ├── IBPCollectionViewCompositionalLayoutInteroperability.swift
│ ├── ListViewTests.swift
│ └── UIKitInteroperability.swift
└── Info.plist
└── azure-pipelines.yml
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 | on:
3 | push:
4 | branches:
5 | - master
6 | pull_request:
7 | jobs:
8 | build:
9 | runs-on: macOS-10.14
10 | steps:
11 | - uses: actions/checkout@v1
12 | - name: Build
13 | run: |
14 | set -ex
15 | carthage build --no-skip-current --platform ios
16 |
--------------------------------------------------------------------------------
/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Cartfile.private:
--------------------------------------------------------------------------------
1 | github "ra1028/DiffableDataSources"
2 |
--------------------------------------------------------------------------------
/Cartfile.resolved:
--------------------------------------------------------------------------------
1 | github "ra1028/DiffableDataSources" "0.2.0"
2 | github "ra1028/DifferenceKit" "1.1.3"
3 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/.github/ISSUE_TEMPLATE/BUG_REPORT.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug Report
3 | about: Create a bug report.
4 | ---
5 |
6 | ## Checklist
7 | - [ ] This is not a Apple's bug.
8 | - [ ] Reviewed the README and documents.
9 | - [ ] Searched existing issues for ensure not duplicated.
10 |
11 | ## Expected Behavior
12 |
13 |
14 | ## Current Behavior
15 |
16 |
17 | ## Steps to Reproduce
18 |
19 |
20 | 1.
21 | 2.
22 | 3.
23 | 4.
24 |
25 | ## Detailed Description (Include Screenshots)
26 |
27 |
28 | ## Reproducible Demo Project
29 |
30 |
31 | ## Environments
32 | - version:
33 |
34 | - Swift version:
35 |
36 | - iOS version:
37 |
38 | - Xcode version:
39 |
40 | - Devices/Simulators:
41 |
42 | - CocoaPods/Carthage version:
43 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature Request
3 | about: Create a feature request.
4 | ---
5 |
6 | ## Checklist
7 | - [ ] Reviewed the README and documents.
8 | - [ ] Searched existing issues for ensure not duplicated.
9 |
10 | ## Description
11 |
12 |
13 | ## Motivation and Context
14 |
15 |
16 |
17 | ## Proposed Solution
18 |
19 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/.github/ISSUE_TEMPLATE/QUESTION.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: Create a bug question.
4 | ---
5 |
6 | ## Checklist
7 | - [ ] Reviewed the README and documents.
8 | - [ ] Searched existing issues for ensure not duplicated.
9 |
10 | ## Expected Behavior
11 |
12 |
13 | ## Current Behavior
14 |
15 |
16 | ## Detailed Description (Include Screenshots)
17 |
18 |
19 | ## Environment
20 | - version:
21 |
22 | - Swift version:
23 |
24 | - iOS version:
25 |
26 | - Xcode version:
27 |
28 | - Devices/Simulators:
29 |
30 | - CocoaPods/Carthage version:
31 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Checklist
2 | - [ ] All tests are passed.
3 | - [ ] Added tests.
4 | - [ ] Documented the code using [Xcode markup](https://developer.apple.com/library/mac/documentation/Xcode/Reference/xcode_markup_formatting_ref).
5 | - [ ] Searched existing pull requests for ensure not duplicated.
6 |
7 | ## Description
8 |
9 |
10 | ## Related Issue
11 |
12 |
13 |
14 |
15 |
16 | ## Motivation and Context
17 |
18 |
19 |
20 | ## Impact on Existing Code
21 |
22 |
23 | ## Screenshots (if appropriate)
24 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | */build/*
3 | *.pbxuser
4 | !default.pbxuser
5 | *.mode1v3
6 | !default.mode1v3
7 | *.mode2v3
8 | !default.mode2v3
9 | *.perspectivev3
10 | !default.perspectivev3
11 | xcuserdata
12 | xcbaselines
13 | profile
14 | *.moved-aside
15 | DerivedData
16 | .idea/
17 | *.hmap
18 | *.xccheckout
19 | *.xcuserstate
20 | build/
21 |
22 | ## Documentation
23 | docs/docsets/
24 | docs/undocumented.json
25 |
26 | ## Gems
27 | .bundle
28 | vendor
29 |
30 | ## CocoaPods
31 | Pods
32 |
33 | ## Carthage
34 | Carthage/*
35 | !Carthage/Checkouts
36 |
37 | ## Swift Package Manager
38 | .build
39 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "Carthage/Checkouts/DifferenceKit"]
2 | path = Carthage/Checkouts/DifferenceKit
3 | url = https://github.com/ra1028/DifferenceKit.git
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/.jazzy.yml:
--------------------------------------------------------------------------------
1 | # https://github.com/realm/jazzy
2 |
3 | author: Ryo Aoyama
4 | author_url: https://github.com/ra1028
5 | github_url: https://github.com/ra1028/DiffableDataSources
6 | module: DiffableDataSources
7 | readme: README.md
8 | output: docs
9 | theme: fullwidth
10 | clean: true
11 | skip_undocumented: true
12 | xcodebuild_arguments:
13 | - -workspace
14 | - DiffableDataSources.xcworkspace
15 | - -scheme
16 | - DiffableDataSources
17 | - -sdk
18 | - iphonesimulator
19 |
20 | exclude:
21 | - Sources/AppKit/CocoaCollectionViewDiffableDataSource.swift
22 |
23 | custom_categories:
24 | - name: DataSources
25 | children:
26 | - TableViewDiffableDataSource
27 | - CollectionViewDiffableDataSource
28 | - name: Snapshot
29 | children:
30 | - DiffableDataSourceSnapshot
31 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/.swift-version:
--------------------------------------------------------------------------------
1 | 5.0
2 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/.swiftlint.yml:
--------------------------------------------------------------------------------
1 | # https://github.com/realm/SwiftLint
2 |
3 | excluded:
4 | - .build
5 | - Carthage
6 | - Examples
7 |
8 | disabled_rules:
9 | - type_name
10 | - identifier_name
11 | - generic_type_name
12 | - force_cast
13 |
14 | nesting:
15 | type_level:
16 | warning: 2
17 |
18 | line_length:
19 | warning: 200
20 |
21 | file_length:
22 | warning: 600
23 |
24 | type_body_length:
25 | warning: 400
26 |
27 | function_body_length:
28 | warning: 50
29 |
30 | cyclomatic_complexity:
31 | warning: 12
32 |
33 | statement_position:
34 | statement_mode: uncuddled_else
35 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Cartfile:
--------------------------------------------------------------------------------
1 | github "ra1028/DifferenceKit" ~> 1.1
2 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Cartfile.resolved:
--------------------------------------------------------------------------------
1 | github "ra1028/DifferenceKit" "1.1.3"
2 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/.github/ISSUE_TEMPLATE/BUG_REPORT.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug Report
3 | about: Create a bug report.
4 | ---
5 |
6 | ## Checklist
7 | - [ ] This is not a Apple's bug.
8 | - [ ] Reviewed the [README](https://github.com/ra1028/DifferenceKit/blob/master/README.md) and [documents](https://ra1028.github.io/DifferenceKit).
9 | - [ ] Searched [existing issues](https://github.com/ra1028/DifferenceKit/issues) for ensure not duplicated.
10 |
11 | ## Expected Behavior
12 |
13 |
14 | ## Current Behavior
15 |
16 |
17 | ## Steps to Reproduce
18 |
19 |
20 | 1.
21 | 2.
22 | 3.
23 | 4.
24 |
25 | ## Detailed Description (Include Screenshots)
26 |
27 |
28 | ## Reproducible Demo Project
29 |
30 |
31 | ## Environments
32 | - Library version:
33 |
34 | - Swift version:
35 |
36 | - iOS version:
37 |
38 | - Xcode version:
39 |
40 | - Devices/Simulators:
41 |
42 | - CocoaPods/Carthage version:
43 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature Request
3 | about: Create a feature request.
4 | ---
5 |
6 | ## Checklist
7 | - [ ] Reviewed the [README](https://github.com/ra1028/DifferenceKit/blob/master/README.md) and [documents](https://ra1028.github.io/DifferenceKit).
8 | - [ ] Searched [existing issues](https://github.com/ra1028/DifferenceKit/issues) for ensure not duplicated.
9 |
10 | ## Description
11 |
12 |
13 | ## Motivation and Context
14 |
15 |
16 |
17 | ## Proposed Solution
18 |
19 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/.github/ISSUE_TEMPLATE/QUESTION.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: Create a bug question.
4 | ---
5 |
6 | ## Checklist
7 | - [ ] Reviewed the [README](https://github.com/ra1028/DifferenceKit/blob/master/README.md) and [documents](https://ra1028.github.io/DifferenceKit).
8 | - [ ] Searched [existing issues](https://github.com/ra1028/DifferenceKit/issues) for ensure not duplicated.
9 |
10 | ## Expected Behavior
11 |
12 |
13 | ## Current Behavior
14 |
15 |
16 | ## Detailed Description (Include Screenshots)
17 |
18 |
19 | ## Environment
20 | - Library version:
21 |
22 | - Swift version:
23 |
24 | - iOS version:
25 |
26 | - Xcode version:
27 |
28 | - Devices/Simulators:
29 |
30 | - CocoaPods/Carthage version:
31 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Checklist
2 | - [ ] All tests are passed.
3 | - [ ] Added tests.
4 | - [ ] Documented the code using [Xcode markup](https://developer.apple.com/library/mac/documentation/Xcode/Reference/xcode_markup_formatting_ref).
5 | - [ ] Searched [existing pull requests](https://github.com/ra1028/DifferenceKit/pulls) for ensure not duplicated.
6 |
7 | ## Description
8 |
9 |
10 | ## Related Issue
11 |
12 |
13 |
14 |
15 |
16 | ## Motivation and Context
17 |
18 |
19 |
20 | ## Impact on Existing Code
21 |
22 |
23 | ## Screenshots (if appropriate)
24 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | */build/*
3 | *.pbxuser
4 | !default.pbxuser
5 | *.mode1v3
6 | !default.mode1v3
7 | *.mode2v3
8 | !default.mode2v3
9 | *.perspectivev3
10 | !default.perspectivev3
11 | xcuserdata
12 | xcbaselines
13 | profile
14 | *.moved-aside
15 | DerivedData
16 | .idea/
17 | *.hmap
18 | *.xccheckout
19 | *.xcuserstate
20 | build/
21 |
22 | ## Documentation
23 | docs/docsets/
24 | docs/undocumented.json
25 |
26 | ## Gems
27 | .bundle
28 | vendor
29 |
30 | ## CocoaPods
31 | Pods
32 |
33 | ## Swift Package build
34 | .build
35 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/.hound.yml:
--------------------------------------------------------------------------------
1 | swiftlint:
2 | config_file: .swiftlint.yml
3 |
4 | ruby:
5 | enabled: false
6 |
7 | javascript:
8 | enabled: false
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/.jazzy.yaml:
--------------------------------------------------------------------------------
1 | author: Ryo Aoyama
2 | author_url: https://github.com/ra1028
3 | github_url: https://github.com/ra1028/DifferenceKit
4 | module: DifferenceKit
5 | readme: README.md
6 | exclude: Sources/Extensions/AppKitExtension.swift
7 | output: docs
8 | theme: fullwidth
9 | clean: true
10 | skip_undocumented: true
11 | xcodebuild_arguments:
12 | - -sdk
13 | - iphonesimulator
14 | - -scheme
15 | - DifferenceKit
16 | custom_categories:
17 | - name: Diffing
18 | children:
19 | - ContentEquatable
20 | - Differentiable
21 | - DifferentiableSection
22 | - AnyDifferentiable
23 | - ArraySection
24 | - ElementPath
25 | - Optional
26 | - name: Changeset
27 | children:
28 | - StagedChangeset
29 | - Changeset
30 | - name: UI Extensions
31 | children:
32 | - UITableView
33 | - UICollectionView
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/.swift-version:
--------------------------------------------------------------------------------
1 | 4.2
2 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/.swiftlint.yml:
--------------------------------------------------------------------------------
1 | # https://github.com/realm/SwiftLint
2 |
3 | excluded:
4 | - Tests/XCTestManifests.swift
5 | - Benchmark
6 |
7 | disabled_rules:
8 | - type_name
9 | - identifier_name
10 | - force_cast
11 | - xctfail_message
12 | - function_body_length
13 | - file_length
14 |
15 | nesting:
16 | type_level:
17 | warning: 2
18 |
19 | line_length:
20 | warning: 200
21 |
22 | type_body_length:
23 | warning: 400
24 |
25 | function_parameter_count:
26 | warning: 8
27 |
28 | cyclomatic_complexity:
29 | warning: 12
30 |
31 | statement_position:
32 | statement_mode: uncuddled_else
33 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem 'cocoapods', '1.7.0.rc.1'
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Makefile:
--------------------------------------------------------------------------------
1 | pods-install:
2 | bundle exec pod install || bundle exec pod install --repo-update
3 |
4 | gems-install:
5 | bundle check || bundle install --path vendor/bundle --clean --jobs=4
6 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '12.2'
2 |
3 | use_frameworks!
4 | inhibit_all_warnings!
5 |
6 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
7 |
8 | target 'Benchmark' do
9 | pod 'DifferenceKit', path: '../'
10 | pod 'Differentiator', '4.0.1'
11 | pod 'FlexibleDiff', '0.0.8'
12 | pod 'IGListKit', '3.4.0'
13 | pod 'DeepDiff', '2.0.1'
14 | pod 'Differ', '1.4.1'
15 | pod 'Dwifft', '0.9'
16 | end
17 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/README.md:
--------------------------------------------------------------------------------
1 | # How to Run
2 |
3 | 1. Change directory from the root of repository `cd ./Benchmark`
4 | 1. Install gems by Bundler `make gems-install`
5 | 1. Install dependencies by CocoaPods `make pods-install`
6 | 1. Open `Benchmark.xcworkspace` on Xcode
7 | 1. Run `Benchmark` scheme
8 | 1. See the benchmark result on the Xcode console
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Benchmark/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIRequiredDeviceCapabilities
24 |
25 | armv7
26 |
27 | UISupportedInterfaceOrientations
28 |
29 | UISupportedInterfaceOrientations~ipad
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationPortraitUpsideDown
33 | UIInterfaceOrientationLandscapeLeft
34 | UIInterfaceOrientationLandscapeRight
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/DifferenceKit.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/DifferenceKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/DifferenceKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/DifferenceKit.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/DifferenceKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Example-iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Example-iOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | final class AppDelegate: UIResponder, UIApplicationDelegate {
5 | var window: UIWindow?
6 |
7 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
8 | configureUIAppearance()
9 |
10 | let window = UIWindow()
11 | let navigationController = UINavigationController(rootViewController: HomeViewController())
12 | window.rootViewController = navigationController
13 | window.makeKeyAndVisible()
14 | self.window = window
15 | return true
16 | }
17 |
18 | func configureUIAppearance() {
19 | let appearance = UINavigationBar.appearance()
20 | let titleTextAttributes: [NSAttributedString.Key: Any] = [
21 | .foregroundColor: UIColor.black
22 | ]
23 |
24 | appearance.tintColor = .darkText
25 | appearance.prefersLargeTitles = true
26 | appearance.titleTextAttributes = titleTextAttributes
27 | appearance.largeTitleTextAttributes = titleTextAttributes
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Common/NibLoadable.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol NibLoadable: class {
4 | static var nibName: String { get }
5 | static var nibBundle: Bundle? { get }
6 | }
7 |
8 | extension NibLoadable {
9 | static var nib: UINib {
10 | return UINib(nibName: nibName, bundle: nibBundle)
11 | }
12 |
13 | static var nibName: String {
14 | return String(describing: self)
15 | }
16 |
17 | static var nibBundle: Bundle? {
18 | return Bundle(for: self)
19 | }
20 | }
21 |
22 | extension NibLoadable where Self: UIView {
23 | static func loadFromNib() -> Self {
24 | return nib.instantiate(withOwner: nil, options: nil).first as! Self
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Common/Reusable.swift:
--------------------------------------------------------------------------------
1 | protocol Reusable: class {
2 | static var reuseIdentifier: String { get }
3 | }
4 |
5 | extension Reusable {
6 | static var reuseIdentifier: String {
7 | return String(reflecting: self)
8 | }
9 | }
10 |
11 | typealias NibReusable = NibLoadable & Reusable
12 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Common/StringExtensions.swift:
--------------------------------------------------------------------------------
1 | import DifferenceKit
2 |
3 | extension String: Differentiable {}
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/HeaderFooter/HeaderFooterCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class HeaderFooterPlainCell: UITableViewCell, Reusable {}
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/HeaderFooter/HeaderFooterMoreView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class HeaderFooterMoreView: UITableViewHeaderFooterView, NibReusable {
4 | var onMorePressed: (() -> Void)?
5 |
6 | @IBAction func handleMorePressed() {
7 | onMorePressed?()
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/HeaderFooter/HeaderFooterSectionModel.swift:
--------------------------------------------------------------------------------
1 | import DifferenceKit
2 |
3 | struct HeaderFooterSectionModel: Differentiable, Equatable {
4 | var id: Int
5 | var hasFooter: Bool
6 |
7 | var differenceIdentifier: Int {
8 | return id
9 | }
10 |
11 | var headerTitle: String {
12 | return "Section \(id)"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Home/HomeCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class HomeCell: UITableViewCell, NibReusable {
4 | @IBOutlet weak var titleLabel: UILabel!
5 | @IBOutlet weak var subtitleLabel: UILabel!
6 | }
7 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Random/RandomLabelView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class RandomLabelView: UICollectionReusableView, NibReusable {
4 | @IBOutlet weak var label: UILabel!
5 | }
6 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Random/RandomModel.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import DifferenceKit
3 |
4 | struct RandomModel: Differentiable {
5 | var id: UUID
6 | var isUpdated: Bool
7 |
8 | var differenceIdentifier: UUID {
9 | return id
10 | }
11 |
12 | init(_ id: UUID = UUID(), _ isUpdated: Bool = false) {
13 | self.id = id
14 | self.isUpdated = isUpdated
15 | }
16 |
17 | func isContentEqual(to source: RandomModel) -> Bool {
18 | return isUpdated == source.isUpdated
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Random/RandomPlainCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class RandomPlainCell: UICollectionViewCell, Reusable {
4 | override func layoutSubviews() {
5 | super.layoutSubviews()
6 |
7 | layer.masksToBounds = true
8 | layer.cornerRadius = bounds.height / 2
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/ShuffleEmoticon/EmojiCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class EmojiCell: UICollectionViewCell, NibReusable {
4 | @IBOutlet weak var label: UILabel!
5 |
6 | override func awakeFromNib() {
7 | super.awakeFromNib()
8 |
9 | label.layer.cornerRadius = 8
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Example-macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Example-macOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 |
3 | @NSApplicationMain
4 | final class AppDelegate: NSObject, NSApplicationDelegate {
5 | @IBOutlet weak var window: NSWindow!
6 | }
7 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSMainNibFile
26 | MainMenu
27 | NSPrincipalClass
28 | NSApplication
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/StringExtensions.swift:
--------------------------------------------------------------------------------
1 | import DifferenceKit
2 |
3 | extension String: Differentiable { }
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Example-tvOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Example-tvOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | final class AppDelegate: UIResponder, UIApplicationDelegate {
5 | var window: UIWindow?
6 |
7 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
8 | let window = UIWindow()
9 | let navigationController = UINavigationController(rootViewController: EmojiViewController())
10 | window.rootViewController = navigationController
11 | window.makeKeyAndVisible()
12 | self.window = window
13 | return true
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv"
5 | }
6 | ],
7 | "info" : {
8 | "version" : 1,
9 | "author" : "xcode"
10 | }
11 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "layers" : [
3 | {
4 | "filename" : "Front.imagestacklayer"
5 | },
6 | {
7 | "filename" : "Middle.imagestacklayer"
8 | },
9 | {
10 | "filename" : "Back.imagestacklayer"
11 | }
12 | ],
13 | "info" : {
14 | "version" : 1,
15 | "author" : "xcode"
16 | }
17 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv"
5 | }
6 | ],
7 | "info" : {
8 | "version" : 1,
9 | "author" : "xcode"
10 | }
11 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv"
5 | }
6 | ],
7 | "info" : {
8 | "version" : 1,
9 | "author" : "xcode"
10 | }
11 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "layers" : [
3 | {
4 | "filename" : "Front.imagestacklayer"
5 | },
6 | {
7 | "filename" : "Middle.imagestacklayer"
8 | },
9 | {
10 | "filename" : "Back.imagestacklayer"
11 | }
12 | ],
13 | "info" : {
14 | "version" : 1,
15 | "author" : "xcode"
16 | }
17 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "size" : "1280x768",
5 | "idiom" : "tv",
6 | "filename" : "App Icon - App Store.imagestack",
7 | "role" : "primary-app-icon"
8 | },
9 | {
10 | "size" : "400x240",
11 | "idiom" : "tv",
12 | "filename" : "App Icon.imagestack",
13 | "role" : "primary-app-icon"
14 | },
15 | {
16 | "size" : "2320x720",
17 | "idiom" : "tv",
18 | "filename" : "Top Shelf Image Wide.imageset",
19 | "role" : "top-shelf-image-wide"
20 | },
21 | {
22 | "size" : "1920x720",
23 | "idiom" : "tv",
24 | "filename" : "Top Shelf Image.imageset",
25 | "role" : "top-shelf-image"
26 | }
27 | ],
28 | "info" : {
29 | "version" : 1,
30 | "author" : "xcode"
31 | }
32 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/EmojiCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class EmojiCell: UICollectionViewCell, NibReusable {
4 | @IBOutlet weak var label: UILabel!
5 |
6 | override func awakeFromNib() {
7 | super.awakeFromNib()
8 |
9 | contentView.backgroundColor = UIColor(white: 0.95, alpha: 1)
10 | contentView.layer.cornerRadius = 8
11 | contentView.layer.shadowOffset = CGSize(width: 0, height: 7)
12 | }
13 |
14 | override var isHighlighted: Bool {
15 | didSet { alpha = isHidden ? 0.2 : 1 }
16 | }
17 |
18 | override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) {
19 | coordinator.addCoordinatedAnimations({ [weak self] in
20 | guard let self = self else { return }
21 | self.contentView.layer.shadowOpacity = self.isFocused ? 0.3 : 0
22 | self.contentView.layer.transform = self.isFocused ? CATransform3DMakeScale(1.1, 1.1, 1) : CATransform3DIdentity
23 | self.layer.zPosition = self.isFocused ? 1 : 0
24 | })
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | DifferenceKit-tvOS
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UIRequiredDeviceCapabilities
26 |
27 | arm64
28 |
29 | UIUserInterfaceStyle
30 | Automatic
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/NibLoadable.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol NibLoadable: class {
4 | static var nibName: String { get }
5 | static var nibBundle: Bundle? { get }
6 | }
7 |
8 | extension NibLoadable {
9 | static var nib: UINib {
10 | return UINib(nibName: nibName, bundle: nibBundle)
11 | }
12 |
13 | static var nibName: String {
14 | return String(describing: self)
15 | }
16 |
17 | static var nibBundle: Bundle? {
18 | return Bundle(for: self)
19 | }
20 | }
21 |
22 | extension NibLoadable where Self: UIView {
23 | static func loadFromNib() -> Self {
24 | return nib.instantiate(withOwner: nil, options: nil).first as! Self
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Reusable.swift:
--------------------------------------------------------------------------------
1 | protocol Reusable: class {
2 | static var reuseIdentifier: String { get }
3 | }
4 |
5 | extension Reusable {
6 | static var reuseIdentifier: String {
7 | return String(reflecting: self)
8 | }
9 | }
10 |
11 | typealias NibReusable = NibLoadable & Reusable
12 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/StringExtensions.swift:
--------------------------------------------------------------------------------
1 | import DifferenceKit
2 |
3 | extension String: Differentiable {}
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem 'cocoapods', '1.7.2'
4 | gem 'jazzy', '0.9.4'
5 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/LinuxMain.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | import DifferenceKitTests
4 |
5 | var tests = [XCTestCaseEntry]()
6 | tests += DifferenceKitTests.__allTests()
7 |
8 | XCTMain(tests)
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Makefile:
--------------------------------------------------------------------------------
1 | gems-install:
2 | bundle install --path vendor/bundle
3 |
4 | docs-gen:
5 | bundle exec jazzy --config .jazzy.yaml
6 |
7 | lib-lint:
8 | bundle exec pod lib lint
9 |
10 | pod-release:
11 | bundle exec pod trunk push --allow-warnings
12 |
13 | test-linux:
14 | sh test-linux.sh
15 |
16 | generate-linuxmain:
17 | swift test --generate-linuxmain
18 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.0
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "DifferenceKit",
7 | platforms: [
8 | .iOS(.v9), .macOS(.v10_10), .tvOS(.v9), .watchOS(.v2)
9 | ],
10 | products: [
11 | .library(name: "DifferenceKit", targets: ["DifferenceKit"])
12 | ],
13 | targets: [
14 | .target(
15 | name: "DifferenceKit",
16 | path: "Sources"
17 | ),
18 | .testTarget(
19 | name: "DifferenceKitTests",
20 | dependencies: ["DifferenceKit"],
21 | path: "Tests"
22 | )
23 | ],
24 | swiftLanguageVersions: [.v4_2, .v5]
25 | )
26 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Package@swift-4.2.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:4.2
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "DifferenceKit",
7 | products: [
8 | .library(name: "DifferenceKit", targets: ["DifferenceKit"])
9 | ],
10 | targets: [
11 | .target(
12 | name: "DifferenceKit",
13 | path: "Sources"
14 | ),
15 | .testTarget(
16 | name: "DifferenceKitTests",
17 | dependencies: ["DifferenceKit"],
18 | path: "Tests"
19 | )
20 | ],
21 | swiftLanguageVersions: [.v4_2]
22 | )
23 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Sources/Differentiable.swift:
--------------------------------------------------------------------------------
1 | /// Represents the value that identified for differentiate.
2 | public protocol Differentiable: ContentEquatable {
3 | /// A type representing the identifier.
4 | associatedtype DifferenceIdentifier: Hashable
5 |
6 | /// An identifier value for difference calculation.
7 | var differenceIdentifier: DifferenceIdentifier { get }
8 | }
9 |
10 | public extension Differentiable where Self: Hashable {
11 | /// The `self` value as an identifier for difference calculation.
12 | @inlinable
13 | var differenceIdentifier: Self {
14 | return self
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Sources/DifferentiableSection.swift:
--------------------------------------------------------------------------------
1 | /// Represents the section of collection that can be identified and compared to whether has updated.
2 | public protocol DifferentiableSection: Differentiable {
3 | /// A type representing the elements in section.
4 | associatedtype Collection: Swift.Collection where Collection.Element: Differentiable
5 |
6 | /// The collection of element in the section.
7 | var elements: Collection { get }
8 |
9 | /// Creates a new section reproducing the given source section with replacing the elements.
10 | ///
11 | /// - Parameters:
12 | /// - source: A source section to reproduce.
13 | /// - elements: The collection of elements for the new section.
14 | init(source: Self, elements: C) where C.Element == Collection.Element
15 | }
16 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Sources/ElementPath.swift:
--------------------------------------------------------------------------------
1 | /// Represents the path to a specific element in a tree of nested collections.
2 | ///
3 | /// - Note: `Foundation.IndexPath` is disadvantageous in performance.
4 | public struct ElementPath: Hashable {
5 | /// The element index (or offset) of this path.
6 | public var element: Int
7 | /// The section index (or offset) of this path.
8 | public var section: Int
9 |
10 | /// Creates a new `ElementPath`.
11 | ///
12 | /// - Parameters:
13 | /// - element: The element index (or offset).
14 | /// - section: The section index (or offset).
15 | @inlinable
16 | public init(element: Int, section: Int) {
17 | self.element = element
18 | self.section = section
19 | }
20 | }
21 |
22 | extension ElementPath: CustomDebugStringConvertible {
23 | public var debugDescription: String {
24 | return "[element: \(element), section: \(section)]"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Tests/ArraySectionTest.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import DifferenceKit
3 |
4 | final class ArraySectionTestCase: XCTestCase {
5 | func testReinitialize() {
6 | let s1 = ArraySection(model: D.a, elements: [0])
7 | let s2 = ArraySection(model: s1.model, elements: s1.elements)
8 |
9 | XCTAssertEqual(s1.model.differenceIdentifier, s2.model.differenceIdentifier)
10 | XCTAssertEqual(s1.model.differenceIdentifier.hashValue, s2.model.differenceIdentifier.hashValue)
11 | XCTAssertEqual(s1.elements, s2.elements)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Tests/ContentEquatableTest.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import DifferenceKit
3 |
4 | final class ContentEquatableTestCase: XCTestCase {
5 | func testEquatableValue() {
6 | let value1 = D.a
7 | let value2 = D.a
8 | let value3 = D.b
9 |
10 | XCTAssertEqual(value1, value2)
11 | XCTAssertTrue(value1.isContentEqual(to: value2))
12 |
13 | XCTAssertNotEqual(value1, value3)
14 | XCTAssertFalse(value1.isContentEqual(to: value3))
15 | }
16 |
17 | func testOptionalValue() {
18 | let value1: D? = .a
19 | let value2: D? = .a
20 | let value3: D? = .b
21 |
22 | XCTAssertTrue(value1.isContentEqual(to: value2))
23 | XCTAssertFalse(value1.isContentEqual(to: value3))
24 | XCTAssertFalse(value1.isContentEqual(to: nil))
25 | XCTAssertFalse(D?.none.isContentEqual(to: value1))
26 | XCTAssertTrue(D?.none.isContentEqual(to: nil))
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Tests/ElementPathTest.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import DifferenceKit
3 |
4 | final class ElementPathTestCase: XCTestCase {
5 | func testHashable() {
6 | let e1 = ElementPath(element: 0, section: 0)
7 | let e2 = ElementPath(element: 0, section: 0)
8 |
9 | XCTAssertEqual(e1, e2)
10 | XCTAssertEqual(e1.hashValue, e2.hashValue)
11 |
12 | let e3 = ElementPath(element: 0, section: 0)
13 | let e4 = ElementPath(element: 0, section: 1)
14 |
15 | XCTAssertNotEqual(e3, e4)
16 | XCTAssertNotEqual(e3.hashValue, e4.hashValue)
17 |
18 | let e5 = ElementPath(element: 0, section: 0)
19 | let e6 = ElementPath(element: 1, section: 1)
20 |
21 | XCTAssertNotEqual(e5, e6)
22 | XCTAssertNotEqual(e5.hashValue, e6.hashValue)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/Tests/StagedChangesetTest.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import DifferenceKit
3 |
4 | final class StagedChangesetTestCase: XCTestCase {
5 | func testEquatable() {
6 | let data = [0]
7 |
8 | let c1 = StagedChangeset<[Int]>()
9 | let c2 = StagedChangeset<[Int]>()
10 |
11 | // Should be equal if both are empty
12 | XCTAssertEqual(c1, c2)
13 |
14 | let c3 = StagedChangeset([
15 | Changeset(data: data, sectionDeleted: [2, 0, 1])
16 | ])
17 |
18 | let c4 = StagedChangeset([
19 | Changeset(data: data, sectionDeleted: [0, 1, 2])
20 | ])
21 |
22 | // Should be equal ignoring the order of each inner changes
23 | XCTAssertEqual(c3, c4)
24 |
25 | let c5 = StagedChangeset([
26 | Changeset(data: data, sectionDeleted: [0, 1, 2]),
27 | Changeset(data: data, sectionInserted: [3, 4, 5])
28 | ])
29 |
30 | let c6 = StagedChangeset([
31 | Changeset(data: data, sectionInserted: [3, 4, 5]),
32 | Changeset(data: data, sectionDeleted: [0, 1, 2])
33 | ])
34 |
35 | // Should not equal if the order of Changeset is different
36 | XCTAssertNotEqual(c5, c6)
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/XCConfigs/DifferenceKit.xcconfig:
--------------------------------------------------------------------------------
1 | MACOSX_DEPLOYMENT_TARGET = 10.9
2 | IPHONEOS_DEPLOYMENT_TARGET = 9.0
3 | TVOS_DEPLOYMENT_TARGET = 9.0
4 | WATCHOS_DEPLOYMENT_TARGET = 2.0
5 |
6 | SDKROOT =
7 | SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator
8 | TARGETED_DEVICE_FAMILY = 1,2,3,4
9 | VALID_ARCHS[sdk=macosx*] = i386 x86_64
10 | VALID_ARCHS[sdk=iphoneos*] = arm64 armv7 armv7s
11 | VALID_ARCHS[sdk=iphonesimulator*] = i386 x86_64
12 | VALID_ARCHS[sdk=appletv*] = arm64
13 | VALID_ARCHS[sdk=appletvsimulator*] = x86_64
14 | VALID_ARCHS[sdk=watchos*] = armv7k
15 | VALID_ARCHS[sdk=watchsimulator*] = i386
16 |
17 | CODE_SIGN_IDENTITY =
18 | CODE_SIGN_STYLE = Manual
19 | INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks
20 | SKIP_INSTALL = YES
21 | DYLIB_COMPATIBILITY_VERSION = 1
22 | DYLIB_CURRENT_VERSION = 1
23 | DYLIB_INSTALL_NAME_BASE = @rpath
24 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/Frameworks @loader_path/../Frameworks
25 | DEFINES_MODULE = NO
26 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/assets/logo.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/assets/sample.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/assets/sample.gif
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/docs/badge.svg:
--------------------------------------------------------------------------------
1 |
29 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/docs/img/carat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/docs/img/carat.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/docs/img/dash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/docs/img/dash.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/docs/img/gh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/docs/img/gh.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/docs/img/spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/docs/img/spinner.gif
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Carthage/Checkouts/DifferenceKit/test-linux.sh:
--------------------------------------------------------------------------------
1 | # !/bin/bash
2 |
3 | set -e
4 |
5 | if [[ `uname` == "Darwin" ]]; then
6 | if [[ -z `which docker-machine 2>/dev/null` || -z `which virtualbox 2>/dev/null` ]] ; then
7 | echo "Install docker-machine and virtualbox ahead."
8 | exit -1
9 | fi
10 |
11 | if [[ ! $(docker info 2>/dev/null) ]]; then
12 | echo "Launch docker-machine ahead."
13 | exit -1
14 | fi
15 |
16 | DOCKER_HOST_NAME=com.ryo.DifferenceKit.test
17 | WORKING_DIR=$(pwd)
18 |
19 | echo "Starting to running tests on Linux by Docker..."
20 | docker-machine create --driver virtualbox $DOCKER_HOST_NAME || true
21 | docker run -v $WORKING_DIR:$WORKING_DIR -w $WORKING_DIR -it --privileged swift:latest bash -c "bash $0" || true
22 | docker-machine stop $DOCKER_HOST_NAME || true
23 | docker-machine rm -f $DOCKER_HOST_NAME || true
24 | echo "Finish"
25 |
26 | elif [[ `uname` == "Linux" ]]; then
27 | swift build
28 | swift test
29 |
30 | else
31 | echo "Unsupported OS (`uname`)"
32 | exit -1
33 |
34 | fi
35 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/DiffableDataSources.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |spec|
2 | spec.name = 'DiffableDataSources'
3 | spec.version = '0.2.0'
4 | spec.author = { 'ra1028' => 'r.fe51028.r@gmail.com' }
5 | spec.homepage = 'https://github.com/ra1028/DiffableDataSources'
6 | spec.documentation_url = 'https://ra1028.github.io/DiffableDataSources'
7 | spec.summary = 'A library for backporting UITableView/UICollectionViewDiffableDataSource.'
8 | spec.source = { :git => 'https://github.com/ra1028/DiffableDataSources.git', :tag => spec.version.to_s }
9 | spec.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
10 | spec.requires_arc = true
11 | spec.source_files = 'Sources/**/*.swift'
12 | spec.swift_versions = ["5.0", "5.1"]
13 |
14 | differenekit_version = '~> 1.1'
15 |
16 | spec.ios.dependency 'DifferenceKit/UIKitExtension', differenekit_version
17 | spec.tvos.dependency 'DifferenceKit/UIKitExtension', differenekit_version
18 | spec.osx.dependency 'DifferenceKit/AppKitExtension', differenekit_version
19 |
20 | spec.ios.frameworks = 'UIKit'
21 | spec.tvos.frameworks = 'UIKit'
22 | spec.osx.frameworks = 'Appkit'
23 |
24 | spec.ios.deployment_target = '9.0'
25 | spec.tvos.deployment_target = '9.0'
26 | spec.osx.deployment_target = '10.11'
27 | end
28 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/DiffableDataSources.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/DiffableDataSources.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/DiffableDataSources.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/DiffableDataSources.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/DiffableDataSourcesExamples.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/DiffableDataSourcesExamples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/DiffableDataSourcesExamples.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/DiffableDataSourcesExamples.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-iOS/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | final class AppDelegate: UIResponder, UIApplicationDelegate {
5 | var window: UIWindow?
6 |
7 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
8 | let window = UIWindow()
9 | let navigationController = UINavigationController(rootViewController: TopViewController())
10 | navigationController.navigationBar.tintColor = .black
11 | window.rootViewController = navigationController
12 | window.makeKeyAndVisible()
13 | self.window = window
14 |
15 | return true
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-iOS/Extension.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | extension UITableViewCell {
4 | static var name: String {
5 | return String(describing: self)
6 | }
7 | }
8 |
9 | extension UICollectionViewCell {
10 | static var name: String {
11 | return String(describing: self)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-iOS/LabelCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class LabelCell: UICollectionViewCell {
4 | @IBOutlet var label: UILabel!
5 |
6 | override func awakeFromNib() {
7 | super.awakeFromNib()
8 |
9 | layer.borderWidth = 1
10 | layer.borderColor = UIColor.gray.cgColor
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-macOS/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 |
3 | @NSApplicationMain
4 | final class AppDelegate: NSObject, NSApplicationDelegate {}
5 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-macOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-macOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-macOS/Example_macOS.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-macOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | Copyright © 2019 Ryo Aoyama. All rights reserved.
27 | NSMainStoryboardFile
28 | Main
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/Example-macOS/LabelItem.swift:
--------------------------------------------------------------------------------
1 | import AppKit
2 |
3 | final class LabelItem: NSCollectionViewItem {
4 | static var itemIdentifier: NSUserInterfaceItemIdentifier {
5 | return NSUserInterfaceItemIdentifier(String(describing: self))
6 | }
7 |
8 | let label = NSTextField()
9 |
10 | override func loadView() {
11 | view = NSView()
12 | }
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | label.textColor = .gray
18 | label.font = .systemFont(ofSize: 16)
19 | label.isEditable = false
20 | label.translatesAutoresizingMaskIntoConstraints = false
21 | view.addSubview(label)
22 |
23 | let constraints = [
24 | label.topAnchor.constraint(equalTo: view.topAnchor),
25 | label.bottomAnchor.constraint(equalTo: view.bottomAnchor),
26 | label.leadingAnchor.constraint(equalTo: view.leadingAnchor),
27 | label.trailingAnchor.constraint(equalTo: view.trailingAnchor)
28 | ]
29 | NSLayoutConstraint.activate(constraints)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Examples/README.md:
--------------------------------------------------------------------------------
1 |
2 | DiffableDataSources Examples
3 |
4 |
5 | ## How to Run
6 |
7 | 1. Clone the DiffableDataSources repository.
8 | 1. Checkout the dependencies using terminal command `$ make setup` at the project root directory.
9 | 1. Open example project workspace.
10 | 1. Run.
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem 'cocoapods', '1.7.5'
4 | gem 'jazzy', '0.9.4'
5 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Makefile:
--------------------------------------------------------------------------------
1 | setup:
2 | git submodule update --init --recursive
3 |
4 | carthage-submodule:
5 | carthage update --no-build --use-submodules
6 |
7 | gems-install:
8 | bundle install --path vendor/bundle
9 |
10 | docs-gen:
11 | bundle exec jazzy --config .jazzy.yml
12 |
13 | lib-lint:
14 | bundle exec pod lib lint
15 |
16 | pod-release:
17 | bundle exec pod trunk push --allow-warnings
18 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "DifferenceKit",
6 | "repositoryURL": "https://github.com/ra1028/DifferenceKit.git",
7 | "state": {
8 | "branch": null,
9 | "revision": "4eb31f8e85e4cb13732f9664d6e01e507cd592a0",
10 | "version": "1.1.3"
11 | }
12 | }
13 | ]
14 | },
15 | "version": 1
16 | }
17 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.0
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "DiffableDataSources",
7 | platforms: [
8 | .iOS(.v9), .macOS(.v10_11), .tvOS(.v9)
9 | ],
10 | products: [
11 | .library(name: "DiffableDataSources", targets: ["DiffableDataSources"])
12 | ],
13 | dependencies: [
14 | .package(url: "https://github.com/ra1028/DifferenceKit.git", .upToNextMinor(from: "1.1.0"))
15 | ],
16 | targets: [
17 | .target(
18 | name: "DiffableDataSources",
19 | dependencies: ["DifferenceKit"],
20 | path: "Sources"
21 | ),
22 | .testTarget(
23 | name: "DiffableDataSourcesTests",
24 | dependencies: ["DiffableDataSources"],
25 | path: "Tests"
26 | )
27 | ],
28 | swiftLanguageVersions: [.v5]
29 | )
30 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Sources/Internal/HashableExtension.swift:
--------------------------------------------------------------------------------
1 | extension Hashable {
2 | func isEqualHash(to other: Self) -> Bool {
3 | return hashValue == other.hashValue && self == other
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Sources/Internal/MainThreadSerialDispatcher.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | final class MainThreadSerialDispatcher {
4 | private let executingCount = UnsafeMutablePointer.allocate(capacity: 1)
5 |
6 | init() {
7 | executingCount.initialize(to: 0)
8 | }
9 |
10 | deinit {
11 | executingCount.deinitialize(count: 1)
12 | executingCount.deallocate()
13 | }
14 |
15 | func dispatch(_ action: @escaping () -> Void) {
16 | let count = OSAtomicIncrement32(executingCount)
17 |
18 | if Thread.isMainThread && count == 1 {
19 | action()
20 | OSAtomicDecrement32(executingCount)
21 | }
22 | else {
23 | DispatchQueue.main.async { [weak self] in
24 | guard let self = self else {
25 | return
26 | }
27 |
28 | action()
29 | OSAtomicDecrement32(self.executingCount)
30 | }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Sources/Internal/UniversalError.swift:
--------------------------------------------------------------------------------
1 | func universalError(_ message: String, file: StaticString = #file, line: UInt = #line) -> Never {
2 | fatalError("[DiffableDataSources] \(message)", file: file, line: line)
3 | }
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/XCConfigs/DiffableDataSources.xcconfig:
--------------------------------------------------------------------------------
1 | MACOSX_DEPLOYMENT_TARGET = 10.11
2 | IPHONEOS_DEPLOYMENT_TARGET = 9.0
3 | TVOS_DEPLOYMENT_TARGET = 9.0
4 |
5 | SDKROOT =
6 | SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator
7 | TARGETED_DEVICE_FAMILY = 1,2,3
8 | VALID_ARCHS[sdk=macosx*] = i386 x86_64
9 | VALID_ARCHS[sdk=iphoneos*] = arm64 armv7 armv7s
10 | VALID_ARCHS[sdk=iphonesimulator*] = i386 x86_64
11 | VALID_ARCHS[sdk=appletv*] = arm64
12 | VALID_ARCHS[sdk=appletvsimulator*] = x86_64
13 |
14 | CODE_SIGN_IDENTITY =
15 | CODE_SIGN_STYLE = Manual
16 | INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks
17 | SKIP_INSTALL = YES
18 | DYLIB_COMPATIBILITY_VERSION = 1
19 | DYLIB_CURRENT_VERSION = 1
20 | DYLIB_INSTALL_NAME_BASE = @rpath
21 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/Frameworks @loader_path/../Frameworks
22 | DEFINES_MODULE = NO
23 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/assets/insertion_sort.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/assets/insertion_sort.gif
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/assets/mountains.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/assets/mountains.gif
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/docs/badge.svg:
--------------------------------------------------------------------------------
1 |
29 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/docs/img/carat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/docs/img/carat.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/docs/img/dash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/docs/img/dash.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/docs/img/gh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/docs/img/gh.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/docs/img/spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DiffableDataSources/docs/img/spinner.gif
--------------------------------------------------------------------------------
/Carthage/Checkouts/DiffableDataSources/docs/js/jazzy.js:
--------------------------------------------------------------------------------
1 | window.jazzy = {'docset': false}
2 | if (typeof window.dash != 'undefined') {
3 | document.documentElement.className += ' dash'
4 | window.jazzy.docset = true
5 | }
6 | if (navigator.userAgent.match(/xcode/i)) {
7 | document.documentElement.className += ' xcode'
8 | window.jazzy.docset = true
9 | }
10 |
11 | // On doc load, toggle the URL hash discussion if present
12 | $(document).ready(function() {
13 | if (!window.jazzy.docset) {
14 | var linkToHash = $('a[href="' + window.location.hash +'"]');
15 | linkToHash.trigger("click");
16 | }
17 | });
18 |
19 | // On token click, toggle its discussion and animate token.marginLeft
20 | $(".token").click(function(event) {
21 | if (window.jazzy.docset) {
22 | return;
23 | }
24 | var link = $(this);
25 | var animationDuration = 300;
26 | $content = link.parent().parent().next();
27 | $content.slideToggle(animationDuration);
28 |
29 | // Keeps the document from jumping to the hash.
30 | var href = $(this).attr('href');
31 | if (history.pushState) {
32 | history.pushState({}, '', href);
33 | } else {
34 | location.hash = href;
35 | }
36 | event.preventDefault();
37 | });
38 |
39 | // Dumb down quotes within code blocks that delimit strings instead of quotations
40 | // https://github.com/realm/jazzy/issues/714
41 | $("code q").replaceWith(function () {
42 | return ["\"", $(this).contents(), "\""];
43 | });
44 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/.github/ISSUE_TEMPLATE/BUG_REPORT.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug Report
3 | about: Create a bug report.
4 | ---
5 |
6 | ## Checklist
7 | - [ ] This is not a Apple's bug.
8 | - [ ] Reviewed the [README](https://github.com/ra1028/DifferenceKit/blob/master/README.md) and [documents](https://ra1028.github.io/DifferenceKit).
9 | - [ ] Searched [existing issues](https://github.com/ra1028/DifferenceKit/issues) for ensure not duplicated.
10 |
11 | ## Expected Behavior
12 |
13 |
14 | ## Current Behavior
15 |
16 |
17 | ## Steps to Reproduce
18 |
19 |
20 | 1.
21 | 2.
22 | 3.
23 | 4.
24 |
25 | ## Detailed Description (Include Screenshots)
26 |
27 |
28 | ## Reproducible Demo Project
29 |
30 |
31 | ## Environments
32 | - Library version:
33 |
34 | - Swift version:
35 |
36 | - iOS version:
37 |
38 | - Xcode version:
39 |
40 | - Devices/Simulators:
41 |
42 | - CocoaPods/Carthage version:
43 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature Request
3 | about: Create a feature request.
4 | ---
5 |
6 | ## Checklist
7 | - [ ] Reviewed the [README](https://github.com/ra1028/DifferenceKit/blob/master/README.md) and [documents](https://ra1028.github.io/DifferenceKit).
8 | - [ ] Searched [existing issues](https://github.com/ra1028/DifferenceKit/issues) for ensure not duplicated.
9 |
10 | ## Description
11 |
12 |
13 | ## Motivation and Context
14 |
15 |
16 |
17 | ## Proposed Solution
18 |
19 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/.github/ISSUE_TEMPLATE/QUESTION.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: Create a bug question.
4 | ---
5 |
6 | ## Checklist
7 | - [ ] Reviewed the [README](https://github.com/ra1028/DifferenceKit/blob/master/README.md) and [documents](https://ra1028.github.io/DifferenceKit).
8 | - [ ] Searched [existing issues](https://github.com/ra1028/DifferenceKit/issues) for ensure not duplicated.
9 |
10 | ## Expected Behavior
11 |
12 |
13 | ## Current Behavior
14 |
15 |
16 | ## Detailed Description (Include Screenshots)
17 |
18 |
19 | ## Environment
20 | - Library version:
21 |
22 | - Swift version:
23 |
24 | - iOS version:
25 |
26 | - Xcode version:
27 |
28 | - Devices/Simulators:
29 |
30 | - CocoaPods/Carthage version:
31 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Checklist
2 | - [ ] All tests are passed.
3 | - [ ] Added tests.
4 | - [ ] Documented the code using [Xcode markup](https://developer.apple.com/library/mac/documentation/Xcode/Reference/xcode_markup_formatting_ref).
5 | - [ ] Searched [existing pull requests](https://github.com/ra1028/DifferenceKit/pulls) for ensure not duplicated.
6 |
7 | ## Description
8 |
9 |
10 | ## Related Issue
11 |
12 |
13 |
14 |
15 |
16 | ## Motivation and Context
17 |
18 |
19 |
20 | ## Impact on Existing Code
21 |
22 |
23 | ## Screenshots (if appropriate)
24 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | */build/*
3 | *.pbxuser
4 | !default.pbxuser
5 | *.mode1v3
6 | !default.mode1v3
7 | *.mode2v3
8 | !default.mode2v3
9 | *.perspectivev3
10 | !default.perspectivev3
11 | xcuserdata
12 | xcbaselines
13 | profile
14 | *.moved-aside
15 | DerivedData
16 | .idea/
17 | *.hmap
18 | *.xccheckout
19 | *.xcuserstate
20 | build/
21 |
22 | ## Documentation
23 | docs/docsets/
24 | docs/undocumented.json
25 |
26 | ## Gems
27 | .bundle
28 | vendor
29 |
30 | ## CocoaPods
31 | Pods
32 |
33 | ## Swift Package build
34 | .build
35 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/.hound.yml:
--------------------------------------------------------------------------------
1 | swiftlint:
2 | config_file: .swiftlint.yml
3 |
4 | ruby:
5 | enabled: false
6 |
7 | javascript:
8 | enabled: false
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/.jazzy.yaml:
--------------------------------------------------------------------------------
1 | author: Ryo Aoyama
2 | author_url: https://github.com/ra1028
3 | github_url: https://github.com/ra1028/DifferenceKit
4 | module: DifferenceKit
5 | readme: README.md
6 | exclude: Sources/Extensions/AppKitExtension.swift
7 | output: docs
8 | theme: fullwidth
9 | clean: true
10 | skip_undocumented: true
11 | xcodebuild_arguments:
12 | - -sdk
13 | - iphonesimulator
14 | - -scheme
15 | - DifferenceKit
16 | custom_categories:
17 | - name: Diffing
18 | children:
19 | - ContentEquatable
20 | - Differentiable
21 | - DifferentiableSection
22 | - AnyDifferentiable
23 | - ArraySection
24 | - ElementPath
25 | - Optional
26 | - name: Changeset
27 | children:
28 | - StagedChangeset
29 | - Changeset
30 | - name: UI Extensions
31 | children:
32 | - UITableView
33 | - UICollectionView
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/.swift-version:
--------------------------------------------------------------------------------
1 | 4.2
2 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/.swiftlint.yml:
--------------------------------------------------------------------------------
1 | # https://github.com/realm/SwiftLint
2 |
3 | excluded:
4 | - Tests/XCTestManifests.swift
5 | - Benchmark
6 |
7 | disabled_rules:
8 | - type_name
9 | - identifier_name
10 | - force_cast
11 | - xctfail_message
12 | - function_body_length
13 | - file_length
14 |
15 | nesting:
16 | type_level:
17 | warning: 2
18 |
19 | line_length:
20 | warning: 200
21 |
22 | type_body_length:
23 | warning: 400
24 |
25 | function_parameter_count:
26 | warning: 8
27 |
28 | cyclomatic_complexity:
29 | warning: 12
30 |
31 | statement_position:
32 | statement_mode: uncuddled_else
33 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Benchmark.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem 'cocoapods', '1.7.0.rc.1'
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Makefile:
--------------------------------------------------------------------------------
1 | pods-install:
2 | bundle exec pod install || bundle exec pod install --repo-update
3 |
4 | gems-install:
5 | bundle check || bundle install --path vendor/bundle --clean --jobs=4
6 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '12.2'
2 |
3 | use_frameworks!
4 | inhibit_all_warnings!
5 |
6 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
7 |
8 | target 'Benchmark' do
9 | pod 'DifferenceKit', path: '../'
10 | pod 'Differentiator', '4.0.1'
11 | pod 'FlexibleDiff', '0.0.8'
12 | pod 'IGListKit', '3.4.0'
13 | pod 'DeepDiff', '2.0.1'
14 | pod 'Differ', '1.4.1'
15 | pod 'Dwifft', '0.9'
16 | end
17 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/README.md:
--------------------------------------------------------------------------------
1 | # How to Run
2 |
3 | 1. Change directory from the root of repository `cd ./Benchmark`
4 | 1. Install gems by Bundler `make gems-install`
5 | 1. Install dependencies by CocoaPods `make pods-install`
6 | 1. Open `Benchmark.xcworkspace` on Xcode
7 | 1. Run `Benchmark` scheme
8 | 1. See the benchmark result on the Xcode console
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Benchmark/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIRequiredDeviceCapabilities
24 |
25 | armv7
26 |
27 | UISupportedInterfaceOrientations
28 |
29 | UISupportedInterfaceOrientations~ipad
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationPortraitUpsideDown
33 | UIInterfaceOrientationLandscapeLeft
34 | UIInterfaceOrientationLandscapeRight
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/DifferenceKit.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/DifferenceKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/DifferenceKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/DifferenceKit.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/DifferenceKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Example-iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Example-iOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | final class AppDelegate: UIResponder, UIApplicationDelegate {
5 | var window: UIWindow?
6 |
7 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
8 | configureUIAppearance()
9 |
10 | let window = UIWindow()
11 | let navigationController = UINavigationController(rootViewController: HomeViewController())
12 | window.rootViewController = navigationController
13 | window.makeKeyAndVisible()
14 | self.window = window
15 | return true
16 | }
17 |
18 | func configureUIAppearance() {
19 | let appearance = UINavigationBar.appearance()
20 | let titleTextAttributes: [NSAttributedString.Key: Any] = [
21 | .foregroundColor: UIColor.black
22 | ]
23 |
24 | appearance.tintColor = .darkText
25 | appearance.prefersLargeTitles = true
26 | appearance.titleTextAttributes = titleTextAttributes
27 | appearance.largeTitleTextAttributes = titleTextAttributes
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Common/NibLoadable.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol NibLoadable: class {
4 | static var nibName: String { get }
5 | static var nibBundle: Bundle? { get }
6 | }
7 |
8 | extension NibLoadable {
9 | static var nib: UINib {
10 | return UINib(nibName: nibName, bundle: nibBundle)
11 | }
12 |
13 | static var nibName: String {
14 | return String(describing: self)
15 | }
16 |
17 | static var nibBundle: Bundle? {
18 | return Bundle(for: self)
19 | }
20 | }
21 |
22 | extension NibLoadable where Self: UIView {
23 | static func loadFromNib() -> Self {
24 | return nib.instantiate(withOwner: nil, options: nil).first as! Self
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Common/Reusable.swift:
--------------------------------------------------------------------------------
1 | protocol Reusable: class {
2 | static var reuseIdentifier: String { get }
3 | }
4 |
5 | extension Reusable {
6 | static var reuseIdentifier: String {
7 | return String(reflecting: self)
8 | }
9 | }
10 |
11 | typealias NibReusable = NibLoadable & Reusable
12 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Common/StringExtensions.swift:
--------------------------------------------------------------------------------
1 | import DifferenceKit
2 |
3 | extension String: Differentiable {}
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/HeaderFooter/HeaderFooterCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class HeaderFooterPlainCell: UITableViewCell, Reusable {}
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/HeaderFooter/HeaderFooterMoreView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class HeaderFooterMoreView: UITableViewHeaderFooterView, NibReusable {
4 | var onMorePressed: (() -> Void)?
5 |
6 | @IBAction func handleMorePressed() {
7 | onMorePressed?()
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/HeaderFooter/HeaderFooterSectionModel.swift:
--------------------------------------------------------------------------------
1 | import DifferenceKit
2 |
3 | struct HeaderFooterSectionModel: Differentiable, Equatable {
4 | var id: Int
5 | var hasFooter: Bool
6 |
7 | var differenceIdentifier: Int {
8 | return id
9 | }
10 |
11 | var headerTitle: String {
12 | return "Section \(id)"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Home/HomeCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class HomeCell: UITableViewCell, NibReusable {
4 | @IBOutlet weak var titleLabel: UILabel!
5 | @IBOutlet weak var subtitleLabel: UILabel!
6 | }
7 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Random/RandomLabelView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class RandomLabelView: UICollectionReusableView, NibReusable {
4 | @IBOutlet weak var label: UILabel!
5 | }
6 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Random/RandomModel.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import DifferenceKit
3 |
4 | struct RandomModel: Differentiable {
5 | var id: UUID
6 | var isUpdated: Bool
7 |
8 | var differenceIdentifier: UUID {
9 | return id
10 | }
11 |
12 | init(_ id: UUID = UUID(), _ isUpdated: Bool = false) {
13 | self.id = id
14 | self.isUpdated = isUpdated
15 | }
16 |
17 | func isContentEqual(to source: RandomModel) -> Bool {
18 | return isUpdated == source.isUpdated
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/Random/RandomPlainCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class RandomPlainCell: UICollectionViewCell, Reusable {
4 | override func layoutSubviews() {
5 | super.layoutSubviews()
6 |
7 | layer.masksToBounds = true
8 | layer.cornerRadius = bounds.height / 2
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-iOS/Sources/ShuffleEmoticon/EmojiCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class EmojiCell: UICollectionViewCell, NibReusable {
4 | @IBOutlet weak var label: UILabel!
5 |
6 | override func awakeFromNib() {
7 | super.awakeFromNib()
8 |
9 | label.layer.cornerRadius = 8
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Example-macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Example-macOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 |
3 | @NSApplicationMain
4 | final class AppDelegate: NSObject, NSApplicationDelegate {
5 | @IBOutlet weak var window: NSWindow!
6 | }
7 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSMainNibFile
26 | MainMenu
27 | NSPrincipalClass
28 | NSApplication
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/ShuffleEmoticonCollectionViewItem.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 |
3 | final class ShuffleEmoticonCollectionViewItem: NSCollectionViewItem {
4 | static var itemIdentifier: NSUserInterfaceItemIdentifier {
5 | return NSUserInterfaceItemIdentifier(String(describing: self))
6 | }
7 |
8 | var emoticon: String {
9 | get { return _textField.stringValue }
10 | set { _textField.stringValue = newValue }
11 | }
12 |
13 | private let _textField = NSTextField()
14 |
15 | override func loadView() {
16 | view = NSView(frame: NSRect(x: 0, y: 0, width: 60, height: 54))
17 | }
18 |
19 | override func viewDidLoad() {
20 | super.viewDidLoad()
21 | _textField.font = .systemFont(ofSize: 40)
22 | _textField.alignment = .center
23 | _textField.isEditable = false
24 |
25 | _textField.translatesAutoresizingMaskIntoConstraints = false
26 | view.addSubview(_textField)
27 |
28 | let constraints = [
29 | _textField.topAnchor.constraint(equalTo: view.topAnchor),
30 | _textField.bottomAnchor.constraint(equalTo: view.bottomAnchor),
31 | _textField.leadingAnchor.constraint(equalTo: view.leadingAnchor),
32 | _textField.trailingAnchor.constraint(equalTo: view.trailingAnchor)
33 | ]
34 | NSLayoutConstraint.activate(constraints)
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-macOS/Sources/StringExtensions.swift:
--------------------------------------------------------------------------------
1 | import DifferenceKit
2 |
3 | extension String: Differentiable { }
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Example-tvOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Example-tvOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | final class AppDelegate: UIResponder, UIApplicationDelegate {
5 | var window: UIWindow?
6 |
7 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
8 | let window = UIWindow()
9 | let navigationController = UINavigationController(rootViewController: EmojiViewController())
10 | window.rootViewController = navigationController
11 | window.makeKeyAndVisible()
12 | self.window = window
13 | return true
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv"
5 | }
6 | ],
7 | "info" : {
8 | "version" : 1,
9 | "author" : "xcode"
10 | }
11 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "layers" : [
3 | {
4 | "filename" : "Front.imagestacklayer"
5 | },
6 | {
7 | "filename" : "Middle.imagestacklayer"
8 | },
9 | {
10 | "filename" : "Back.imagestacklayer"
11 | }
12 | ],
13 | "info" : {
14 | "version" : 1,
15 | "author" : "xcode"
16 | }
17 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv"
5 | }
6 | ],
7 | "info" : {
8 | "version" : 1,
9 | "author" : "xcode"
10 | }
11 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv"
5 | }
6 | ],
7 | "info" : {
8 | "version" : 1,
9 | "author" : "xcode"
10 | }
11 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "layers" : [
3 | {
4 | "filename" : "Front.imagestacklayer"
5 | },
6 | {
7 | "filename" : "Middle.imagestacklayer"
8 | },
9 | {
10 | "filename" : "Back.imagestacklayer"
11 | }
12 | ],
13 | "info" : {
14 | "version" : 1,
15 | "author" : "xcode"
16 | }
17 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "assets" : [
3 | {
4 | "size" : "1280x768",
5 | "idiom" : "tv",
6 | "filename" : "App Icon - App Store.imagestack",
7 | "role" : "primary-app-icon"
8 | },
9 | {
10 | "size" : "400x240",
11 | "idiom" : "tv",
12 | "filename" : "App Icon.imagestack",
13 | "role" : "primary-app-icon"
14 | },
15 | {
16 | "size" : "2320x720",
17 | "idiom" : "tv",
18 | "filename" : "Top Shelf Image Wide.imageset",
19 | "role" : "top-shelf-image-wide"
20 | },
21 | {
22 | "size" : "1920x720",
23 | "idiom" : "tv",
24 | "filename" : "Top Shelf Image.imageset",
25 | "role" : "top-shelf-image"
26 | }
27 | ],
28 | "info" : {
29 | "version" : 1,
30 | "author" : "xcode"
31 | }
32 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "tv",
9 | "scale" : "2x"
10 | }
11 | ],
12 | "info" : {
13 | "version" : 1,
14 | "author" : "xcode"
15 | }
16 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/EmojiCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | final class EmojiCell: UICollectionViewCell, NibReusable {
4 | @IBOutlet weak var label: UILabel!
5 |
6 | override func awakeFromNib() {
7 | super.awakeFromNib()
8 |
9 | contentView.backgroundColor = UIColor(white: 0.95, alpha: 1)
10 | contentView.layer.cornerRadius = 8
11 | contentView.layer.shadowOffset = CGSize(width: 0, height: 7)
12 | }
13 |
14 | override var isHighlighted: Bool {
15 | didSet { alpha = isHidden ? 0.2 : 1 }
16 | }
17 |
18 | override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) {
19 | coordinator.addCoordinatedAnimations({ [weak self] in
20 | guard let self = self else { return }
21 | self.contentView.layer.shadowOpacity = self.isFocused ? 0.3 : 0
22 | self.contentView.layer.transform = self.isFocused ? CATransform3DMakeScale(1.1, 1.1, 1) : CATransform3DIdentity
23 | self.layer.zPosition = self.isFocused ? 1 : 0
24 | })
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | DifferenceKit-tvOS
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UIRequiredDeviceCapabilities
26 |
27 | arm64
28 |
29 | UIUserInterfaceStyle
30 | Automatic
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/NibLoadable.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol NibLoadable: class {
4 | static var nibName: String { get }
5 | static var nibBundle: Bundle? { get }
6 | }
7 |
8 | extension NibLoadable {
9 | static var nib: UINib {
10 | return UINib(nibName: nibName, bundle: nibBundle)
11 | }
12 |
13 | static var nibName: String {
14 | return String(describing: self)
15 | }
16 |
17 | static var nibBundle: Bundle? {
18 | return Bundle(for: self)
19 | }
20 | }
21 |
22 | extension NibLoadable where Self: UIView {
23 | static func loadFromNib() -> Self {
24 | return nib.instantiate(withOwner: nil, options: nil).first as! Self
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/Reusable.swift:
--------------------------------------------------------------------------------
1 | protocol Reusable: class {
2 | static var reuseIdentifier: String { get }
3 | }
4 |
5 | extension Reusable {
6 | static var reuseIdentifier: String {
7 | return String(reflecting: self)
8 | }
9 | }
10 |
11 | typealias NibReusable = NibLoadable & Reusable
12 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Examples/Example-tvOS/Sources/StringExtensions.swift:
--------------------------------------------------------------------------------
1 | import DifferenceKit
2 |
3 | extension String: Differentiable {}
4 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem 'cocoapods', '1.7.2'
4 | gem 'jazzy', '0.9.4'
5 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/LinuxMain.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | import DifferenceKitTests
4 |
5 | var tests = [XCTestCaseEntry]()
6 | tests += DifferenceKitTests.__allTests()
7 |
8 | XCTMain(tests)
9 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Makefile:
--------------------------------------------------------------------------------
1 | gems-install:
2 | bundle install --path vendor/bundle
3 |
4 | docs-gen:
5 | bundle exec jazzy --config .jazzy.yaml
6 |
7 | lib-lint:
8 | bundle exec pod lib lint
9 |
10 | pod-release:
11 | bundle exec pod trunk push --allow-warnings
12 |
13 | test-linux:
14 | sh test-linux.sh
15 |
16 | generate-linuxmain:
17 | swift test --generate-linuxmain
18 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.0
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "DifferenceKit",
7 | platforms: [
8 | .iOS(.v9), .macOS(.v10_10), .tvOS(.v9), .watchOS(.v2)
9 | ],
10 | products: [
11 | .library(name: "DifferenceKit", targets: ["DifferenceKit"])
12 | ],
13 | targets: [
14 | .target(
15 | name: "DifferenceKit",
16 | path: "Sources"
17 | ),
18 | .testTarget(
19 | name: "DifferenceKitTests",
20 | dependencies: ["DifferenceKit"],
21 | path: "Tests"
22 | )
23 | ],
24 | swiftLanguageVersions: [.v4_2, .v5]
25 | )
26 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Package@swift-4.2.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:4.2
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "DifferenceKit",
7 | products: [
8 | .library(name: "DifferenceKit", targets: ["DifferenceKit"])
9 | ],
10 | targets: [
11 | .target(
12 | name: "DifferenceKit",
13 | path: "Sources"
14 | ),
15 | .testTarget(
16 | name: "DifferenceKitTests",
17 | dependencies: ["DifferenceKit"],
18 | path: "Tests"
19 | )
20 | ],
21 | swiftLanguageVersions: [.v4_2]
22 | )
23 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Sources/Differentiable.swift:
--------------------------------------------------------------------------------
1 | /// Represents the value that identified for differentiate.
2 | public protocol Differentiable: ContentEquatable {
3 | /// A type representing the identifier.
4 | associatedtype DifferenceIdentifier: Hashable
5 |
6 | /// An identifier value for difference calculation.
7 | var differenceIdentifier: DifferenceIdentifier { get }
8 | }
9 |
10 | public extension Differentiable where Self: Hashable {
11 | /// The `self` value as an identifier for difference calculation.
12 | @inlinable
13 | var differenceIdentifier: Self {
14 | return self
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Sources/DifferentiableSection.swift:
--------------------------------------------------------------------------------
1 | /// Represents the section of collection that can be identified and compared to whether has updated.
2 | public protocol DifferentiableSection: Differentiable {
3 | /// A type representing the elements in section.
4 | associatedtype Collection: Swift.Collection where Collection.Element: Differentiable
5 |
6 | /// The collection of element in the section.
7 | var elements: Collection { get }
8 |
9 | /// Creates a new section reproducing the given source section with replacing the elements.
10 | ///
11 | /// - Parameters:
12 | /// - source: A source section to reproduce.
13 | /// - elements: The collection of elements for the new section.
14 | init(source: Self, elements: C) where C.Element == Collection.Element
15 | }
16 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Sources/ElementPath.swift:
--------------------------------------------------------------------------------
1 | /// Represents the path to a specific element in a tree of nested collections.
2 | ///
3 | /// - Note: `Foundation.IndexPath` is disadvantageous in performance.
4 | public struct ElementPath: Hashable {
5 | /// The element index (or offset) of this path.
6 | public var element: Int
7 | /// The section index (or offset) of this path.
8 | public var section: Int
9 |
10 | /// Creates a new `ElementPath`.
11 | ///
12 | /// - Parameters:
13 | /// - element: The element index (or offset).
14 | /// - section: The section index (or offset).
15 | @inlinable
16 | public init(element: Int, section: Int) {
17 | self.element = element
18 | self.section = section
19 | }
20 | }
21 |
22 | extension ElementPath: CustomDebugStringConvertible {
23 | public var debugDescription: String {
24 | return "[element: \(element), section: \(section)]"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Tests/ArraySectionTest.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import DifferenceKit
3 |
4 | final class ArraySectionTestCase: XCTestCase {
5 | func testReinitialize() {
6 | let s1 = ArraySection(model: D.a, elements: [0])
7 | let s2 = ArraySection(model: s1.model, elements: s1.elements)
8 |
9 | XCTAssertEqual(s1.model.differenceIdentifier, s2.model.differenceIdentifier)
10 | XCTAssertEqual(s1.model.differenceIdentifier.hashValue, s2.model.differenceIdentifier.hashValue)
11 | XCTAssertEqual(s1.elements, s2.elements)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Tests/ContentEquatableTest.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import DifferenceKit
3 |
4 | final class ContentEquatableTestCase: XCTestCase {
5 | func testEquatableValue() {
6 | let value1 = D.a
7 | let value2 = D.a
8 | let value3 = D.b
9 |
10 | XCTAssertEqual(value1, value2)
11 | XCTAssertTrue(value1.isContentEqual(to: value2))
12 |
13 | XCTAssertNotEqual(value1, value3)
14 | XCTAssertFalse(value1.isContentEqual(to: value3))
15 | }
16 |
17 | func testOptionalValue() {
18 | let value1: D? = .a
19 | let value2: D? = .a
20 | let value3: D? = .b
21 |
22 | XCTAssertTrue(value1.isContentEqual(to: value2))
23 | XCTAssertFalse(value1.isContentEqual(to: value3))
24 | XCTAssertFalse(value1.isContentEqual(to: nil))
25 | XCTAssertFalse(D?.none.isContentEqual(to: value1))
26 | XCTAssertTrue(D?.none.isContentEqual(to: nil))
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Tests/ElementPathTest.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import DifferenceKit
3 |
4 | final class ElementPathTestCase: XCTestCase {
5 | func testHashable() {
6 | let e1 = ElementPath(element: 0, section: 0)
7 | let e2 = ElementPath(element: 0, section: 0)
8 |
9 | XCTAssertEqual(e1, e2)
10 | XCTAssertEqual(e1.hashValue, e2.hashValue)
11 |
12 | let e3 = ElementPath(element: 0, section: 0)
13 | let e4 = ElementPath(element: 0, section: 1)
14 |
15 | XCTAssertNotEqual(e3, e4)
16 | XCTAssertNotEqual(e3.hashValue, e4.hashValue)
17 |
18 | let e5 = ElementPath(element: 0, section: 0)
19 | let e6 = ElementPath(element: 1, section: 1)
20 |
21 | XCTAssertNotEqual(e5, e6)
22 | XCTAssertNotEqual(e5.hashValue, e6.hashValue)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/Tests/StagedChangesetTest.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import DifferenceKit
3 |
4 | final class StagedChangesetTestCase: XCTestCase {
5 | func testEquatable() {
6 | let data = [0]
7 |
8 | let c1 = StagedChangeset<[Int]>()
9 | let c2 = StagedChangeset<[Int]>()
10 |
11 | // Should be equal if both are empty
12 | XCTAssertEqual(c1, c2)
13 |
14 | let c3 = StagedChangeset([
15 | Changeset(data: data, sectionDeleted: [2, 0, 1])
16 | ])
17 |
18 | let c4 = StagedChangeset([
19 | Changeset(data: data, sectionDeleted: [0, 1, 2])
20 | ])
21 |
22 | // Should be equal ignoring the order of each inner changes
23 | XCTAssertEqual(c3, c4)
24 |
25 | let c5 = StagedChangeset([
26 | Changeset(data: data, sectionDeleted: [0, 1, 2]),
27 | Changeset(data: data, sectionInserted: [3, 4, 5])
28 | ])
29 |
30 | let c6 = StagedChangeset([
31 | Changeset(data: data, sectionInserted: [3, 4, 5]),
32 | Changeset(data: data, sectionDeleted: [0, 1, 2])
33 | ])
34 |
35 | // Should not equal if the order of Changeset is different
36 | XCTAssertNotEqual(c5, c6)
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/XCConfigs/DifferenceKit.xcconfig:
--------------------------------------------------------------------------------
1 | MACOSX_DEPLOYMENT_TARGET = 10.9
2 | IPHONEOS_DEPLOYMENT_TARGET = 9.0
3 | TVOS_DEPLOYMENT_TARGET = 9.0
4 | WATCHOS_DEPLOYMENT_TARGET = 2.0
5 |
6 | SDKROOT =
7 | SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator
8 | TARGETED_DEVICE_FAMILY = 1,2,3,4
9 | VALID_ARCHS[sdk=macosx*] = i386 x86_64
10 | VALID_ARCHS[sdk=iphoneos*] = arm64 armv7 armv7s
11 | VALID_ARCHS[sdk=iphonesimulator*] = i386 x86_64
12 | VALID_ARCHS[sdk=appletv*] = arm64
13 | VALID_ARCHS[sdk=appletvsimulator*] = x86_64
14 | VALID_ARCHS[sdk=watchos*] = armv7k
15 | VALID_ARCHS[sdk=watchsimulator*] = i386
16 |
17 | CODE_SIGN_IDENTITY =
18 | CODE_SIGN_STYLE = Manual
19 | INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks
20 | SKIP_INSTALL = YES
21 | DYLIB_COMPATIBILITY_VERSION = 1
22 | DYLIB_CURRENT_VERSION = 1
23 | DYLIB_INSTALL_NAME_BASE = @rpath
24 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/Frameworks @loader_path/../Frameworks
25 | DEFINES_MODULE = NO
26 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DifferenceKit/assets/logo.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/assets/sample.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DifferenceKit/assets/sample.gif
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/docs/badge.svg:
--------------------------------------------------------------------------------
1 |
29 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/docs/img/carat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DifferenceKit/docs/img/carat.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/docs/img/dash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DifferenceKit/docs/img/dash.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/docs/img/gh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DifferenceKit/docs/img/gh.png
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/docs/img/spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Carthage/Checkouts/DifferenceKit/docs/img/spinner.gif
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/docs/js/jazzy.js:
--------------------------------------------------------------------------------
1 | window.jazzy = {'docset': false}
2 | if (typeof window.dash != 'undefined') {
3 | document.documentElement.className += ' dash'
4 | window.jazzy.docset = true
5 | }
6 | if (navigator.userAgent.match(/xcode/i)) {
7 | document.documentElement.className += ' xcode'
8 | window.jazzy.docset = true
9 | }
10 |
11 | // On doc load, toggle the URL hash discussion if present
12 | $(document).ready(function() {
13 | if (!window.jazzy.docset) {
14 | var linkToHash = $('a[href="' + window.location.hash +'"]');
15 | linkToHash.trigger("click");
16 | }
17 | });
18 |
19 | // On token click, toggle its discussion and animate token.marginLeft
20 | $(".token").click(function(event) {
21 | if (window.jazzy.docset) {
22 | return;
23 | }
24 | var link = $(this);
25 | var animationDuration = 300;
26 | $content = link.parent().parent().next();
27 | $content.slideToggle(animationDuration);
28 |
29 | // Keeps the document from jumping to the hash.
30 | var href = $(this).attr('href');
31 | if (history.pushState) {
32 | history.pushState({}, '', href);
33 | } else {
34 | location.hash = href;
35 | }
36 | event.preventDefault();
37 | });
38 |
39 | // Dumb down quotes within code blocks that delimit strings instead of quotations
40 | // https://github.com/realm/jazzy/issues/714
41 | $("code q").replaceWith(function () {
42 | return ["\"", $(this).contents(), "\""];
43 | });
44 |
--------------------------------------------------------------------------------
/Carthage/Checkouts/DifferenceKit/test-linux.sh:
--------------------------------------------------------------------------------
1 | # !/bin/bash
2 |
3 | set -e
4 |
5 | if [[ `uname` == "Darwin" ]]; then
6 | if [[ -z `which docker-machine 2>/dev/null` || -z `which virtualbox 2>/dev/null` ]] ; then
7 | echo "Install docker-machine and virtualbox ahead."
8 | exit -1
9 | fi
10 |
11 | if [[ ! $(docker info 2>/dev/null) ]]; then
12 | echo "Launch docker-machine ahead."
13 | exit -1
14 | fi
15 |
16 | DOCKER_HOST_NAME=com.ryo.DifferenceKit.test
17 | WORKING_DIR=$(pwd)
18 |
19 | echo "Starting to running tests on Linux by Docker..."
20 | docker-machine create --driver virtualbox $DOCKER_HOST_NAME || true
21 | docker run -v $WORKING_DIR:$WORKING_DIR -w $WORKING_DIR -it --privileged swift:latest bash -c "bash $0" || true
22 | docker-machine stop $DOCKER_HOST_NAME || true
23 | docker-machine rm -f $DOCKER_HOST_NAME || true
24 | echo "Finish"
25 |
26 | elif [[ `uname` == "Linux" ]]; then
27 | swift build
28 | swift test
29 |
30 | else
31 | echo "Unsupported OS (`uname`)"
32 | exit -1
33 |
34 | fi
35 |
--------------------------------------------------------------------------------
/Configurations/HostApp-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "HostApp-Shared.xcconfig"
2 |
3 | DEBUG_INFORMATION_FORMAT = dwarf
4 | ENABLE_TESTABILITY = YES
5 | GCC_DYNAMIC_NO_PIC = NO
6 | GCC_OPTIMIZATION_LEVEL = 0
7 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
8 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE
9 | ONLY_ACTIVE_ARCH = YES
10 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG
11 | SWIFT_OPTIMIZATION_LEVEL = -Onone
12 |
--------------------------------------------------------------------------------
/Configurations/HostApp-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "HostApp-Shared.xcconfig"
2 |
3 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
4 | ENABLE_NS_ASSERTIONS = NO
5 | MTL_ENABLE_DEBUG_INFO = NO
6 | SWIFT_COMPILATION_MODE = wholemodule
7 | SWIFT_OPTIMIZATION_LEVEL = -O
8 | VALIDATE_PRODUCT = YES
9 |
--------------------------------------------------------------------------------
/Configurations/IBPCollectionViewCompositionalLayout.xcconfig:
--------------------------------------------------------------------------------
1 | CODE_SIGN_IDENTITY =
2 | CODE_SIGN_STYLE = Automatic
3 | DEFINES_MODULE = YES
4 | DEVELOPMENT_TEAM = 27AEDK3C9F
5 | DYLIB_COMPATIBILITY_VERSION = 1
6 | DYLIB_CURRENT_VERSION = 1
7 | DYLIB_INSTALL_NAME_BASE = @rpath
8 | INFOPLIST_FILE = Sources/Info.plist
9 | INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks
10 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks
11 | PRODUCT_BUNDLE_IDENTIFIER = com.kishikawakatsumi.IBPCollectionViewCompositionalLayout
12 | PRODUCT_NAME = $(TARGET_NAME:c99extidentifier)
13 | SKIP_INSTALL = YES
14 | TARGETED_DEVICE_FAMILY = 1,2
15 |
--------------------------------------------------------------------------------
/Configurations/IBPCollectionViewCompositionalLayoutTests.xcconfig:
--------------------------------------------------------------------------------
1 | CODE_SIGN_STYLE = Automatic
2 | DEVELOPMENT_TEAM = 27AEDK3C9F
3 | INFOPLIST_FILE = Tests/Info.plist
4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks
5 | PRODUCT_BUNDLE_IDENTIFIER = com.kishikawakatsumi.IBPCollectionViewCompositionalLayoutTests
6 | PRODUCT_NAME = $(TARGET_NAME)
7 | TARGETED_DEVICE_FAMILY = 1,2
8 | TEST_HOST = $(BUILT_PRODUCTS_DIR)/HostApp.app/HostApp
9 |
--------------------------------------------------------------------------------
/Configurations/Project-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Project-Shared.xcconfig"
2 |
3 | DEBUG_INFORMATION_FORMAT = dwarf
4 | ENABLE_TESTABILITY = YES
5 | GCC_DYNAMIC_NO_PIC = NO
6 | GCC_OPTIMIZATION_LEVEL = 0
7 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
8 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE
9 | ONLY_ACTIVE_ARCH = YES
10 | SWIFT_OPTIMIZATION_LEVEL = -Onone
11 |
--------------------------------------------------------------------------------
/Configurations/Project-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Project-Shared.xcconfig"
2 |
3 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
4 | ENABLE_NS_ASSERTIONS = NO
5 | MTL_ENABLE_DEBUG_INFO = NO
6 | VALIDATE_PRODUCT = YES
7 | SWIFT_OPTIMIZATION_LEVEL = -O
8 |
--------------------------------------------------------------------------------
/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/Example/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | class AppDelegate: UIResponder, UIApplicationDelegate {
5 | var window: UIWindow?
6 |
7 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
8 | return true
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/cat.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "cat.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/cat.imageset/cat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Example/Example/Assets.xcassets/cat.imageset/cat.jpg
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/chevron.left.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "chevron.left.pdf"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "template-rendering-intent" : "template",
14 | "preserves-vector-representation" : true
15 | }
16 | }
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/chevron.left.imageset/chevron.left.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Example/Example/Assets.xcassets/chevron.left.imageset/chevron.left.pdf
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/chevron.right.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "chevron.right.pdf"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "template-rendering-intent" : "template",
14 | "preserves-vector-representation" : true
15 | }
16 | }
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/chevron.right.imageset/chevron.right.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Example/Example/Assets.xcassets/chevron.right.imageset/chevron.right.pdf
--------------------------------------------------------------------------------
/Example/Example/Configurations/Example.xcconfig:
--------------------------------------------------------------------------------
1 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
2 | CODE_SIGN_STYLE = Automatic
3 | DEVELOPMENT_TEAM = 27AEDK3C9F
4 | INFOPLIST_FILE = Example/Info.plist
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks
6 | PRODUCT_BUNDLE_IDENTIFIER = com.kishikawakatsumi.IBPCollectionViewCompositionalLayout.Example${SAMPLE_CODE_DISAMBIGUATOR}
7 | PRODUCT_NAME = $(TARGET_NAME)
8 | SWIFT_VERSION = 5.0
9 | TARGETED_DEVICE_FAMILY = 1,2
10 |
11 | // The `SAMPLE_CODE_DISAMBIGUATOR` configuration is to make it easier to build
12 | // and run a sample code project. Once you set your project's development team,
13 | // you'll have a unique bundle identifier. This is because the bundle identifier
14 | // is derived based on the 'SAMPLE_CODE_DISAMBIGUATOR' value. Do not use this
15 | // approach in your own projects—it's only useful for sample code projects because
16 | // they are frequently downloaded and don't have a development team set.
17 | SAMPLE_CODE_DISAMBIGUATOR=${DEVELOPMENT_TEAM}
18 |
--------------------------------------------------------------------------------
/Example/Example/Configurations/Project-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Project-Shared.xcconfig"
2 |
3 | DEBUG_INFORMATION_FORMAT = dwarf
4 | ENABLE_TESTABILITY = YES
5 | GCC_DYNAMIC_NO_PIC = NO
6 | GCC_OPTIMIZATION_LEVEL = 0
7 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
8 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE
9 | ONLY_ACTIVE_ARCH = YES
10 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG
11 | SWIFT_OPTIMIZATION_LEVEL = -Onone
12 |
--------------------------------------------------------------------------------
/Example/Example/Configurations/Project-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Project-Shared.xcconfig"
2 |
3 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
4 | ENABLE_NS_ASSERTIONS = NO
5 | MTL_ENABLE_DEBUG_INFO = NO
6 | SWIFT_COMPILATION_MODE = wholemodule
7 | SWIFT_OPTIMIZATION_LEVEL = -O
8 | VALIDATE_PRODUCT = YES
9 |
--------------------------------------------------------------------------------
/Example/Example/DiffableDataSourceInteroperability.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import DiffableDataSources
3 |
4 | typealias NSDiffableDataSourceSnapshot = DiffableDataSourceSnapshot
5 | typealias UICollectionViewDiffableDataSource = CollectionViewDiffableDataSource
6 |
--------------------------------------------------------------------------------
/Example/Example/IBPCollectionViewCompositionalLayoutInteroperability.swift:
--------------------------------------------------------------------------------
1 | ../../IBPCollectionViewCompositionalLayoutInteroperability.swift
--------------------------------------------------------------------------------
/Example/Example/Samples from Apple/Cells and Supplementary Views/SectionBackgroundDecorationView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | See LICENSE folder for this sample’s licensing information.
3 |
4 | Abstract:
5 | Decoration view for rendering the background of a compositional section
6 | */
7 |
8 | import UIKit
9 |
10 | class SectionBackgroundDecorationView: UICollectionReusableView {
11 |
12 | override init(frame: CGRect) {
13 | super.init(frame: frame)
14 | configure()
15 | }
16 | required init?(coder: NSCoder) {
17 | fatalError("not implemented")
18 | }
19 | }
20 |
21 | extension SectionBackgroundDecorationView {
22 | func configure() {
23 | backgroundColor = UIColor.lightGray.withAlphaComponent(0.5)
24 | layer.borderColor = UIColor.black.cgColor
25 | layer.borderWidth = 1
26 | layer.cornerRadius = 12
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Example/Example/Samples from Apple/Cells and Supplementary Views/TextCell.swift:
--------------------------------------------------------------------------------
1 | /*
2 | See LICENSE folder for this sample’s licensing information.
3 |
4 | Abstract:
5 | Generic text cell
6 | */
7 |
8 | import UIKit
9 |
10 | class TextCell: UICollectionViewCell {
11 | let label = UILabel()
12 | static let reuseIdentifier = "text-cell-reuse-identifier"
13 |
14 | override init(frame: CGRect) {
15 | super.init(frame: frame)
16 | configure()
17 | }
18 | required init?(coder: NSCoder) {
19 | fatalError("not implemnted")
20 | }
21 |
22 | }
23 |
24 | extension TextCell {
25 | func configure() {
26 | label.translatesAutoresizingMaskIntoConstraints = false
27 | label.adjustsFontForContentSizeCategory = true
28 | contentView.addSubview(label)
29 | label.font = UIFont.preferredFont(forTextStyle: .caption1)
30 | let inset = CGFloat(10)
31 | NSLayoutConstraint.activate([
32 | label.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: inset),
33 | label.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -inset),
34 | label.topAnchor.constraint(equalTo: contentView.topAnchor, constant: inset),
35 | label.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -inset)
36 | ])
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Example/Example/Samples from Apple/Cells and Supplementary Views/TitleSupplementaryView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | See LICENSE folder for this sample’s licensing information.
3 |
4 | Abstract:
5 | Simple example of a self-sizing supplementary title view
6 | */
7 |
8 | import UIKit
9 |
10 | class TitleSupplementaryView: UICollectionReusableView {
11 | let label = UILabel()
12 | static let reuseIdentifier = "title-supplementary-reuse-identifier"
13 |
14 | override init(frame: CGRect) {
15 | super.init(frame: frame)
16 | configure()
17 | }
18 | required init?(coder: NSCoder) {
19 | fatalError()
20 | }
21 | }
22 |
23 | extension TitleSupplementaryView {
24 | func configure() {
25 | addSubview(label)
26 | label.translatesAutoresizingMaskIntoConstraints = false
27 | label.adjustsFontForContentSizeCategory = true
28 | let inset = CGFloat(10)
29 | NSLayoutConstraint.activate([
30 | label.leadingAnchor.constraint(equalTo: leadingAnchor, constant: inset),
31 | label.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -inset),
32 | label.topAnchor.constraint(equalTo: topAnchor, constant: inset),
33 | label.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -inset)
34 | ])
35 | label.font = UIFont.preferredFont(forTextStyle: .title3)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Example/Example/Samples from Apple/Diffable/Cells And Supplementary Views/LabelCell.swift:
--------------------------------------------------------------------------------
1 | /*
2 | See LICENSE folder for this sample’s licensing information.
3 |
4 | Abstract:
5 | Generic label cell
6 | */
7 |
8 | import UIKit
9 |
10 | class LabelCell: UICollectionViewCell {
11 | static let reuseIdentifier = "label-cell-reuse-identifier"
12 | let label = UILabel()
13 |
14 | override init(frame: CGRect) {
15 | super.init(frame: frame)
16 | configure()
17 | }
18 | required init?(coder: NSCoder) {
19 | fatalError("not implemented")
20 | }
21 | }
22 |
23 | extension LabelCell {
24 | func configure() {
25 | label.translatesAutoresizingMaskIntoConstraints = false
26 | contentView.addSubview(label)
27 | label.font = UIFont.preferredFont(forTextStyle: .body)
28 | label.adjustsFontForContentSizeCategory = true
29 | layer.borderWidth = 1
30 | layer.borderColor = UIColor.systemGray2.cgColor
31 | let inset = CGFloat(10)
32 | NSLayoutConstraint.activate([
33 | label.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: inset),
34 | label.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -inset),
35 | label.centerYAnchor.constraint(equalTo: contentView.centerYAnchor)
36 | ])
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Example/Example/Samples from IceFloe:UICollectionViewCompositionalLayout/Cells/ListCell2.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ListCell.swift
3 | // UICollectionViewCompositionalLayout
4 | //
5 | // Created by Alex Gurin on 8/25/19.
6 | //
7 |
8 | import UIKit
9 |
10 | class ListCell2: UICollectionViewCell {
11 | static let reuseIdentifier = "ListCell"
12 |
13 | @IBOutlet weak var label: UILabel!
14 | @IBOutlet weak var imageView: UIImageView!
15 |
16 | override func awakeFromNib() {
17 | super.awakeFromNib()
18 | // Initialization code
19 | }
20 |
21 | func configureWith(text: String, image: UIImage?) {
22 | label.text = text
23 | imageView.image = image
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Example/Example/Samples from IceFloe:UICollectionViewCompositionalLayout/Views/BackgroundView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BackgroundView.swift
3 | // UICollectionViewCompositionalLayout
4 | //
5 | // Created by Alex Gurin on 8/28/19.
6 | //
7 |
8 | import UIKit
9 |
10 | class BackgroundView: UICollectionReusableView {
11 |
12 | override init(frame: CGRect) {
13 | super.init(frame: frame)
14 | configure()
15 | }
16 | required init?(coder: NSCoder) {
17 | fatalError("not implemented")
18 | }
19 | }
20 |
21 | extension BackgroundView {
22 | func configure() {
23 | backgroundColor = UIColor.white.withAlphaComponent(1)
24 | layer.borderColor = UIColor.black.cgColor
25 | layer.borderWidth = 0
26 | layer.cornerRadius = 12
27 | layer.shadowColor = UIColor.black.cgColor
28 | layer.shadowRadius = 5
29 | layer.shadowOpacity = 1
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Example/Example/Samples from IceFloe:UICollectionViewCompositionalLayout/Views/CheckmarkView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CheckmarkView.swift
3 | // UICollectionViewCompositionalLayout
4 | //
5 | // Created by Alex Gurin on 8/27/19.
6 | //
7 |
8 | import UIKit
9 |
10 | class CheckmarkView: UICollectionReusableView {
11 |
12 | static let reuseIdentifier = "CheckmarkView"
13 |
14 | override func awakeFromNib() {
15 | super.awakeFromNib()
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/Example/Example/Samples from IceFloe:UICollectionViewCompositionalLayout/Views/TitleView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TitleView.swift
3 | // UICollectionViewCompositionalLayout
4 | //
5 | // Created by Alex Gurin on 8/28/19.
6 | //
7 |
8 | import UIKit
9 |
10 | class TitleView: UICollectionReusableView {
11 | @IBOutlet weak var titleLbl: UILabel!
12 |
13 | static let reuseIdentifier = "TitleView"
14 |
15 | override func awakeFromNib() {
16 | super.awakeFromNib()
17 |
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/Example/Example/Samples from jVirus:compositional-layouts-kit/Factories/ImageFactory.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ImageFactory.swift
3 | // compositional-layouts-kit
4 | //
5 | // Created by Astemir Eleev on 19/06/2019.
6 | // Copyright © 2019 Astemir Eleev. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | struct ImageFactory {
12 |
13 | enum Mode {
14 | case random
15 | case next
16 | }
17 |
18 | private static var index: Int = 0
19 | private static let maxIndex: Int = ImageNamesDataSource.names.count
20 |
21 | static func produce(using mode: Mode = .random) -> UIImage? {
22 | let size = CGSize(width: 10, height: 10)
23 | let renderer = UIGraphicsImageRenderer(size: size)
24 | return renderer.image(actions: { rendererContext in
25 | UIColor.cornflowerBlue.setFill()
26 | rendererContext.fill(CGRect(x: 0, y: 0, width: size.width, height: size.height))
27 | })
28 | }
29 |
30 | static func resetPoitingIndex() {
31 | index = 0
32 | }
33 |
34 | static func incrementPointingIndex() {
35 | index = (index + 1) % maxIndex
36 | }
37 | }
38 |
39 | struct ImageNamesDataSource {
40 | static var names: [String] = [
41 | "1-1", "1-2", "1-3", "1-4", "1-5", "1-6", "1-7", "1-8", "1-9", "1-10", "1-11", "1-12", "1-13", "1-14", "1-15", "1-16", "1-17", "1-18", "1-19", "1-20"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/Example/Example/Samples from jVirus:compositional-layouts-kit/Models/ImageModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ImageModel.swift
3 | // compositional-layouts-kit
4 | //
5 | // Created by Astemir Eleev on 20/06/2019.
6 | // Copyright © 2019 Astemir Eleev. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | struct ImageModel: Hashable {
12 | let image: UIImage
13 | let identifier = UUID()
14 |
15 | func hash(into hasher: inout Hasher) {
16 | hasher.combine(identifier)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Example/Example/Samples from jVirus:compositional-layouts-kit/Protocols/Configurable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Configurable.swift
3 | // compositional-layouts-kit
4 | //
5 | // Created by Astemir Eleev on 19/06/2019.
6 | // Copyright © 2019 Astemir Eleev. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | protocol Configurable {
12 | func configure()
13 | }
14 |
--------------------------------------------------------------------------------
/Example/Example/Samples from jVirus:compositional-layouts-kit/Protocols/ReuseIdentifiable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ReuseIdentifiable.swift
3 | // compositional-layouts-kit
4 | //
5 | // Created by Astemir Eleev on 19/06/2019.
6 | // Copyright © 2019 Astemir Eleev. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | protocol ReuseIdentifiable {
12 | static var reuseIdentifier: String { get }
13 | }
14 |
15 | extension ReuseIdentifiable {
16 | static var reuseIdentifier: String {
17 | return String(describing: self)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Example/Example/UIKitInteroperability.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | extension UIColor {
4 | static var systemBackground: UIColor {
5 | let lightColor = UIColor.white
6 | let darkColor = UIColor.black
7 | if #available(iOS 13.0, *) {
8 | return UIColor { $0.userInterfaceStyle == .light ? lightColor : darkColor }
9 | }
10 | return lightColor
11 | }
12 | static var placeholderText: UIColor {
13 | let lightColor = UIColor(red: 235/255, green: 235/255, blue: 245/255, alpha: 0.3)
14 | let darkColor = UIColor(red: 60/255, green: 60/255, blue: 67/255, alpha: 0.3)
15 | if #available(iOS 13.0, *) {
16 | return UIColor { $0.userInterfaceStyle == .light ? lightColor : darkColor }
17 | }
18 | return lightColor
19 | }
20 | static var systemGray2: UIColor {
21 | let lightColor = UIColor(red: 174/255, green: 174/255, blue: 178/255, alpha: 1)
22 | let darkColor = UIColor(red: 99/255, green: 99/255, blue: 102/255, alpha: 1)
23 | if #available(iOS 13.0, *) {
24 | return UIColor { $0.userInterfaceStyle == .light ? lightColor : darkColor }
25 | }
26 | return lightColor
27 | }
28 | }
29 |
30 | extension UIImage {
31 | convenience init?(systemName: String) {
32 | self.init(named: systemName)
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/HostApp/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | class AppDelegate: UIResponder, UIApplicationDelegate {}
5 |
--------------------------------------------------------------------------------
/HostApp/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/IBPCollectionViewCompositionalLayout.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'IBPCollectionViewCompositionalLayout'
3 | s.version = '0.6.9'
4 | s.summary = 'Backport of UICollectionViewCompositionalLayout to earlier iOS 12.'
5 | s.description = <<-DESC
6 | A new UICollectionViewCompositionalLayout class has been added to UIKit to make it incredibly easier to create custom complex collection view layout.
7 | You can use new excellent APIs immediately without maintaining two different code bases until iOS 13 would be widely adopted.
8 | DESC
9 | s.homepage = "https://github.com/kishikawakatsumi/#{s.name}"
10 | s.ios.deployment_target = '10.0'
11 | s.source_files = 'Sources/**/*.{h,m}'
12 | s.public_header_files = "Sources/#{s.name}/include/*.h"
13 | s.frameworks = 'UIKit'
14 | s.source = { :git => "https://github.com/kishikawakatsumi/#{s.name}.git", :tag => "v#{s.version}" }
15 | s.license = { :type => 'MIT', :file => 'LICENSE' }
16 | s.author = { 'Kishikawa Katsumi' => 'kishikawakatsumi@mac.com' }
17 | s.social_media_url = 'https://twitter.com/k_katsumi'
18 | end
19 |
--------------------------------------------------------------------------------
/IBPCollectionViewCompositionalLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/IBPCollectionViewCompositionalLayout.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/IBPCollectionViewCompositionalLayout.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/IBPCollectionViewCompositionalLayout.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Kishikawa Katsumi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.1
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "IBPCollectionViewCompositionalLayout",
7 | platforms: [.iOS(.v10)],
8 | products: [
9 | .library(
10 | name: "IBPCollectionViewCompositionalLayout",
11 | targets: ["IBPCollectionViewCompositionalLayout"]),
12 | ],
13 | dependencies: [],
14 | targets: [
15 | .target(
16 | name: "IBPCollectionViewCompositionalLayout",
17 | dependencies: []),
18 | .testTarget(
19 | name: "IBPCollectionViewCompositionalLayoutTests",
20 | dependencies: ["IBPCollectionViewCompositionalLayout"]),
21 | ]
22 | )
23 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPCollectionCompositionalLayoutSolver.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class IBPNSCollectionLayoutContainer;
4 | @class IBPNSCollectionLayoutItem;
5 | @class IBPNSCollectionLayoutSection;
6 | @class IBPUICollectionViewCompositionalLayoutConfiguration;
7 |
8 | NS_ASSUME_NONNULL_BEGIN
9 |
10 | @interface IBPCollectionCompositionalLayoutSolver : NSObject
11 |
12 | @property (nonatomic, readonly, copy) IBPNSCollectionLayoutSection *layoutSection;
13 | @property (nonatomic, readonly) CGRect layoutFrame;
14 |
15 | + (instancetype)solverWithLayoutSection:(IBPNSCollectionLayoutSection *)section
16 | scrollDirection:(UICollectionViewScrollDirection)scrollDirection;
17 |
18 | - (void)solveForContainer:(IBPNSCollectionLayoutContainer *)container
19 | traitCollection:(UITraitCollection *)traitCollection;
20 |
21 | - (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath;
22 | - (IBPNSCollectionLayoutItem *)layoutItemAtIndexPath:(NSIndexPath *)indexPath;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPCollectionCompositionalLayoutSolverResult.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class IBPNSCollectionLayoutItem;
4 |
5 | NS_ASSUME_NONNULL_BEGIN
6 |
7 | @interface IBPCollectionCompositionalLayoutSolverResult : NSObject
8 |
9 | @property (nonatomic, nullable) IBPNSCollectionLayoutItem *layoutItem;
10 | @property (nonatomic) CGRect frame;
11 |
12 | + (instancetype)resultWithLayoutItem:(nullable IBPNSCollectionLayoutItem *)layoutItem frame:(CGRect)frame;
13 |
14 | @end
15 |
16 | NS_ASSUME_NONNULL_END
17 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPCollectionCompositionalLayoutSolverResult.m:
--------------------------------------------------------------------------------
1 | #import "IBPCollectionCompositionalLayoutSolverResult.h"
2 |
3 | @implementation IBPCollectionCompositionalLayoutSolverResult
4 |
5 | + (instancetype)resultWithLayoutItem:(IBPNSCollectionLayoutItem *)layoutItem frame:(CGRect)frame {
6 | return [[IBPCollectionCompositionalLayoutSolverResult alloc] initWithLayoutItem:layoutItem frame:frame];
7 | }
8 |
9 | - (instancetype)initWithLayoutItem:(IBPNSCollectionLayoutItem *)layoutItem frame:(CGRect)frame {
10 | self = [super init];
11 | if (self) {
12 | self.layoutItem = layoutItem;
13 | self.frame = frame;
14 | }
15 | return self;
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPCollectionViewOrthogonalScrollerEmbeddedScrollView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @interface IBPCollectionViewOrthogonalScrollerEmbeddedScrollView : UICollectionView
6 |
7 | @end
8 |
9 | NS_ASSUME_NONNULL_END
10 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPCollectionViewOrthogonalScrollerEmbeddedScrollView.m:
--------------------------------------------------------------------------------
1 | #import "IBPCollectionViewOrthogonalScrollerEmbeddedScrollView.h"
2 |
3 | @interface IBPCollectionViewOrthogonalScrollerEmbeddedScrollView()
4 |
5 | @end
6 |
7 | @implementation IBPCollectionViewOrthogonalScrollerEmbeddedScrollView
8 |
9 | @end
10 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPCollectionViewOrthogonalScrollerSectionController.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @interface IBPCollectionViewOrthogonalScrollerSectionController: NSObject
6 |
7 | @property (nonatomic, weak) UICollectionView *collectionView;
8 | @property (nonatomic) UICollectionView *scrollView;
9 | @property (nonatomic) NSInteger sectionIndex;
10 |
11 | - (instancetype)initWithSectionIndex:(NSInteger)sectionIndex
12 | collectionView:(UICollectionView *)collectionView
13 | scrollView:(UICollectionView *)scrollView;
14 |
15 | - (void)removeFromSuperview;
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutAnchor_Private.h:
--------------------------------------------------------------------------------
1 | #import "IBPNSCollectionLayoutAnchor.h"
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @interface IBPNSCollectionLayoutAnchor()
6 |
7 | + (instancetype)layoutAnchorWithAnchorPoint:(CGPoint)anchorPoint;
8 | + (instancetype)layoutAnchorWithAnchorPoint:(CGPoint)anchorPoint offset:(CGPoint)offset;
9 | + (instancetype)layoutAnchorWithAnchorPoint:(CGPoint)anchorPoint unitOffset:(CGPoint)unitOffset;
10 |
11 | - (CGRect)itemFrameForContainerRect:(CGRect)containerRect
12 | itemSize:(CGSize)itemSize
13 | itemLayoutAnchor:(nullable IBPNSCollectionLayoutAnchor *)itemLayoutAnchor;
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutContainer.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "IBPNSCollectionLayoutContainer_Protocol.h"
3 |
4 | NS_ASSUME_NONNULL_BEGIN
5 |
6 | @interface IBPNSCollectionLayoutContainer : NSObject
7 |
8 | @property (nonatomic, readonly) IBPNSDirectionalEdgeInsets contentInsets;
9 | @property (nonatomic, readonly) CGSize contentSize;
10 | @property (nonatomic, readonly) IBPNSDirectionalEdgeInsets effectiveContentInsets;
11 | @property (nonatomic, readonly) CGSize effectiveContentSize;
12 |
13 | - (instancetype)initWithContentSize:(CGSize)contentSize contentInsets:(IBPNSDirectionalEdgeInsets)contentInsets;
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutDecorationItem.m:
--------------------------------------------------------------------------------
1 | #import "IBPNSCollectionLayoutDecorationItem.h"
2 |
3 | @interface IBPNSCollectionLayoutDecorationItem()
4 |
5 | @property (nonatomic, readwrite) NSString *elementKind;
6 |
7 | @end
8 |
9 | @implementation IBPNSCollectionLayoutDecorationItem
10 |
11 | + (instancetype)backgroundDecorationItemWithElementKind:(NSString *)elementKind {
12 | if (@available(iOS 13, *)) {
13 | return [NSClassFromString(@"NSCollectionLayoutDecorationItem") backgroundDecorationItemWithElementKind:elementKind];
14 | } else {
15 | return [[self alloc] initWithElementKind:elementKind];
16 | }
17 | }
18 |
19 | - (instancetype)initWithElementKind:(NSString *)elementKind {
20 | self = [super init];
21 | if (self) {
22 | self.elementKind = elementKind;
23 | }
24 | return self;
25 | }
26 |
27 | - (nonnull id)copyWithZone:(nullable NSZone *)zone {
28 | IBPNSCollectionLayoutDecorationItem *item = [IBPNSCollectionLayoutDecorationItem backgroundDecorationItemWithElementKind:self.elementKind];
29 | item.zIndex = self.zIndex;
30 | item.contentInsets = self.contentInsets;
31 | return item;
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutEdgeSpacing_Private.h:
--------------------------------------------------------------------------------
1 | #import "IBPNSCollectionLayoutEdgeSpacing.h"
2 | #import "IBPNSDirectionalEdgeInsets.h"
3 | #import "IBPNSDirectionalRectEdge.h"
4 |
5 | NS_ASSUME_NONNULL_BEGIN
6 |
7 | @interface IBPNSCollectionLayoutEdgeSpacing()
8 |
9 | + (instancetype)defaultSpacing;
10 | + (instancetype)flexibleSpacing:(CGFloat)spacing;
11 | + (instancetype)fixedSpacing:(CGFloat)spacing;
12 |
13 | - (BOOL)hasSpacing;
14 | - (IBPNSDirectionalEdgeInsets)edgeOutsets;
15 | - (BOOL)isSpacingFlexibleForEdge:(IBPNSDirectionalRectEdge)edge;
16 | - (BOOL)isSpacingFixedForEdge:(IBPNSDirectionalRectEdge)edge;
17 | - (CGFloat)spacingForEdge:(IBPNSDirectionalRectEdge)edge;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutEnvironment.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "IBPNSCollectionLayoutEnvironment_Protocol.h"
3 |
4 | NS_ASSUME_NONNULL_BEGIN
5 |
6 | @interface IBPNSCollectionLayoutEnvironment : NSObject
7 |
8 | @property(nonatomic, readwrite) id container;
9 | @property(nonatomic, readwrite) UITraitCollection *traitCollection;
10 |
11 | @end
12 |
13 | NS_ASSUME_NONNULL_END
14 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutEnvironment.m:
--------------------------------------------------------------------------------
1 | #import "IBPNSCollectionLayoutEnvironment.h"
2 |
3 | @implementation IBPNSCollectionLayoutEnvironment
4 |
5 | @end
6 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutGroupCustomItem.m:
--------------------------------------------------------------------------------
1 | #import "IBPNSCollectionLayoutGroupCustomItem.h"
2 |
3 | @interface IBPNSCollectionLayoutGroupCustomItem()
4 |
5 | @property (nonatomic, readwrite) CGRect frame;
6 | @property (nonatomic, readwrite) NSInteger zIndex;
7 |
8 | @end
9 |
10 | @implementation IBPNSCollectionLayoutGroupCustomItem
11 |
12 | + (instancetype)customItemWithFrame:(CGRect)frame {
13 | if (@available(iOS 13, *)) {
14 | return [NSClassFromString(@"NSCollectionLayoutGroupCustomItem") customItemWithFrame:frame];
15 | } else {
16 | return [self customItemWithFrame:frame zIndex:0];
17 | }
18 | }
19 |
20 | + (instancetype)customItemWithFrame:(CGRect)frame zIndex:(NSInteger)zIndex {
21 | if (@available(iOS 13, *)) {
22 | return [NSClassFromString(@"NSCollectionLayoutGroupCustomItem") customItemWithFrame:frame zIndex:zIndex];
23 | } else {
24 | return [[self alloc] initWithFrame:frame zIndex:zIndex];
25 | }
26 | }
27 |
28 | - (instancetype)initWithFrame:(CGRect)frame zIndex:(NSInteger)zIndex {
29 | self = [super init];
30 | if (self) {
31 | self.frame = frame;
32 | self.zIndex = zIndex;
33 | }
34 | return self;
35 | }
36 |
37 | - (nonnull id)copyWithZone:(nullable NSZone *)zone {
38 | return [IBPNSCollectionLayoutGroupCustomItem customItemWithFrame:self.frame zIndex:self.zIndex];
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutGroup_Private.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "IBPNSCollectionLayoutGroup.h"
3 |
4 | typedef NS_ENUM(NSInteger, IBPGroupLayoutDirection) {
5 | IBPGroupLayoutDirectionHorizontal = 0,
6 | IBPGroupLayoutDirectionVertical = 1,
7 | IBPGroupLayoutDirectionCustom = 2,
8 | };
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | @interface IBPNSCollectionLayoutGroup()
13 |
14 | @property (nonatomic, readwrite, copy) NSArray *subitems;
15 | @property (nonatomic, readwrite) IBPGroupLayoutDirection layoutDirection;
16 | @property (nonatomic, readwrite) NSInteger count;
17 | @property (nonatomic, readwrite, copy) IBPNSCollectionLayoutGroupCustomItemProvider customGroupItemProvider;
18 |
19 | - (IBPNSCollectionLayoutSize *)effectiveSizeForSize:(IBPNSCollectionLayoutSize *)size
20 | count:(NSInteger)count
21 | layoutDirection:(IBPGroupLayoutDirection)layoutDirection;
22 | - (BOOL)isHorizontalGroup;
23 | - (BOOL)isVerticalGroup;
24 | - (BOOL)isCustomGroup;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutSection_Private.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "IBPNSCollectionLayoutSection.h"
3 |
4 | NS_ASSUME_NONNULL_BEGIN
5 |
6 | @interface IBPNSCollectionLayoutSection()
7 |
8 | @property (nonatomic, copy) IBPNSCollectionLayoutGroup *group;
9 | @property (nonatomic, readonly) BOOL scrollsOrthogonally;
10 | @property (nonatomic, readonly) BOOL hasBackgroundDecorationItem;
11 |
12 | @end
13 |
14 | NS_ASSUME_NONNULL_END
15 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutSize_Private.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "IBPNSCollectionLayoutSize.h"
3 |
4 | @protocol IBPNSCollectionLayoutContainer;
5 |
6 | NS_ASSUME_NONNULL_BEGIN
7 |
8 | @interface IBPNSCollectionLayoutSize()
9 |
10 | - (CGSize)effectiveSizeForContainer:(id)container;
11 | - (CGSize)effectiveSizeForContainer:(id)container ignoringInsets:(BOOL)ignoringInsets;
12 |
13 | @end
14 |
15 | NS_ASSUME_NONNULL_END
16 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutSpacing_Private.h:
--------------------------------------------------------------------------------
1 | #import "IBPNSCollectionLayoutSpacing.h"
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @interface IBPNSCollectionLayoutSpacing()
6 |
7 | + (instancetype)defaultSpacing;
8 |
9 | - (instancetype)initWithSpacing:(CGFloat)spacing isFlexible:(BOOL)isFlexible;
10 | - (BOOL)hasSpacing;
11 |
12 | @end
13 |
14 | NS_ASSUME_NONNULL_END
15 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSCollectionLayoutSupplementaryItem_Private.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "IBPNSCollectionLayoutSupplementaryItem.h"
3 |
4 | NS_ASSUME_NONNULL_BEGIN
5 |
6 | @interface IBPNSCollectionLayoutSupplementaryItem()
7 |
8 | @property (nonatomic, readwrite) NSString *elementKind;
9 | @property (nonatomic, readwrite) IBPNSCollectionLayoutAnchor *containerAnchor;
10 | @property (nonatomic, readwrite, nullable) IBPNSCollectionLayoutAnchor *itemAnchor;
11 |
12 | - (instancetype)initWithSize:(IBPNSCollectionLayoutSize *)size
13 | contentInsets:(IBPNSDirectionalEdgeInsets)contentInsets
14 | elementKind:(NSString *)elementKind
15 | containerAnchor:(IBPNSCollectionLayoutAnchor *)containerAnchor
16 | itemAnchor:(nullable IBPNSCollectionLayoutAnchor *)itemAnchor
17 | zIndex:(NSInteger)zIndex;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPNSDirectionalEdgeInsets.m:
--------------------------------------------------------------------------------
1 | #import "IBPNSDirectionalEdgeInsets.h"
2 |
3 | const IBPNSDirectionalEdgeInsets IBPNSDirectionalEdgeInsetsZero = {0, 0, 0, 0};
4 | NSString *IBPNSStringFromDirectionalEdgeInsets(IBPNSDirectionalEdgeInsets insets) {
5 | if (@available(iOS 11, *)) {
6 | return NSStringFromDirectionalEdgeInsets(NSDirectionalEdgeInsetsMake(insets.top, insets.leading, insets.bottom, insets.trailing));
7 | } else {
8 | return NSStringFromUIEdgeInsets(UIEdgeInsetsMake(insets.top, insets.leading, insets.bottom, insets.trailing));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/IBPUICollectionViewCompositionalLayoutConfiguration_Private.h:
--------------------------------------------------------------------------------
1 | #import "IBPUICollectionViewCompositionalLayoutConfiguration.h"
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @interface IBPUICollectionViewCompositionalLayoutConfiguration()
6 |
7 | + (instancetype)defaultConfiguration;
8 | - (instancetype)initWithScrollDirection:(UICollectionViewScrollDirection)scrollDirection
9 | interSectionSpacing:(CGFloat)interSectionSpacing
10 | boundarySupplementaryItems:(NSArray *)boundarySupplementaryItems;
11 |
12 | @end
13 |
14 | NS_ASSUME_NONNULL_END
15 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPCollectionViewCompositionalLayout.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | FOUNDATION_EXPORT double IBPCollectionViewCompositionalLayoutVersionNumber;
4 | FOUNDATION_EXPORT const unsigned char IBPCollectionViewCompositionalLayoutVersionString[];
5 |
6 | #import "IBPNSCollectionLayoutAnchor.h"
7 | #import "IBPNSCollectionLayoutBoundarySupplementaryItem.h"
8 | #import "IBPNSCollectionLayoutContainer_Protocol.h"
9 | #import "IBPNSCollectionLayoutDecorationItem.h"
10 | #import "IBPNSCollectionLayoutDimension.h"
11 | #import "IBPNSCollectionLayoutEdgeSpacing.h"
12 | #import "IBPNSCollectionLayoutEnvironment_Protocol.h"
13 | #import "IBPNSCollectionLayoutForwardCompatibility.h"
14 | #import "IBPNSCollectionLayoutGroup.h"
15 | #import "IBPNSCollectionLayoutGroupCustomItem.h"
16 | #import "IBPNSCollectionLayoutItem.h"
17 | #import "IBPNSCollectionLayoutSection.h"
18 | #import "IBPUICollectionLayoutSectionOrthogonalScrollingBehavior.h"
19 | #import "IBPNSCollectionLayoutSize.h"
20 | #import "IBPNSCollectionLayoutSpacing.h"
21 | #import "IBPNSCollectionLayoutSupplementaryItem.h"
22 | #import "IBPNSCollectionLayoutVisibleItem.h"
23 | #import "IBPNSDirectionalEdgeInsets.h"
24 | #import "IBPNSDirectionalRectEdge.h"
25 | #import "IBPNSRectAlignment.h"
26 | #import "IBPUICollectionViewCompositionalLayout.h"
27 | #import "IBPUICollectionViewCompositionalLayoutConfiguration.h"
28 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSCollectionLayoutContainer_Protocol.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "IBPNSDirectionalEdgeInsets.h"
3 |
4 | NS_ASSUME_NONNULL_BEGIN
5 |
6 | @protocol IBPNSCollectionLayoutContainer
7 |
8 | @property (nonatomic, readonly) CGSize contentSize; // resolved size of container (before any insets are applied)
9 | @property (nonatomic, readonly) CGSize effectiveContentSize; // after insets are applied
10 | @property (nonatomic, readonly) IBPNSDirectionalEdgeInsets contentInsets; // values < 1.0 are interpreted as fractional values (e.g. leading:0.15 == 15% width)
11 | @property (nonatomic, readonly) IBPNSDirectionalEdgeInsets effectiveContentInsets; // resolved value after resolving any unit values
12 |
13 | @end
14 |
15 | NS_ASSUME_NONNULL_END
16 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSCollectionLayoutDimension.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @interface IBPNSCollectionLayoutDimension : NSObject
6 |
7 | // dimension is computed as a fraction of the width of the containing group
8 | + (instancetype)fractionalWidthDimension:(CGFloat)fractionalWidth NS_SWIFT_NAME(fractionalWidth(_:));
9 |
10 | // dimension is computed as a fraction of the height of the containing group
11 | + (instancetype)fractionalHeightDimension:(CGFloat)fractionalHeight NS_SWIFT_NAME(fractionalHeight(_:));
12 |
13 | // dimension with an absolute point value
14 | + (instancetype)absoluteDimension:(CGFloat)absoluteDimension NS_SWIFT_NAME(absolute(_:));
15 |
16 | // dimension is estimated with a point value. Actual size will be determined when the content is rendered.
17 | + (instancetype)estimatedDimension:(CGFloat)estimatedDimension NS_SWIFT_NAME(estimated(_:));
18 |
19 | - (instancetype)init NS_UNAVAILABLE;
20 | + (instancetype)new NS_UNAVAILABLE;
21 |
22 | @property (nonatomic, readonly) BOOL isFractionalWidth;
23 | @property (nonatomic, readonly) BOOL isFractionalHeight;
24 | @property (nonatomic, readonly) BOOL isAbsolute;
25 | @property (nonatomic, readonly) BOOL isEstimated;
26 | @property (nonatomic, readonly) CGFloat dimension;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSCollectionLayoutEnvironment_Protocol.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @protocol IBPNSCollectionLayoutContainer;
6 |
7 | @protocol IBPNSCollectionLayoutEnvironment
8 |
9 | @property(nonatomic, readonly) id container;
10 | @property(nonatomic, readonly) UITraitCollection *traitCollection;
11 |
12 | @end
13 |
14 | NS_ASSUME_NONNULL_END
15 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSCollectionLayoutGroupCustomItem.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @class IBPNSCollectionLayoutGroupCustomItem;
6 | @protocol IBPNSCollectionLayoutEnvironment;
7 |
8 | typedef NSArray * _Nonnull (^IBPNSCollectionLayoutGroupCustomItemProvider)(id layoutEnvironment);
9 |
10 | @interface IBPNSCollectionLayoutGroupCustomItem : NSObject
11 |
12 | + (instancetype)customItemWithFrame:(CGRect)frame;
13 | + (instancetype)customItemWithFrame:(CGRect)frame zIndex:(NSInteger)zIndex;
14 |
15 | - (instancetype)init NS_UNAVAILABLE;
16 | + (instancetype)new NS_UNAVAILABLE;
17 |
18 | @property (nonatomic, readonly) CGRect frame;
19 | @property (nonatomic, readonly) NSInteger zIndex;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSCollectionLayoutSize.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class IBPNSCollectionLayoutDimension;
4 |
5 | NS_ASSUME_NONNULL_BEGIN
6 |
7 | @interface IBPNSCollectionLayoutSize : NSObject
8 |
9 | + (instancetype)sizeWithWidthDimension:(IBPNSCollectionLayoutDimension *)width
10 | heightDimension:(IBPNSCollectionLayoutDimension *)height;
11 |
12 | - (instancetype)init NS_UNAVAILABLE;
13 | + (instancetype)new NS_UNAVAILABLE;
14 |
15 | @property (nonatomic, readonly) IBPNSCollectionLayoutDimension *widthDimension;
16 | @property (nonatomic, readonly) IBPNSCollectionLayoutDimension *heightDimension;
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSCollectionLayoutSpacing.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @interface IBPNSCollectionLayoutSpacing : NSObject
6 |
7 | + (instancetype)flexibleSpacing:(CGFloat)flexibleSpacing NS_SWIFT_NAME(flexible(_:)); // i.e. >=
8 | + (instancetype)fixedSpacing:(CGFloat)fixedSpacing NS_SWIFT_NAME(fixed(_:)); // i.e. ==
9 |
10 | - (instancetype)init NS_UNAVAILABLE;
11 | + (instancetype)new NS_UNAVAILABLE;
12 |
13 | @property (nonatomic, readonly) CGFloat spacing;
14 | @property (nonatomic, readonly) BOOL isFlexibleSpacing;
15 | @property (nonatomic, readonly) BOOL isFixedSpacing;
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSCollectionLayoutVisibleItem.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @protocol IBPNSCollectionLayoutVisibleItem
6 |
7 | @property (nonatomic) CGFloat alpha;
8 | @property (nonatomic) NSInteger zIndex;
9 | @property (nonatomic, getter=isHidden) BOOL hidden;
10 | @property (nonatomic) CGPoint center;
11 | @property (nonatomic) CGAffineTransform transform;
12 | @property (nonatomic) CATransform3D transform3D;
13 |
14 | @property (nonatomic, readonly) NSString *name;
15 | @property (nonatomic, readonly) NSIndexPath *indexPath;
16 | @property (nonatomic, readonly) CGRect frame;
17 | @property (nonatomic, readonly) CGRect bounds;
18 | @property (nonatomic, readonly) UICollectionElementCategory representedElementCategory;
19 | @property (nonatomic, readonly, nullable) NSString *representedElementKind;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSDirectionalEdgeInsets.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | typedef struct IBPNSDirectionalEdgeInsets {
4 | CGFloat top, leading, bottom, trailing;
5 | } IBPNSDirectionalEdgeInsets;
6 |
7 | UIKIT_STATIC_INLINE IBPNSDirectionalEdgeInsets IBPNSDirectionalEdgeInsetsMake(CGFloat top, CGFloat leading, CGFloat bottom, CGFloat trailing) {
8 | IBPNSDirectionalEdgeInsets insets = {top, leading, bottom, trailing};
9 | return insets;
10 | }
11 |
12 | UIKIT_EXTERN const IBPNSDirectionalEdgeInsets IBPNSDirectionalEdgeInsetsZero;
13 | UIKIT_EXTERN NSString *IBPNSStringFromDirectionalEdgeInsets(IBPNSDirectionalEdgeInsets insets);
14 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSDirectionalRectEdge.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | typedef NS_OPTIONS(NSUInteger, IBPNSDirectionalRectEdge) {
4 | IBPNSDirectionalRectEdgeNone = 0,
5 | IBPNSDirectionalRectEdgeTop = 1 << 0,
6 | IBPNSDirectionalRectEdgeLeading = 1 << 1,
7 | IBPNSDirectionalRectEdgeBottom = 1 << 2,
8 | IBPNSDirectionalRectEdgeTrailing = 1 << 3,
9 | IBPNSDirectionalRectEdgeAll = IBPNSDirectionalRectEdgeTop | IBPNSDirectionalRectEdgeLeading | IBPNSDirectionalRectEdgeBottom | IBPNSDirectionalRectEdgeTrailing
10 | };
11 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPNSRectAlignment.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | typedef NS_ENUM(NSInteger, IBPNSRectAlignment) {
4 | IBPNSRectAlignmentNone = 0,
5 | IBPNSRectAlignmentTop,
6 | IBPNSRectAlignmentTopLeading,
7 | IBPNSRectAlignmentLeading,
8 | IBPNSRectAlignmentBottomLeading,
9 | IBPNSRectAlignmentBottom,
10 | IBPNSRectAlignmentBottomTrailing,
11 | IBPNSRectAlignmentTrailing,
12 | IBPNSRectAlignmentTopTrailing,
13 | };
14 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/IBPUICollectionViewCompositionalLayoutConfiguration.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class IBPNSCollectionLayoutBoundarySupplementaryItem;
4 |
5 | NS_ASSUME_NONNULL_BEGIN
6 |
7 | @interface IBPUICollectionViewCompositionalLayoutConfiguration : NSObject
8 |
9 | @property (nonatomic) UICollectionViewScrollDirection scrollDirection; // default is UICollectionViewScrollDirectionVertical
10 | @property (nonatomic) CGFloat interSectionSpacing; // default is 0
11 | @property (nonatomic, copy) NSArray *boundarySupplementaryItems;
12 |
13 | @end
14 |
15 | NS_ASSUME_NONNULL_END
16 |
--------------------------------------------------------------------------------
/Sources/IBPCollectionViewCompositionalLayout/include/module.modulemap:
--------------------------------------------------------------------------------
1 | module IBPCollectionViewCompositionalLayout {
2 | umbrella header "IBPCollectionViewCompositionalLayout.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 0.6.9
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Tests/IBPCollectionViewCompositionalLayoutTests/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Tests/IBPCollectionViewCompositionalLayoutTests/Assets.xcassets/chevron.left.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "chevron.left.pdf"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | },
12 | "properties" : {
13 | "preserves-vector-representation" : true
14 | }
15 | }
--------------------------------------------------------------------------------
/Tests/IBPCollectionViewCompositionalLayoutTests/Assets.xcassets/chevron.left.imageset/chevron.left.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Tests/IBPCollectionViewCompositionalLayoutTests/Assets.xcassets/chevron.left.imageset/chevron.left.pdf
--------------------------------------------------------------------------------
/Tests/IBPCollectionViewCompositionalLayoutTests/Assets.xcassets/chevron.right.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "chevron.right.pdf",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Tests/IBPCollectionViewCompositionalLayoutTests/Assets.xcassets/chevron.right.imageset/chevron.right.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout/bb5b8a20892eba40906f45b2b5e4266358b9501b/Tests/IBPCollectionViewCompositionalLayoutTests/Assets.xcassets/chevron.right.imageset/chevron.right.pdf
--------------------------------------------------------------------------------
/Tests/IBPCollectionViewCompositionalLayoutTests/DiffableDataSourceInteroperability.swift:
--------------------------------------------------------------------------------
1 | ../../Example/Example/DiffableDataSourceInteroperability.swift
--------------------------------------------------------------------------------
/Tests/IBPCollectionViewCompositionalLayoutTests/IBPCollectionViewCompositionalLayoutInteroperability.swift:
--------------------------------------------------------------------------------
1 | ../../IBPCollectionViewCompositionalLayoutInteroperability.swift
--------------------------------------------------------------------------------
/Tests/IBPCollectionViewCompositionalLayoutTests/UIKitInteroperability.swift:
--------------------------------------------------------------------------------
1 | ../../Example/Example/UIKitInteroperability.swift
--------------------------------------------------------------------------------
/Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | trigger:
2 | - master
3 | pr:
4 | - master
5 |
6 | variables:
7 | vmImage: 'macOS-10.14'
8 | scheme: 'IBPCollectionViewCompositionalLayout'
9 | sdk: 'iphoneos'
10 | configuration: 'Release'
11 | jobs:
12 | - job: Build
13 | pool:
14 | vmImage: '$(vmImage)'
15 | strategy:
16 | matrix:
17 | xcode11:
18 | DEVELOPER_DIR: /Applications/Xcode_11.app
19 | xcode10:
20 | DEVELOPER_DIR: /Applications/Xcode_10.3.app
21 | steps:
22 | - task: Xcode@5
23 | inputs:
24 | actions: 'build'
25 | scheme: '$(scheme)'
26 | sdk: '$(sdk)'
27 | configuration: '$(configuration)'
28 | xcWorkspacePath: '$(scheme).xcworkspace'
29 | displayName: 'Xcode'
30 | - bash: |
31 | set -ex
32 | xcodebuild -version
33 | pushd $(mktemp -d)
34 | if [[ -z "$(System.PullRequest.SourceRepositoryURI)" ]]; then
35 | echo "github \"kishikawakatsumi/IBPCollectionViewCompositionalLayout\" \"master\"" > Cartfile
36 | else
37 | echo "github \"$(System.PullRequest.SourceRepositoryURI)\" \"$(System.PullRequest.SourceBranch)\"" > Cartfile
38 | fi
39 | carthage update --verbose --no-use-binaries
40 | popd
41 | displayName: 'Carthage'
42 |
--------------------------------------------------------------------------------