File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 95
95
</constraint >
96
96
<constraint firstItem =" GOK-vx-mU8" firstAttribute =" leading" secondItem =" rzo-9i-rXZ" secondAttribute =" leading" id =" J6L-hu-jV6" />
97
97
<constraint firstItem =" VfB-vw-7up" firstAttribute =" leading" secondItem =" vRb-yf-OWE" secondAttribute =" leading" constant =" 5" id =" gGt-ku-pPu" />
98
- <constraint firstItem =" rzo-9i-rXZ" firstAttribute =" top" secondItem =" lHf-Ux-dEc" secondAttribute =" bottom" constant =" 3" id =" hhi-1K-2YO" />
98
+ <constraint firstItem =" rzo-9i-rXZ" firstAttribute =" top" secondItem =" lHf-Ux-dEc" secondAttribute =" bottom" constant =" 3" placeholder = " YES " id =" hhi-1K-2YO" />
99
99
<constraint firstItem =" VfB-vw-7up" firstAttribute =" top" secondItem =" rzo-9i-rXZ" secondAttribute =" top" id =" nF9-EZ-bjS" />
100
100
<constraint firstAttribute =" trailingMargin" secondItem =" rzo-9i-rXZ" secondAttribute =" trailing" id =" pOl-wC-mqq" />
101
101
<constraint firstItem =" rzo-9i-rXZ" firstAttribute =" leading" secondItem =" VfB-vw-7up" secondAttribute =" trailing" constant =" 5" id =" vSo-6t-cZ0" />
Original file line number Diff line number Diff line change @@ -155,6 +155,25 @@ - (void)viewDidLoad {
155
155
self.view .layer .shadowRadius = 2 ;
156
156
self.view .layer .shadowOpacity = 0.4 ;
157
157
158
+ // Calculate status bar height.
159
+ CGFloat statusBarHeight = 0 ;
160
+ #if defined(__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
161
+ if (@available (iOS 13.0 , *)) {
162
+ UIStatusBarManager *manager =
163
+ [UIApplication sharedApplication ].keyWindow .windowScene .statusBarManager ;
164
+
165
+ statusBarHeight = manager.statusBarFrame .size .height ;
166
+ } else {
167
+ #endif
168
+ statusBarHeight = [[UIApplication sharedApplication ] statusBarFrame ].size .height ;
169
+ #if defined(__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
170
+ }
171
+ #endif
172
+
173
+ // Pin title label below status bar with cushion.
174
+ [[self .titleLabel.topAnchor constraintEqualToAnchor: self .view.topAnchor
175
+ constant: statusBarHeight + 3 ] setActive: YES ];
176
+
158
177
// When created, we are hiding it for later animation
159
178
self.hidingForAnimation = YES ;
160
179
[self setupAutoDismissTimer ];
You can’t perform that action at this time.
0 commit comments