├── .gitignore ├── LICENSE ├── Package.swift ├── README.md ├── Sources └── InfinityScrollView │ ├── Model │ ├── InfinityScroll.swift │ └── ItemGeneratable.swift │ ├── VIewModel │ └── InfinityScrollState.swift │ └── View │ ├── DimentionalInfinityScrollView.swift │ ├── DimentionalScrollView.swift │ ├── HorizontalInifinityScrollVIew.swift │ └── VerticalInfinityScrollView.swift ├── SwiftUIInfinityScroll.podspec ├── SwiftUIInfinityScrollExample ├── SwiftUIInfinityScrollExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── SwiftUIInfinityScrollExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── Examples │ ├── DimentionalScrollView.swift │ ├── HorizontalScrollView.swift │ └── VerticalScrollView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift └── Tests ├── LinuxMain.swift └── SwiftUIInfinityScrollTests ├── SwiftUIInfinityScrollTests.swift └── XCTestManifests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | **/Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 松本和也 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 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "SwiftUIInfinityScroll", 8 | products: [ 9 | // Products define the executables and libraries produced by a package, and make them visible to other packages. 10 | .library( 11 | name: "SwiftUIInfinityScroll", 12 | targets: ["SwiftUIInfinityScroll"]), 13 | ], 14 | dependencies: [ 15 | // Dependencies declare other packages that this package depends on. 16 | // .package(url: /* package url */, from: "1.0.0"), 17 | ], 18 | targets: [ 19 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 20 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 21 | .target( 22 | name: "SwiftUIInfinityScroll", 23 | dependencies: []), 24 | .testTarget( 25 | name: "SwiftUIInfinityScrollTests", 26 | dependencies: ["SwiftUIInfinityScroll"]), 27 | ] 28 | ) 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## SwiftUIInfinityScroll 2 | 3 | InfinityScroll view for SwiftUI :tada: 4 | 5 | 6 | 7 | 8 | Vertical | Horizontal 9 | :-------------------------:|:-------------------------: 10 | | 11 | 12 | 13 | 14 | ## Features 15 | 16 | :warning: WARNING :warning: 17 | 18 | Because of lack of Swift UI ScrollView functions, 19 | 20 | Many features aren’t implemented yet :bow: 21 | 22 | (more detail [here](https://medium.com/@matsumotokazuya/implement-infinite-scroll-with-swiftui-cc25d1459878)) 23 | 24 | - [x] Vertical & horizontal infinity scroll 25 | - [ ] Minus page direction scroll 26 | - [ ] Scroll per page by flick 27 | - [ ] Discard invisible page for performance. 28 | 29 | When ScrollView get more functions, I’m implementing these features :muscle: 30 | 31 | ## Requirements 32 | 33 | - iOS 13.0+ 34 | - Xcode 11.0+ 35 | - Swift 5.1+ 36 | 37 | ## Installation 38 | 39 | You can install `SwiftUIInfinityScroll` via CocoaPods by adding the following line to your `Podfile`: 40 | 41 | ```ruby 42 | pod 'SwiftUIInfinityScroll', '~> 0.0.1' 43 | ``` 44 | 45 | Run the `pod install` command to download the library 46 | and integrate it into your Xcode project. 47 | 48 | ## Usage 49 | 1. Define your Item View to show on infinity scroll view. 50 | This class must conform InifinityScrollViewItemable protocol. 51 | 52 | ```swift 53 | struct DoraemonViewItem: InfinityScrollViewItemable { 54 | public var id = UUID() 55 | public var page: Int 56 | var body: some View { 57 | return HStack{ 58 | Image(“doraemon”) 59 | Text(“\(page)”) 60 | } 61 | } 62 | } 63 | ``` 64 | 65 | 2. Define Item generator. Generator class must conform ItemGeneratable protocol to generate a item. 66 | 67 | ```swift 68 | class DoraemonGenerator: ItemGeneratable { 69 | typealias Item = DoraemonViewItem 70 | func generateItem(page: Int) -> DoraemonViewItem { 71 | return DoraemonViewItem(page: page) 72 | } 73 | } 74 | ``` 75 | 76 | 3. Use it in you view. 77 | ```swift 78 | struct DoraemonScrollView_Previews: PreviewProvider { 79 | static var previews: some View { 80 | DoraemonScrollView() 81 | } 82 | } 83 | ``` 84 | 85 | You can instantly check it on [Sample Project](https://github.com/kazuooooo/SwiftUIInfinityScroll/tree/master/SwiftUIInfinityaScrollSample) 86 | 87 | ## Versioning 88 | For the versions available, see the [tags on this repository](https://github.com/kazuooooo/SwiftUIInfinityScroll/tags). 89 | 90 | ## Contributing 91 | Any contributions are Welcome :+1: 92 | 93 | Don't hesitate! 94 | 95 | Fork repo and create PR, please. 96 | 97 | ## Credits 98 | SwiftUIInfinityScroll was ispired by the following projects: 99 | [**WaterfallGrid**](https://github.com/paololeonardi/WaterfallGrid/blob/master/README.md) 100 | 101 | Especially how to compose directory structure and write this README.md :smile_cat: 102 | 103 | ## License 104 | SwiftUIInfinityScroll is available under the MIT license. 105 | 106 | See the [LICENSE](LICENSE) file for more info. 107 | 108 | -------------------------------------------------------------------------------- /Sources/InfinityScrollView/Model/InfinityScroll.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InfinityScroll.swift 3 | // InfinityScrollDev 4 | // 5 | // Created by 松本和也 on 2020/04/09. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | import SwiftUI 12 | 13 | class InfinityScroll: Scroll { 14 | // 表示pageの初期値 15 | // TODO: 16 | // ページを0スタートにする 17 | // 現在のページを表示されていないものも含めて正しく表示させる 18 | var renderPages: CountableClosedRange = -2...2 19 | 20 | var lastPage: Int { 21 | renderPages.upperBound 22 | } 23 | 24 | var firstPage: Int { 25 | renderPages.lowerBound 26 | } 27 | 28 | // Pageをdecrement or incremtnするための閾値 29 | var positionToDecrementPage: CGFloat { 30 | self.pageSize * 1 31 | } 32 | var positionToIncrementPage: CGFloat { 33 | self.pageSize * 3 34 | } 35 | 36 | var pageInInfinity: Int { 37 | Array(self.renderPages)[page] 38 | } 39 | 40 | override func moveBy(value: CGFloat) { 41 | let newPosition = self.lastPosition + value 42 | if(newPosition > self.positionToIncrementPage) { 43 | self.incrementPage() 44 | } 45 | if(newPosition < self.positionToDecrementPage) { 46 | self.decrementPage() 47 | } 48 | self.position = self.correctPositionInRange(position: newPosition) 49 | } 50 | 51 | func incrementPage() { 52 | // pageをincremnt 53 | self.renderPages = (self.firstPage + 1)...(self.lastPage + 1) 54 | self.lastPosition -= self.pageSize 55 | } 56 | 57 | func decrementPage() { 58 | // pageをincremnt 59 | self.renderPages = (self.firstPage - 1)...(self.lastPage - 1) 60 | self.lastPosition += self.pageSize 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Sources/InfinityScrollView/Model/ItemGeneratable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ItemGeneratable.swift 3 | // InfinityScrollDev 4 | // 5 | // Created by 松本和也 on 2020/04/08. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | 12 | public protocol ItemGeneratable { 13 | associatedtype Item: InfinityScrollViewItemable 14 | func generateItem(page: Int) -> Item 15 | } 16 | 17 | public protocol InfinityScrollViewItemable: View, Identifiable { 18 | var page: Int { get } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Sources/InfinityScrollView/VIewModel/InfinityScrollState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InfinityScrollState.swift 3 | // InfinityScrollDev 4 | // 5 | // Created by 松本和也 on 2020/04/09. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | 12 | internal class InfinityScrollState: ScrollState { 13 | /// Dimentional 14 | var infinityHorizontalScroll: InfinityScroll { 15 | self.horizontalScroll as! InfinityScroll 16 | } 17 | var infinityVerticalScroll: InfinityScroll { 18 | self.verticalScroll as! InfinityScroll 19 | } 20 | 21 | init( 22 | pageSize: CGSize, 23 | horizontalScroll: Scroll, 24 | verticalScroll: Scroll 25 | ){ 26 | super.init( 27 | pageSize: pageSize, 28 | horizontalScroll: horizontalScroll, 29 | verticalScroll: verticalScroll 30 | ) 31 | } 32 | 33 | init( 34 | pageSize: CGSize, 35 | horizontalScroll: Scroll 36 | ){ 37 | super.init( 38 | pageSize: pageSize, 39 | horizontalScroll: horizontalScroll 40 | ) 41 | } 42 | 43 | init( 44 | pageSize: CGSize, 45 | verticalScroll: Scroll 46 | ){ 47 | super.init( 48 | pageSize: pageSize, 49 | verticalScroll: verticalScroll 50 | ) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Sources/InfinityScrollView/View/DimentionalInfinityScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DimentionalScrollView.swift 3 | // SwiftUIInfinityScrollExample 4 | // 5 | // Created by 松本和也 on 2020/04/16. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | // これだとItemGeneratorは縦方向のページしか参照していないので 12 | // ItemGeneratorが2次元のページからItemを生成する必要がある 13 | struct DimentionalInfinityScrollView : View { 14 | @EnvironmentObject var scrollState: InfinityScrollState 15 | 16 | var generator: G 17 | 18 | var body: some View { 19 | let verticalScroll = self.scrollState.verticalScroll as! InfinityScroll 20 | let horizontalScroll = self.scrollState.horizontalScroll as! InfinityScroll 21 | return PositionScrollView(scrollState: self.scrollState) { 22 | HStack(spacing: 0) { 23 | ForEach(horizontalScroll.renderPages, id: \.self) { 24 | page in 25 | VStack(spacing: 0) { 26 | ForEach( verticalScroll.renderPages, id: \.self) {page in 27 | self.generator.generateItem(page: page) 28 | } 29 | } 30 | } 31 | } 32 | } 33 | } 34 | } 35 | 36 | struct DimentionalInfinityScrollView_Previews: PreviewProvider { 37 | static var previews: some View { 38 | let scrollState = InfinityScrollState( 39 | pageSize: CGSize(width: 200, height: 200), 40 | horizontalScroll: InfinityScroll( 41 | scrollSetting: ScrollSetting( 42 | pageCount: 5, 43 | // -2〜2の0ページ目 44 | initialPage: 2, 45 | pageSize: 200, 46 | afterMoveType: .unit 47 | ) 48 | ), 49 | verticalScroll: InfinityScroll( 50 | scrollSetting: ScrollSetting( 51 | pageCount: 5, 52 | // -2〜2の0ページ目 53 | initialPage: 2, 54 | pageSize: 200, 55 | afterMoveType: .unit 56 | ) 57 | ) 58 | ) 59 | return DimentionalInfinityScrollView( 60 | generator: RectGenerator() 61 | ).environmentObject(scrollState) 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Sources/InfinityScrollView/View/DimentionalScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DimentionalScrollView.swift 3 | // SwiftUIInfinityScrollExample 4 | // 5 | // Created by 松本和也 on 2020/04/16. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DimentionalInfinityScrollView : View { 12 | @EnvironmentObject var scrollState: InfinityScrollState 13 | 14 | var generator: G 15 | 16 | var body: some View { 17 | let verticalScroll = self.scrollState.verticalScroll as! InfinityScroll 18 | let horizontalScroll = self.scrollState.horizontalScroll as! InfinityScroll 19 | return PositionScrollView(scrollState: self.scrollState) { 20 | HStack(spacing: 0) { 21 | ForEach(horizontalScroll.renderPages, id: \.self) { 22 | page in 23 | VStack(spacing: 0) { 24 | ForEach( verticalScroll.renderPages, id: \.self) {page in 25 | self.generator.generateItem(page: page) 26 | } 27 | } 28 | } 29 | } 30 | } 31 | } 32 | } 33 | 34 | struct DimentionalScrollView_Previews: PreviewProvider { 35 | static var previews: some View { 36 | let scrollState = InfinityScrollState( 37 | pageSize: CGSize(width: 200, height: 200), 38 | horizontalScroll: InfinityScroll( 39 | scrollSetting: ScrollSetting( 40 | pageCount: 5, 41 | // -2〜2の0ページ目 42 | initialPage: 2, 43 | pageSize: 200, 44 | afterMoveType: .unit 45 | ) 46 | ), 47 | verticalScroll: InfinityScroll( 48 | scrollSetting: ScrollSetting( 49 | pageCount: 5, 50 | // -2〜2の0ページ目 51 | initialPage: 2, 52 | pageSize: 200, 53 | afterMoveType: .unit 54 | ) 55 | ) 56 | ) 57 | return DimentionalInfinityScrollView( 58 | generator: RectGenerator() 59 | ).environmentObject(scrollState) 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Sources/InfinityScrollView/View/HorizontalInifinityScrollVIew.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InifinityScrollVIew.swift 3 | // InfinityScrollDev 4 | // 5 | // Created by 松本和也 on 2020/04/08. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import UIKit 11 | 12 | struct HorizontalInfinityScrollView : View { 13 | @EnvironmentObject var scrollState: InfinityScrollState 14 | var generator: G 15 | 16 | 17 | var body: some View { 18 | let scroll = self.scrollState.infinityHorizontalScroll 19 | return PositionScrollView(scrollState: self.scrollState) { 20 | HStack(spacing: 0) { 21 | ForEach( scroll.renderPages, id: \.self) {page in 22 | self.generator.generateItem(page: page) 23 | } 24 | } 25 | } 26 | } 27 | } 28 | 29 | 30 | class RectGenerator: ItemGeneratable { 31 | typealias Item = TestViewItem 32 | func generateItem(page: Int) -> TestViewItem { 33 | return TestViewItem(page: page) 34 | } 35 | } 36 | 37 | struct TestViewItem: InfinityScrollViewItemable { 38 | public var id = UUID() 39 | public var page: Int 40 | var body: some View { 41 | return Text("\(self.page)日") 42 | .frame(width: 200, height: 200) 43 | .border(Color.black) 44 | } 45 | } 46 | 47 | struct InfinityScrollView_Previews: PreviewProvider { 48 | static var previews: some View { 49 | let scrollState = InfinityScrollState( 50 | pageSize: CGSize(width: 200, height: 200), 51 | horizontalScroll: InfinityScroll( 52 | scrollSetting: ScrollSetting( 53 | pageCount: 5, 54 | // -2〜2の0ページ目 55 | initialPage: 2, 56 | pageSize: 200, 57 | afterMoveType: .unit 58 | ) 59 | ) 60 | ) 61 | return HorizontalInfinityScrollView( 62 | generator: RectGenerator() 63 | ).environmentObject(scrollState) 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Sources/InfinityScrollView/View/VerticalInfinityScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VerticalInfinityScrollView.swift 3 | // SwiftUIInfinityScrollExample 4 | // 5 | // Created by 松本和也 on 2020/04/15. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | 12 | struct VerticalInfinityScrollView : View { 13 | @EnvironmentObject var scrollState: InfinityScrollState 14 | 15 | var generator: G 16 | 17 | 18 | var body: some View { 19 | let scroll = self.scrollState.verticalScroll as! InfinityScroll 20 | return PositionScrollView(scrollState: self.scrollState) { 21 | VStack(spacing: 0) { 22 | ForEach( scroll.renderPages, id: \.self) {page in 23 | self.generator.generateItem(page: page) 24 | } 25 | } 26 | } 27 | } 28 | } 29 | 30 | 31 | struct VerticalInfinityScrollView_Previews: PreviewProvider { 32 | static var previews: some View { 33 | let scrollState = InfinityScrollState( 34 | pageSize: CGSize(width: 200, height: 200), 35 | verticalScroll: InfinityScroll( 36 | scrollSetting: ScrollSetting( 37 | pageCount: 5, 38 | // -2〜2の0ページ目 39 | initialPage: 2, 40 | pageSize: 200, 41 | afterMoveType: .unit 42 | ) 43 | ) 44 | ) 45 | return VerticalInfinityScrollView( 46 | generator: RectGenerator() 47 | ).environmentObject(scrollState) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /SwiftUIInfinityScroll.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |spec| 2 | spec.name = "SwiftUIInfinityScroll" 3 | spec.version = "0.0.1" 4 | spec.summary = "Infinity scrollview using SwiftUI" 5 | spec.homepage = "https://github.com/kazuooooo/SwiftUIInfinityScroll" 6 | 7 | spec.license = { :type => "MIT", :file => "LICENSE" } 8 | 9 | spec.author = "Kazuya Matsumoto" 10 | spec.ios.deployment_target = "13.0" 11 | spec.swift_version = '5.1' 12 | 13 | spec.source = { :git => "https://github.com/kazuooooo/SwiftUIInfinityScroll.git", :tag => "#{spec.version}" } 14 | 15 | spec.source_files = "Sources/**/*" 16 | 17 | spec.frameworks = "Foundation", "SwiftUI" 18 | end 19 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B9EF98AF2446CDC70095A3AE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98AE2446CDC70095A3AE /* AppDelegate.swift */; }; 11 | B9EF98B12446CDC70095A3AE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98B02446CDC70095A3AE /* SceneDelegate.swift */; }; 12 | B9EF98B32446CDC70095A3AE /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98B22446CDC70095A3AE /* ContentView.swift */; }; 13 | B9EF98B52446CDC80095A3AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B9EF98B42446CDC80095A3AE /* Assets.xcassets */; }; 14 | B9EF98B82446CDC80095A3AE /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B9EF98B72446CDC80095A3AE /* Preview Assets.xcassets */; }; 15 | B9EF98BB2446CDC80095A3AE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B9EF98B92446CDC80095A3AE /* LaunchScreen.storyboard */; }; 16 | B9EF98D72446CF450095A3AE /* InfinityScrollState.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98D22446CF450095A3AE /* InfinityScrollState.swift */; }; 17 | B9EF98D82446CF450095A3AE /* HorizontalInifinityScrollVIew.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98D32446CF450095A3AE /* HorizontalInifinityScrollVIew.swift */; }; 18 | B9EF98D92446CF450095A3AE /* ItemGeneratable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98D52446CF450095A3AE /* ItemGeneratable.swift */; }; 19 | B9EF98DA2446CF450095A3AE /* InfinityScroll.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98D62446CF450095A3AE /* InfinityScroll.swift */; }; 20 | B9EF98E32446CF6D0095A3AE /* ScrollState.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98DD2446CF6D0095A3AE /* ScrollState.swift */; }; 21 | B9EF98E42446CF6D0095A3AE /* PositionScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98DE2446CF6D0095A3AE /* PositionScrollView.swift */; }; 22 | B9EF98E52446CF6D0095A3AE /* Scroll.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98E02446CF6D0095A3AE /* Scroll.swift */; }; 23 | B9EF98E62446CF6D0095A3AE /* ScrollDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98E12446CF6D0095A3AE /* ScrollDetector.swift */; }; 24 | B9EF98E72446CF6D0095A3AE /* PositionScrollViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EF98E22446CF6D0095A3AE /* PositionScrollViewDelegate.swift */; }; 25 | B9F393FC2446D0B100A79013 /* HorizontalScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F393FB2446D0B100A79013 /* HorizontalScrollView.swift */; }; 26 | B9F393FE2446D55F00A79013 /* ScrollSetting.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F393FD2446D55F00A79013 /* ScrollSetting.swift */; }; 27 | B9F394032446EFEC00A79013 /* VerticalInfinityScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F394022446EFEC00A79013 /* VerticalInfinityScrollView.swift */; }; 28 | B9F394052446F2AF00A79013 /* VerticalScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F394042446F2AF00A79013 /* VerticalScrollView.swift */; }; 29 | B9F39411244820A500A79013 /* DimentionalInfinityScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F39410244820A500A79013 /* DimentionalInfinityScrollView.swift */; }; 30 | B9F394132448234A00A79013 /* DimentionalScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F394122448234900A79013 /* DimentionalScrollView.swift */; }; 31 | /* End PBXBuildFile section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | B9EF98AB2446CDC70095A3AE /* SwiftUIInfinityScrollExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftUIInfinityScrollExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | B9EF98AE2446CDC70095A3AE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 36 | B9EF98B02446CDC70095A3AE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 37 | B9EF98B22446CDC70095A3AE /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 38 | B9EF98B42446CDC80095A3AE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 39 | B9EF98B72446CDC80095A3AE /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 40 | B9EF98BA2446CDC80095A3AE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 41 | B9EF98BC2446CDC80095A3AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42 | B9EF98D22446CF450095A3AE /* InfinityScrollState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InfinityScrollState.swift; sourceTree = ""; }; 43 | B9EF98D32446CF450095A3AE /* HorizontalInifinityScrollVIew.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HorizontalInifinityScrollVIew.swift; sourceTree = ""; }; 44 | B9EF98D52446CF450095A3AE /* ItemGeneratable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemGeneratable.swift; sourceTree = ""; }; 45 | B9EF98D62446CF450095A3AE /* InfinityScroll.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InfinityScroll.swift; sourceTree = ""; }; 46 | B9EF98DD2446CF6D0095A3AE /* ScrollState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScrollState.swift; sourceTree = ""; }; 47 | B9EF98DE2446CF6D0095A3AE /* PositionScrollView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PositionScrollView.swift; sourceTree = ""; }; 48 | B9EF98E02446CF6D0095A3AE /* Scroll.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Scroll.swift; sourceTree = ""; }; 49 | B9EF98E12446CF6D0095A3AE /* ScrollDetector.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScrollDetector.swift; sourceTree = ""; }; 50 | B9EF98E22446CF6D0095A3AE /* PositionScrollViewDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PositionScrollViewDelegate.swift; sourceTree = ""; }; 51 | B9F393FB2446D0B100A79013 /* HorizontalScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HorizontalScrollView.swift; sourceTree = ""; }; 52 | B9F393FD2446D55F00A79013 /* ScrollSetting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollSetting.swift; sourceTree = ""; }; 53 | B9F394022446EFEC00A79013 /* VerticalInfinityScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VerticalInfinityScrollView.swift; sourceTree = ""; }; 54 | B9F394042446F2AF00A79013 /* VerticalScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VerticalScrollView.swift; sourceTree = ""; }; 55 | B9F39410244820A500A79013 /* DimentionalInfinityScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DimentionalInfinityScrollView.swift; sourceTree = ""; }; 56 | B9F394122448234900A79013 /* DimentionalScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DimentionalScrollView.swift; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | B9EF98A82446CDC70095A3AE /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXFrameworksBuildPhase section */ 68 | 69 | /* Begin PBXGroup section */ 70 | B9EF98A22446CDC70095A3AE = { 71 | isa = PBXGroup; 72 | children = ( 73 | B9EF98DB2446CF6D0095A3AE /* PositionScrollView */, 74 | B9EF98CF2446CF450095A3AE /* Sources */, 75 | B9EF98AD2446CDC70095A3AE /* SwiftUIInfinityScrollExample */, 76 | B9EF98AC2446CDC70095A3AE /* Products */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | B9EF98AC2446CDC70095A3AE /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | B9EF98AB2446CDC70095A3AE /* SwiftUIInfinityScrollExample.app */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | B9EF98AD2446CDC70095A3AE /* SwiftUIInfinityScrollExample */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | B9F393FA2446D09700A79013 /* Examples */, 92 | B9EF98AE2446CDC70095A3AE /* AppDelegate.swift */, 93 | B9EF98B02446CDC70095A3AE /* SceneDelegate.swift */, 94 | B9EF98B22446CDC70095A3AE /* ContentView.swift */, 95 | B9EF98B42446CDC80095A3AE /* Assets.xcassets */, 96 | B9EF98B92446CDC80095A3AE /* LaunchScreen.storyboard */, 97 | B9EF98BC2446CDC80095A3AE /* Info.plist */, 98 | B9EF98B62446CDC80095A3AE /* Preview Content */, 99 | ); 100 | path = SwiftUIInfinityScrollExample; 101 | sourceTree = ""; 102 | }; 103 | B9EF98B62446CDC80095A3AE /* Preview Content */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | B9EF98B72446CDC80095A3AE /* Preview Assets.xcassets */, 107 | ); 108 | path = "Preview Content"; 109 | sourceTree = ""; 110 | }; 111 | B9EF98CF2446CF450095A3AE /* Sources */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | B9EF98D02446CF450095A3AE /* InfinityScrollView */, 115 | ); 116 | name = Sources; 117 | path = ../Sources; 118 | sourceTree = ""; 119 | }; 120 | B9EF98D02446CF450095A3AE /* InfinityScrollView */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | B9F394012446EFA900A79013 /* View */, 124 | B9EF98D12446CF450095A3AE /* VIewModel */, 125 | B9EF98D42446CF450095A3AE /* Model */, 126 | ); 127 | path = InfinityScrollView; 128 | sourceTree = ""; 129 | }; 130 | B9EF98D12446CF450095A3AE /* VIewModel */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | B9EF98D22446CF450095A3AE /* InfinityScrollState.swift */, 134 | ); 135 | path = VIewModel; 136 | sourceTree = ""; 137 | }; 138 | B9EF98D42446CF450095A3AE /* Model */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | B9EF98D52446CF450095A3AE /* ItemGeneratable.swift */, 142 | B9EF98D62446CF450095A3AE /* InfinityScroll.swift */, 143 | ); 144 | path = Model; 145 | sourceTree = ""; 146 | }; 147 | B9EF98DB2446CF6D0095A3AE /* PositionScrollView */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | B9EF98DC2446CF6D0095A3AE /* ViewModel */, 151 | B9EF98DE2446CF6D0095A3AE /* PositionScrollView.swift */, 152 | B9EF98DF2446CF6D0095A3AE /* Model */, 153 | ); 154 | name = PositionScrollView; 155 | path = ../../PositionScrollView/Sources/PositionScrollView; 156 | sourceTree = ""; 157 | }; 158 | B9EF98DC2446CF6D0095A3AE /* ViewModel */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | B9EF98DD2446CF6D0095A3AE /* ScrollState.swift */, 162 | ); 163 | path = ViewModel; 164 | sourceTree = ""; 165 | }; 166 | B9EF98DF2446CF6D0095A3AE /* Model */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | B9EF98E02446CF6D0095A3AE /* Scroll.swift */, 170 | B9EF98E12446CF6D0095A3AE /* ScrollDetector.swift */, 171 | B9EF98E22446CF6D0095A3AE /* PositionScrollViewDelegate.swift */, 172 | B9F393FD2446D55F00A79013 /* ScrollSetting.swift */, 173 | ); 174 | path = Model; 175 | sourceTree = ""; 176 | }; 177 | B9F393FA2446D09700A79013 /* Examples */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | B9F393FB2446D0B100A79013 /* HorizontalScrollView.swift */, 181 | B9F394042446F2AF00A79013 /* VerticalScrollView.swift */, 182 | B9F394122448234900A79013 /* DimentionalScrollView.swift */, 183 | ); 184 | path = Examples; 185 | sourceTree = ""; 186 | }; 187 | B9F394012446EFA900A79013 /* View */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | B9EF98D32446CF450095A3AE /* HorizontalInifinityScrollVIew.swift */, 191 | B9F394022446EFEC00A79013 /* VerticalInfinityScrollView.swift */, 192 | B9F39410244820A500A79013 /* DimentionalInfinityScrollView.swift */, 193 | ); 194 | path = View; 195 | sourceTree = ""; 196 | }; 197 | /* End PBXGroup section */ 198 | 199 | /* Begin PBXNativeTarget section */ 200 | B9EF98AA2446CDC70095A3AE /* SwiftUIInfinityScrollExample */ = { 201 | isa = PBXNativeTarget; 202 | buildConfigurationList = B9EF98BF2446CDC80095A3AE /* Build configuration list for PBXNativeTarget "SwiftUIInfinityScrollExample" */; 203 | buildPhases = ( 204 | B9EF98A72446CDC70095A3AE /* Sources */, 205 | B9EF98A82446CDC70095A3AE /* Frameworks */, 206 | B9EF98A92446CDC70095A3AE /* Resources */, 207 | ); 208 | buildRules = ( 209 | ); 210 | dependencies = ( 211 | ); 212 | name = SwiftUIInfinityScrollExample; 213 | productName = SwiftUIInfinityScrollExample; 214 | productReference = B9EF98AB2446CDC70095A3AE /* SwiftUIInfinityScrollExample.app */; 215 | productType = "com.apple.product-type.application"; 216 | }; 217 | /* End PBXNativeTarget section */ 218 | 219 | /* Begin PBXProject section */ 220 | B9EF98A32446CDC70095A3AE /* Project object */ = { 221 | isa = PBXProject; 222 | attributes = { 223 | LastSwiftUpdateCheck = 1140; 224 | LastUpgradeCheck = 1140; 225 | ORGANIZATIONNAME = "松本和也"; 226 | TargetAttributes = { 227 | B9EF98AA2446CDC70095A3AE = { 228 | CreatedOnToolsVersion = 11.4; 229 | }; 230 | }; 231 | }; 232 | buildConfigurationList = B9EF98A62446CDC70095A3AE /* Build configuration list for PBXProject "SwiftUIInfinityScrollExample" */; 233 | compatibilityVersion = "Xcode 9.3"; 234 | developmentRegion = en; 235 | hasScannedForEncodings = 0; 236 | knownRegions = ( 237 | en, 238 | Base, 239 | ); 240 | mainGroup = B9EF98A22446CDC70095A3AE; 241 | productRefGroup = B9EF98AC2446CDC70095A3AE /* Products */; 242 | projectDirPath = ""; 243 | projectRoot = ""; 244 | targets = ( 245 | B9EF98AA2446CDC70095A3AE /* SwiftUIInfinityScrollExample */, 246 | ); 247 | }; 248 | /* End PBXProject section */ 249 | 250 | /* Begin PBXResourcesBuildPhase section */ 251 | B9EF98A92446CDC70095A3AE /* Resources */ = { 252 | isa = PBXResourcesBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | B9EF98BB2446CDC80095A3AE /* LaunchScreen.storyboard in Resources */, 256 | B9EF98B82446CDC80095A3AE /* Preview Assets.xcassets in Resources */, 257 | B9EF98B52446CDC80095A3AE /* Assets.xcassets in Resources */, 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | /* End PBXResourcesBuildPhase section */ 262 | 263 | /* Begin PBXSourcesBuildPhase section */ 264 | B9EF98A72446CDC70095A3AE /* Sources */ = { 265 | isa = PBXSourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | B9EF98AF2446CDC70095A3AE /* AppDelegate.swift in Sources */, 269 | B9EF98B12446CDC70095A3AE /* SceneDelegate.swift in Sources */, 270 | B9EF98DA2446CF450095A3AE /* InfinityScroll.swift in Sources */, 271 | B9F393FE2446D55F00A79013 /* ScrollSetting.swift in Sources */, 272 | B9EF98D72446CF450095A3AE /* InfinityScrollState.swift in Sources */, 273 | B9EF98E32446CF6D0095A3AE /* ScrollState.swift in Sources */, 274 | B9F393FC2446D0B100A79013 /* HorizontalScrollView.swift in Sources */, 275 | B9F394052446F2AF00A79013 /* VerticalScrollView.swift in Sources */, 276 | B9EF98D92446CF450095A3AE /* ItemGeneratable.swift in Sources */, 277 | B9EF98E72446CF6D0095A3AE /* PositionScrollViewDelegate.swift in Sources */, 278 | B9EF98E62446CF6D0095A3AE /* ScrollDetector.swift in Sources */, 279 | B9F39411244820A500A79013 /* DimentionalInfinityScrollView.swift in Sources */, 280 | B9F394132448234A00A79013 /* DimentionalScrollView.swift in Sources */, 281 | B9EF98E42446CF6D0095A3AE /* PositionScrollView.swift in Sources */, 282 | B9EF98D82446CF450095A3AE /* HorizontalInifinityScrollVIew.swift in Sources */, 283 | B9F394032446EFEC00A79013 /* VerticalInfinityScrollView.swift in Sources */, 284 | B9EF98E52446CF6D0095A3AE /* Scroll.swift in Sources */, 285 | B9EF98B32446CDC70095A3AE /* ContentView.swift in Sources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | /* End PBXSourcesBuildPhase section */ 290 | 291 | /* Begin PBXVariantGroup section */ 292 | B9EF98B92446CDC80095A3AE /* LaunchScreen.storyboard */ = { 293 | isa = PBXVariantGroup; 294 | children = ( 295 | B9EF98BA2446CDC80095A3AE /* Base */, 296 | ); 297 | name = LaunchScreen.storyboard; 298 | sourceTree = ""; 299 | }; 300 | /* End PBXVariantGroup section */ 301 | 302 | /* Begin XCBuildConfiguration section */ 303 | B9EF98BD2446CDC80095A3AE /* Debug */ = { 304 | isa = XCBuildConfiguration; 305 | buildSettings = { 306 | ALWAYS_SEARCH_USER_PATHS = NO; 307 | CLANG_ANALYZER_NONNULL = YES; 308 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 309 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 310 | CLANG_CXX_LIBRARY = "libc++"; 311 | CLANG_ENABLE_MODULES = YES; 312 | CLANG_ENABLE_OBJC_ARC = YES; 313 | CLANG_ENABLE_OBJC_WEAK = YES; 314 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 315 | CLANG_WARN_BOOL_CONVERSION = YES; 316 | CLANG_WARN_COMMA = YES; 317 | CLANG_WARN_CONSTANT_CONVERSION = YES; 318 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 319 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 320 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 321 | CLANG_WARN_EMPTY_BODY = YES; 322 | CLANG_WARN_ENUM_CONVERSION = YES; 323 | CLANG_WARN_INFINITE_RECURSION = YES; 324 | CLANG_WARN_INT_CONVERSION = YES; 325 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 326 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 327 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 328 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 329 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 330 | CLANG_WARN_STRICT_PROTOTYPES = YES; 331 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 332 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 333 | CLANG_WARN_UNREACHABLE_CODE = YES; 334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 335 | COPY_PHASE_STRIP = NO; 336 | DEBUG_INFORMATION_FORMAT = dwarf; 337 | ENABLE_STRICT_OBJC_MSGSEND = YES; 338 | ENABLE_TESTABILITY = YES; 339 | GCC_C_LANGUAGE_STANDARD = gnu11; 340 | GCC_DYNAMIC_NO_PIC = NO; 341 | GCC_NO_COMMON_BLOCKS = YES; 342 | GCC_OPTIMIZATION_LEVEL = 0; 343 | GCC_PREPROCESSOR_DEFINITIONS = ( 344 | "DEBUG=1", 345 | "$(inherited)", 346 | ); 347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 349 | GCC_WARN_UNDECLARED_SELECTOR = YES; 350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 351 | GCC_WARN_UNUSED_FUNCTION = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 354 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 355 | MTL_FAST_MATH = YES; 356 | ONLY_ACTIVE_ARCH = YES; 357 | SDKROOT = iphoneos; 358 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 359 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 360 | }; 361 | name = Debug; 362 | }; 363 | B9EF98BE2446CDC80095A3AE /* Release */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ALWAYS_SEARCH_USER_PATHS = NO; 367 | CLANG_ANALYZER_NONNULL = YES; 368 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 369 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 370 | CLANG_CXX_LIBRARY = "libc++"; 371 | CLANG_ENABLE_MODULES = YES; 372 | CLANG_ENABLE_OBJC_ARC = YES; 373 | CLANG_ENABLE_OBJC_WEAK = YES; 374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 375 | CLANG_WARN_BOOL_CONVERSION = YES; 376 | CLANG_WARN_COMMA = YES; 377 | CLANG_WARN_CONSTANT_CONVERSION = YES; 378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 381 | CLANG_WARN_EMPTY_BODY = YES; 382 | CLANG_WARN_ENUM_CONVERSION = YES; 383 | CLANG_WARN_INFINITE_RECURSION = YES; 384 | CLANG_WARN_INT_CONVERSION = YES; 385 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 386 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 387 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 388 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 389 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 390 | CLANG_WARN_STRICT_PROTOTYPES = YES; 391 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 392 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 393 | CLANG_WARN_UNREACHABLE_CODE = YES; 394 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 395 | COPY_PHASE_STRIP = NO; 396 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 397 | ENABLE_NS_ASSERTIONS = NO; 398 | ENABLE_STRICT_OBJC_MSGSEND = YES; 399 | GCC_C_LANGUAGE_STANDARD = gnu11; 400 | GCC_NO_COMMON_BLOCKS = YES; 401 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 402 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 403 | GCC_WARN_UNDECLARED_SELECTOR = YES; 404 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 405 | GCC_WARN_UNUSED_FUNCTION = YES; 406 | GCC_WARN_UNUSED_VARIABLE = YES; 407 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 408 | MTL_ENABLE_DEBUG_INFO = NO; 409 | MTL_FAST_MATH = YES; 410 | SDKROOT = iphoneos; 411 | SWIFT_COMPILATION_MODE = wholemodule; 412 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 413 | VALIDATE_PRODUCT = YES; 414 | }; 415 | name = Release; 416 | }; 417 | B9EF98C02446CDC80095A3AE /* Debug */ = { 418 | isa = XCBuildConfiguration; 419 | buildSettings = { 420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 421 | CODE_SIGN_STYLE = Automatic; 422 | DEVELOPMENT_ASSET_PATHS = "\"SwiftUIInfinityScrollExample/Preview Content\""; 423 | DEVELOPMENT_TEAM = QKJ8U4Q82U; 424 | ENABLE_PREVIEWS = YES; 425 | INFOPLIST_FILE = SwiftUIInfinityScrollExample/Info.plist; 426 | LD_RUNPATH_SEARCH_PATHS = ( 427 | "$(inherited)", 428 | "@executable_path/Frameworks", 429 | ); 430 | PRODUCT_BUNDLE_IDENTIFIER = matsumotokazuya.SwiftUIInfinityScrollExample; 431 | PRODUCT_NAME = "$(TARGET_NAME)"; 432 | SWIFT_VERSION = 5.0; 433 | TARGETED_DEVICE_FAMILY = "1,2"; 434 | }; 435 | name = Debug; 436 | }; 437 | B9EF98C12446CDC80095A3AE /* Release */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 441 | CODE_SIGN_STYLE = Automatic; 442 | DEVELOPMENT_ASSET_PATHS = "\"SwiftUIInfinityScrollExample/Preview Content\""; 443 | DEVELOPMENT_TEAM = QKJ8U4Q82U; 444 | ENABLE_PREVIEWS = YES; 445 | INFOPLIST_FILE = SwiftUIInfinityScrollExample/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = ( 447 | "$(inherited)", 448 | "@executable_path/Frameworks", 449 | ); 450 | PRODUCT_BUNDLE_IDENTIFIER = matsumotokazuya.SwiftUIInfinityScrollExample; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | SWIFT_VERSION = 5.0; 453 | TARGETED_DEVICE_FAMILY = "1,2"; 454 | }; 455 | name = Release; 456 | }; 457 | /* End XCBuildConfiguration section */ 458 | 459 | /* Begin XCConfigurationList section */ 460 | B9EF98A62446CDC70095A3AE /* Build configuration list for PBXProject "SwiftUIInfinityScrollExample" */ = { 461 | isa = XCConfigurationList; 462 | buildConfigurations = ( 463 | B9EF98BD2446CDC80095A3AE /* Debug */, 464 | B9EF98BE2446CDC80095A3AE /* Release */, 465 | ); 466 | defaultConfigurationIsVisible = 0; 467 | defaultConfigurationName = Release; 468 | }; 469 | B9EF98BF2446CDC80095A3AE /* Build configuration list for PBXNativeTarget "SwiftUIInfinityScrollExample" */ = { 470 | isa = XCConfigurationList; 471 | buildConfigurations = ( 472 | B9EF98C02446CDC80095A3AE /* Debug */, 473 | B9EF98C12446CDC80095A3AE /* Release */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | /* End XCConfigurationList section */ 479 | }; 480 | rootObject = B9EF98A32446CDC70095A3AE /* Project object */; 481 | } 482 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SwiftUIInfinityScrollExample 4 | // 5 | // Created by 松本和也 on 2020/04/15. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // SwiftUIInfinityScrollExample 4 | // 5 | // Created by 松本和也 on 2020/04/15. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | var body: some View { 13 | Text("Hello, World!") 14 | } 15 | } 16 | 17 | struct ContentView_Previews: PreviewProvider { 18 | static var previews: some View { 19 | ContentView() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/Examples/DimentionalScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DimentionalScrollView.swift 3 | // SwiftUIInfinityScrollExample 4 | // 5 | // Created by 松本和也 on 2020/04/16. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DimentionalScrollView: View { 12 | @ObservedObject var scrollState = InfinityScrollState( 13 | pageSize: CGSize(width: 200, height: 200), 14 | horizontalScroll: InfinityScroll( 15 | scrollSetting: ScrollSetting( 16 | pageCount: 5, 17 | // -2〜2の0ページ目 18 | initialPage: 2, 19 | pageSize: 200, 20 | afterMoveType: .unit 21 | ) 22 | ), 23 | verticalScroll: InfinityScroll( 24 | scrollSetting: ScrollSetting( 25 | pageCount: 5, 26 | // -2〜2の0ページ目 27 | initialPage: 2, 28 | pageSize: 200, 29 | afterMoveType: .unit 30 | ) 31 | ) 32 | ) 33 | var body: some View { 34 | let horizontalScroll = scrollState.infinityHorizontalScroll 35 | let verticalScroll = scrollState.infinityVerticalScroll 36 | return VStack { 37 | DimentionalInfinityScrollView( 38 | generator: RectGenerator() 39 | ).environmentObject(scrollState) 40 | VStack { 41 | Text("horizontal page: \(horizontalScroll.pageInInfinity)") 42 | }.padding(.top, 20) 43 | VStack { 44 | Text("vertical page: \(verticalScroll.pageInInfinity)") 45 | }.padding(.top, 20) 46 | } 47 | } 48 | } 49 | 50 | struct DimentionalScrollView_Previews: PreviewProvider { 51 | static var previews: some View { 52 | return DimentionalScrollView() 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/Examples/HorizontalScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HorizontalScrollView.swift 3 | // SwiftUIInfinityScrollExample 4 | // 5 | // Created by 松本和也 on 2020/04/15. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct HorizontalScrollView: View { 12 | @State 13 | @ObservedObject var scrollState = InfinityScrollState( 14 | pageSize: CGSize(width: 200, height: 200), 15 | horizontalScroll: InfinityScroll( 16 | scrollSetting: ScrollSetting( 17 | pageCount: 5, 18 | // -2〜2の0ページ目 19 | initialPage: 2, 20 | pageSize: 200, 21 | afterMoveType: .unit 22 | ) 23 | ) 24 | ) 25 | var body: some View { 26 | let scroll = scrollState.infinityHorizontalScroll 27 | return VStack { 28 | HorizontalInfinityScrollView( 29 | generator: RectGenerator() 30 | ).environmentObject(scrollState) 31 | VStack { 32 | Text("page: \(scroll.pageInInfinity)") 33 | }.padding(.top, 20) 34 | } 35 | } 36 | } 37 | 38 | struct HorizontalScrollView_Previews: PreviewProvider { 39 | static var previews: some View { 40 | return HorizontalScrollView() 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/Examples/VerticalScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VerticalScrollView.swift 3 | // SwiftUIInfinityScrollExample 4 | // 5 | // Created by 松本和也 on 2020/04/15. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct VerticalScrollView: View { 12 | @ObservedObject var scrollState = InfinityScrollState( 13 | pageSize: CGSize(width: 200, height: 200), 14 | verticalScroll: InfinityScroll( 15 | scrollSetting: ScrollSetting( 16 | pageCount: 5, 17 | // -2〜2の0ページ目 18 | initialPage: 2, 19 | pageSize: 200, 20 | afterMoveType: .unit 21 | ) 22 | ) 23 | ) 24 | var body: some View { 25 | let scroll = scrollState.infinityVerticalScroll 26 | return VStack { 27 | VerticalInfinityScrollView( 28 | generator: RectGenerator() 29 | ).environmentObject(scrollState) 30 | VStack { 31 | Text("page: \(scroll.pageInInfinity)") 32 | }.padding(.top, 20) 33 | } 34 | } 35 | } 36 | 37 | struct VerticalScrollView_Previews: PreviewProvider { 38 | static var previews: some View { 39 | return VerticalScrollView() 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | 37 | 38 | 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftUIInfinityScrollExample/SwiftUIInfinityScrollExample/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // SwiftUIInfinityScrollExample 4 | // 5 | // Created by 松本和也 on 2020/04/15. 6 | // Copyright © 2020 松本和也. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 21 | 22 | // Create the SwiftUI view that provides the window contents. 23 | let contentView = ContentView() 24 | 25 | // Use a UIHostingController as window root view controller. 26 | if let windowScene = scene as? UIWindowScene { 27 | let window = UIWindow(windowScene: windowScene) 28 | window.rootViewController = UIHostingController(rootView: contentView) 29 | self.window = window 30 | window.makeKeyAndVisible() 31 | } 32 | } 33 | 34 | func sceneDidDisconnect(_ scene: UIScene) { 35 | // Called as the scene is being released by the system. 36 | // This occurs shortly after the scene enters the background, or when its session is discarded. 37 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 38 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 39 | } 40 | 41 | func sceneDidBecomeActive(_ scene: UIScene) { 42 | // Called when the scene has moved from an inactive state to an active state. 43 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 44 | } 45 | 46 | func sceneWillResignActive(_ scene: UIScene) { 47 | // Called when the scene will move from an active state to an inactive state. 48 | // This may occur due to temporary interruptions (ex. an incoming phone call). 49 | } 50 | 51 | func sceneWillEnterForeground(_ scene: UIScene) { 52 | // Called as the scene transitions from the background to the foreground. 53 | // Use this method to undo the changes made on entering the background. 54 | } 55 | 56 | func sceneDidEnterBackground(_ scene: UIScene) { 57 | // Called as the scene transitions from the foreground to the background. 58 | // Use this method to save data, release shared resources, and store enough scene-specific state information 59 | // to restore the scene back to its current state. 60 | } 61 | 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | import SwiftUIInfinityScrollTests 4 | 5 | var tests = [XCTestCaseEntry]() 6 | tests += SwiftUIInfinityScrollTests.allTests() 7 | XCTMain(tests) 8 | -------------------------------------------------------------------------------- /Tests/SwiftUIInfinityScrollTests/SwiftUIInfinityScrollTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import SwiftUIInfinityScroll 3 | 4 | final class SwiftUIInfinityScrollTests: XCTestCase { 5 | func testExample() { 6 | // This is an example of a functional test case. 7 | // Use XCTAssert and related functions to verify your tests produce the correct 8 | // results. 9 | // XCTAssertEqual(SwiftUIInfinityScroll().text, "Hello, World!") 10 | } 11 | 12 | static var allTests = [ 13 | ("testExample", testExample), 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /Tests/SwiftUIInfinityScrollTests/XCTestManifests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | #if !canImport(ObjectiveC) 4 | public func allTests() -> [XCTestCaseEntry] { 5 | return [ 6 | testCase(SwiftUIInfinityScrollTests.allTests), 7 | ] 8 | } 9 | #endif 10 | --------------------------------------------------------------------------------