Skip to content

Commit

Permalink
fix advc
Browse files Browse the repository at this point in the history
  • Loading branch information
wooj-stripe committed Aug 7, 2023
1 parent 175f5eb commit ad178b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Stripe/StripeiOS/Source/STPAddCardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,6 @@ public class STPAddCardViewController: STPCoreTableViewController, STPAddressVie

// MARK: - STPCardScanner
/// :nodoc:
@available(macCatalyst 14.0, *)
@objc
public override func viewWillTransition(
to size: CGSize,
Expand All @@ -824,7 +823,9 @@ public class STPAddCardViewController: STPCoreTableViewController, STPAddressVie
super.viewWillTransition(to: size, with: coordinator)
let orientation = UIDevice.current.orientation
if orientation.isPortrait || orientation.isLandscape {
cardScanner?.deviceOrientation = orientation
if #available(macCatalyst 14.0, *) {
cardScanner?.deviceOrientation = orientation
}
}
if isScanning {
let indexPath = IndexPath(
Expand Down

0 comments on commit ad178b5

Please sign in to comment.