Skip to content

Commit 813aec8

Browse files
authored
Merge pull request #3 from GoodRequest/feature/documentation
doc: Add main thread disclaimer
2 parents 2260ef4 + 684a4e9 commit 813aec8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Sources/GoodUIKit/UIApplicationExtensions.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,19 @@ public enum UIApplicationUrlType {
2020

2121
public extension GRUIActive where Base: UIApplication {
2222

23+
/// Returns status bar frame for currently active window.
24+
/// See: ``activeWindow``
25+
///
26+
/// Important: Use only on main thread.
2327
@available(iOS 13.0, *)
2428
var currentStatusBarFrame: CGRect? {
2529
return activeWindow?.windowScene?.statusBarManager?.statusBarFrame
2630
}
2731

32+
33+
/// First active window for all connected scenes in the application.
34+
///
35+
/// Important: Use only on main thread.
2836
@available(iOS 13.0, *)
2937
var activeWindow: UIWindow? {
3038
UIApplication.shared.connectedScenes

0 commit comments

Comments
 (0)