@@ -193,7 +193,9 @@ open class TGCardViewController: UIViewController {
193
193
var panner : UIPanGestureRecognizer !
194
194
var cardTapper : UITapGestureRecognizer !
195
195
var mapShadowTapper : UITapGestureRecognizer !
196
+ #if !os(visionOS)
196
197
var edgePanner : UIScreenEdgePanGestureRecognizer !
198
+ #endif
197
199
198
200
/// Builder that determines what kind of map to use. The builder's
199
201
/// `buildMapView` method will be once initially, and the map instance will
@@ -371,13 +373,15 @@ open class TGCardViewController: UIViewController {
371
373
mapShadow. addGestureRecognizer ( mapTapper)
372
374
self . mapShadowTapper = mapTapper
373
375
376
+ #if !os(visionOS)
374
377
// Edge panning to go back
375
378
let edgePanner = UIScreenEdgePanGestureRecognizer ( )
376
379
edgePanner. addTarget ( self , action: #selector( popMaybe) )
377
380
edgePanner. isEnabled = mode == . floating
378
381
edgePanner. edges = traitCollection. layoutDirection == . leftToRight ? . left : . right
379
382
view. addGestureRecognizer ( edgePanner)
380
383
self . edgePanner = edgePanner
384
+ #endif
381
385
}
382
386
383
387
override open func viewWillAppear( _ animated: Bool ) {
@@ -1971,7 +1975,10 @@ extension TGCardViewController {
1971
1975
} else if !headerIsVisible {
1972
1976
headerStatusBarStyle = nil
1973
1977
}
1978
+
1979
+ #if !os(visionOS)
1974
1980
setNeedsStatusBarAppearanceUpdate ( )
1981
+ #endif
1975
1982
}
1976
1983
1977
1984
}
@@ -2114,19 +2121,22 @@ extension TGCardViewController {
2114
2121
object: nil
2115
2122
)
2116
2123
2124
+ #if !os(visionOS)
2117
2125
NotificationCenter . default. addObserver (
2118
2126
self ,
2119
2127
selector: #selector( updateForVoiceOverFocusChange) ,
2120
2128
name: UIAccessibility . elementFocusedNotification,
2121
2129
object: nil
2122
2130
)
2131
+ #endif
2123
2132
}
2124
2133
2125
2134
@objc
2126
2135
private func updateForVoiceOverStatusChange( ) {
2127
2136
updateCardScrolling ( allow: cardPosition == . extended, view: topCardView)
2128
2137
}
2129
2138
2139
+ #if !os(visionOS)
2130
2140
@objc
2131
2141
private func updateForVoiceOverFocusChange( notification: Notification ) {
2132
2142
guard let selection = notification. userInfo ? [ UIAccessibility . focusedElementUserInfoKey] as? UIAccessibilityElement else { return }
@@ -2139,6 +2149,7 @@ extension TGCardViewController {
2139
2149
switchTo ( . extended, direction: . up, animated: true )
2140
2150
}
2141
2151
}
2152
+ #endif
2142
2153
2143
2154
private func buildCardHandleAccessibilityActions( ) -> [ UIAccessibilityCustomAction ] {
2144
2155
return [
0 commit comments