Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ventura compile fix #21

Merged
merged 2 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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