Skip to content

Commit

Permalink
add visionOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
stonko1994 committed Jan 31, 2024
1 parent bc090eb commit d283282
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// swift-tools-version:5.3
// swift-tools-version:5.9
import PackageDescription

let package = Package(
name: "SimultaneouslyScrollView",
platforms: [
.iOS(.v13),
.tvOS(.v13)
.tvOS(.v13),
.visionOS(.v1)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if os(iOS) || os(tvOS)
#if os(iOS) || os(tvOS) || os(visionOS)
import Combine
import UIKit

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if os(iOS) || os(tvOS)
#if os(iOS) || os(tvOS) || os(visionOS)
import UIKit

internal extension UIScrollView {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if os(iOS) || os(tvOS)
#if os(iOS) || os(tvOS) || os(visionOS)
import Foundation
import UIKit

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if os(iOS) || os(tvOS)
#if os(iOS) || os(tvOS) || os(visionOS)
import Foundation

public struct SimultaneouslyScrollViewDirection: OptionSet {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import Combine
#if os(iOS) || os(tvOS)
#if os(iOS) || os(tvOS) || os(visionOS)
import UIKit
#endif

/// Handler to enable simultaneously scrolling of `ScrollView`s
@available(iOS 13, *)
@available(tvOS 13, *)
@available(visionOS 1, *)
@available(macOS, unavailable)
public protocol SimultaneouslyScrollViewHandler {
#if os(iOS) || os(tvOS)
#if os(iOS) || os(tvOS) || os(visionOS)
/// Publisher to notify if the `ScrollView`s are scrolled to the bottom
var scrolledToBottomPublisher: AnyPublisher<Bool, Never> { get }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import Foundation
/// Factory class to create `SimultaneouslyScrollViewHandler` instance
@available(iOS 13, *)
@available(tvOS 13, *)
@available(visionOS 1, *)
@available(macOS, unavailable)
public class SimultaneouslyScrollViewHandlerFactory {
#if os(iOS) || os(tvOS)
#if os(iOS) || os(tvOS) || os(visionOS)
/// Creates a new `SimultaneouslyScrollViewHandler` instance
/// - Returns: A new `SimultaneouslyScrollViewHandler` instance
public static func create() -> SimultaneouslyScrollViewHandler {
Expand Down

0 comments on commit d283282

Please sign in to comment.