Skip to content

Commit

Permalink
Ventura compile fix (#21)
Browse files Browse the repository at this point in the history
* Compile fix

* Check Ventura, too
  • Loading branch information
nighthawk committed May 10, 2024
1 parent b43774f commit 6940c60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,35 @@ on:
branches: [ main ]

jobs:
build_xcode:
build_xcode_sonoma:
runs-on: macos-14

steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15.3 # latest-stable
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build TGCardVC
run: xcodebuild -workspace . -scheme TGCardViewController -destination 'platform=iOS Simulator,name=iPhone 14'

build_xcode_ventura:
runs-on: macos-13
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v4
- name: Build TGCardVC
run: xcodebuild -workspace . -scheme TGCardViewController -destination 'platform=iOS Simulator,name=iPhone 14'

examples:
runs-on: macos-14

steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15.3 # latest-stable
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build Example
run: |
cd Example
Expand Down
2 changes: 2 additions & 0 deletions Sources/TGCardViewController/TGCardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1499,9 +1499,11 @@ extension TGCardViewController {
// but scroll down a little; then you start dragging with scroll to zero
// you keep scrolling and fling it a little that it snaps to the peaking
// position.
#if swift(>=5.10) // Proxy for Xcode 15.3+
if #available(iOS 17.4, visionOS 1.1, *) {
scrollView.stopScrollingAndZooming()
}
#endif

guard traitCollection.verticalSizeClass != .compact else {
return
Expand Down

0 comments on commit 6940c60

Please sign in to comment.