File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 5547
5547
CLANG_WARN_UNREACHABLE_CODE = YES;
5548
5548
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
5549
5549
COPY_PHASE_STRIP = NO;
5550
- CURRENT_PROJECT_VERSION = 0 ;
5550
+ CURRENT_PROJECT_VERSION = 1 ;
5551
5551
DEBUG_INFORMATION_FORMAT = dwarf;
5552
5552
DEVELOPMENT_TEAM = NKUJUXUJ3B;
5553
5553
ENABLE_STRICT_OBJC_MSGSEND = YES;
5613
5613
CLANG_WARN_UNREACHABLE_CODE = YES;
5614
5614
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
5615
5615
COPY_PHASE_STRIP = NO;
5616
- CURRENT_PROJECT_VERSION = 0 ;
5616
+ CURRENT_PROJECT_VERSION = 1 ;
5617
5617
DEVELOPMENT_TEAM = NKUJUXUJ3B;
5618
5618
ENABLE_STRICT_OBJC_MSGSEND = YES;
5619
5619
ENABLE_TESTABILITY = YES;
Original file line number Diff line number Diff line change @@ -36,15 +36,20 @@ class NCMenuFloatingPanelLayout: FloatingPanelLayout {
36
36
let topInset : CGFloat
37
37
38
38
init ( actionsHeight: CGFloat ) {
39
+ guard let windowScene = UIApplication . shared. connectedScenes. first ( where: { $0 is UIWindowScene } ) as? UIWindowScene ,
40
+ let window = windowScene. windows. first ( where: { $0. isKeyWindow } )
41
+ else {
42
+ topInset = 48
43
+ return
44
+ }
39
45
let screenHeight = UIDevice . current. orientation. isLandscape
40
- ? min ( UIScreen . main. bounds. size. width, UIScreen . main. bounds. size. height)
41
- : max ( UIScreen . main. bounds. size. width, UIScreen . main. bounds. size. height)
42
- let window = UIApplication . shared. connectedScenes. flatMap { ( $0 as? UIWindowScene ) ? . windows ?? [ ] } . first { $0. isKeyWindow }
43
- let bottomInset = window? . rootViewController? . view. safeAreaInsets. bottom ?? 0
44
- let panelHeight = CGFloat ( actionsHeight) + bottomInset
46
+ ? min ( window. frame. size. width, window. frame. size. height)
47
+ : max ( window. frame. size. width, window. frame. size. height)
48
+ let bottomInset = window. rootViewController? . view. safeAreaInsets. bottom ?? 0
49
+ let panelHeight = actionsHeight + bottomInset
45
50
46
51
topInset = max ( 48 , screenHeight - panelHeight)
47
- }
52
+ }
48
53
49
54
func prepareLayout( surfaceView: UIView , in view: UIView ) -> [ NSLayoutConstraint ] {
50
55
return [
You can’t perform that action at this time.
0 commit comments