File tree Expand file tree Collapse file tree 4 files changed +47
-2
lines changed Expand file tree Collapse file tree 4 files changed +47
-2
lines changed Original file line number Diff line number Diff line change 13
13
import Foundation
14
14
@_exported import UIKit
15
15
16
+ #if os(iOS) || os(tvOS)
17
+ import _SwiftUIKitOverlayShims
18
+ #endif
19
+
16
20
//===----------------------------------------------------------------------===//
17
21
// UIGeometry
18
22
//===----------------------------------------------------------------------===//
@@ -277,13 +281,15 @@ extension UIContentSizeCategory {
277
281
#if os(iOS) || os(tvOS)
278
282
@available ( iOS 11 . 0 , tvOS 11 . 0 , * )
279
283
extension UIFocusEnvironment {
284
+ @available ( iOS 11 . 0 , tvOS 11 . 0 , * )
280
285
public func contains( _ environment: UIFocusEnvironment ) -> Bool {
281
- return UIFocusSystem . environment ( self , contains : environment)
286
+ return _swift_UIKit_UIFocusEnvironmentContainsEnvironment ( self , environment)
282
287
}
283
288
}
284
289
285
290
@available ( iOS 11 . 0 , tvOS 11 . 0 , * )
286
291
extension UIFocusItem {
292
+ @available ( iOS 11 . 0 , tvOS 11 . 0 , * )
287
293
public var isFocused : Bool {
288
294
return self === UIScreen . main. focusedItem
289
295
}
Original file line number Diff line number Diff line change @@ -16,9 +16,10 @@ set(sources
16
16
Visibility.h
17
17
18
18
DispatchOverlayShims.h
19
- ObjectiveCOverlayShims.h
20
19
OSOverlayShims.h
20
+ ObjectiveCOverlayShims.h
21
21
SafariServicesOverlayShims.h
22
+ UIKitOverlayShims.h
22
23
XCTestOverlayShims.h
23
24
XPCOverlayShims.h
24
25
Original file line number Diff line number Diff line change
1
+ //===--- UIKitOverlayShims.h ---===//
2
+ //
3
+ // This source file is part of the Swift.org open source project
4
+ //
5
+ // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6
+ // Licensed under Apache License v2.0 with Runtime Library Exception
7
+ //
8
+ // See https://swift.org/LICENSE.txt for license information
9
+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
+ //
11
+ //===--------------------===//
12
+
13
+ #ifndef SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H
14
+ #define SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H
15
+
16
+ @import UIKit ;
17
+
18
+ #if __has_feature (nullability )
19
+ #pragma clang assume_nonnull begin
20
+ #endif
21
+
22
+ #if TARGET_OS_TV || TARGET_OS_IOS
23
+ static inline BOOL _swift_UIKit_UIFocusEnvironmentContainsEnvironment (id < UIFocusEnvironment > environment , id < UIFocusEnvironment > otherEnvironment ) {
24
+ return [UIFocusSystem environment :environment containsEnvironment :otherEnvironment ];
25
+ }
26
+ #endif // TARGET_OS_TV || TARGET_OS_IOS
27
+
28
+ #if __has_feature (nullability )
29
+ #pragma clang assume_nonnull end
30
+ #endif
31
+
32
+
33
+ #endif // SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H
34
+
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ module _SwiftSafariServicesOverlayShims {
40
40
header "SafariServicesOverlayShims.h"
41
41
}
42
42
43
+ module _SwiftUIKitOverlayShims {
44
+ header "UIKitOverlayShims.h"
45
+ }
46
+
43
47
module _SwiftXCTestOverlayShims {
44
48
header "XCTestOverlayShims.h"
45
49
}
You can’t perform that action at this time.
0 commit comments