Swift
Swift UIKit: 최상위 Top View Controller (현재 화면의 VC) 찾기 / 예제: SwiftUI에서 빠른 Alert 띄우기
1. UIApplication의 KeyWindow 대체 import UIKit extension UIApplication { var keyWindow: UIWindow? { connectedScenes .compactMap { $0 as? UIWindowScene } .flatMap { $0.windows } .first { $0.isKeyWindow } } } ‘keyWindow’ was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a 더보기…