-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #335 from stripe/release-4.1.0
Release 4.1.0
- Loading branch information
Showing
752 changed files
with
514,957 additions
and
86,677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// UIViewController+Presentation.swift | ||
// Example | ||
// | ||
// Created by Brian Cooke on 10/18/24. | ||
// Copyright © 2024 Stripe. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
extension UIViewController { | ||
func topViewController() -> UIViewController? { | ||
guard let keyWindow = UIApplication.shared.connectedScenes | ||
.filter({$0.activationState == .foregroundActive}) | ||
.compactMap({$0 as? UIWindowScene}) | ||
.first?.windows | ||
.filter({$0.isKeyWindow}).first else { | ||
return nil | ||
} | ||
|
||
|
||
guard var topViewController = keyWindow.rootViewController else { | ||
return nil | ||
} | ||
|
||
while let presentedViewController = topViewController.presentedViewController { | ||
topViewController = presentedViewController | ||
} | ||
return topViewController | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ SPEC CHECKSUMS: | |
|
||
PODFILE CHECKSUM: 4b74d0597959469ee954001e3536226231ca6150 | ||
|
||
COCOAPODS: 1.15.2 | ||
COCOAPODS: 1.16.2 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.