diff --git a/Examples/ScrollViewLoaderTest.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/ScrollViewLoaderTest.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a2b3493..5f76887 100644 --- a/Examples/ScrollViewLoaderTest.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Examples/ScrollViewLoaderTest.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -2,12 +2,12 @@ "object": { "pins": [ { - "package": "Introspect", + "package": "swiftui-introspect", "repositoryURL": "https://github.com/siteline/SwiftUI-Introspect.git", "state": { "branch": null, - "revision": "c18951c747ab62af7c15e17a81bd37d4fd5a9979", - "version": "0.2.3" + "revision": "1136c9a348329887844de9353107c787becc675b", + "version": "0.11.0" } } ] diff --git a/Package.swift b/Package.swift index 004b4f4..a393106 100644 --- a/Package.swift +++ b/Package.swift @@ -16,13 +16,13 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(name: "Introspect", url: "https://github.com/siteline/SwiftUI-Introspect.git", from: "0.1.4"), + .package(name: "SwiftUIIntrospect", url: "https://github.com/siteline/SwiftUI-Introspect.git", from: "0.11.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "ScrollViewLoader", - dependencies: ["Introspect"]), + dependencies: ["SwiftUIIntrospect"]), ] ) diff --git a/Sources/ScrollViewLoader/ScrollViewLoader.swift b/Sources/ScrollViewLoader/ScrollViewLoader.swift index fe78d0c..c90bbbb 100644 --- a/Sources/ScrollViewLoader/ScrollViewLoader.swift +++ b/Sources/ScrollViewLoader/ScrollViewLoader.swift @@ -1,7 +1,7 @@ import SwiftUI import UIKit -import Introspect +import SwiftUIIntrospect public enum HeightChangeConfig { case always @@ -47,7 +47,7 @@ struct DelegateHolder: View { var body: some View { content - .introspectScrollView { scrollView in + .introspect(.scrollView, on: .iOS(.v15, .v16, .v17)) { scrollView in scrollView.delegate = offsetNotifier offsetNotifier.scrollView = scrollView offsetNotifier.scrollViewDidScroll(scrollView)