Questions tagged [safearealayoutguide]

The safeAreaLayoutGuide is a property from UIView class (Apple iOS) representing the portion of the view that is unobscured by bars and other content.

Apple documentation for safeAreaLayoutGuide.

240 questions
17
votes
4 answers

How to set unsafe area background color for ios 11

Creating some new view controllers with xcode 9 so now I have a few safe areas to deal with. I am currently trying to do something fullproof, meaning keeping the unsafe area as it is (since I always display the status bar) and having the background…
thibaut noah
  • 1,474
  • 2
  • 11
  • 39
15
votes
6 answers

How do you prevent the bottom area in a React Native SafeAreaView from overlapping over the content?

I'm implementing a on my React Native app. Most of my screens are in a ScrollView. When I add the , it obstructs the content. While I want this bottom area to be "safe", I'd like the user to be able to see the content…
Dan Leveille
  • 3,001
  • 2
  • 24
  • 28
15
votes
2 answers

Safe area layout guide not working for UITableViewController in storyboard

Seems like UITableViewController does not have safe area layout guide to set table view top and bottom margin as collapses with bottom layout in iPhone X. All view controller are working fine with safe area layout guide in storyboard for top and…
SachinVsSachin
  • 6,401
  • 3
  • 33
  • 39
15
votes
4 answers

Unwanted white space on left of UIScrollView on iPhone X

UIScrollView works fine without the white space on the left on all iPads or iPhones except for iPhone X. How can I remove the white space? I use storyboards. Bounce On Scroll/Zoom are all disabled. No white space on iPad or iPhone except for iPhone…
zs2020
  • 53,766
  • 29
  • 154
  • 219
14
votes
3 answers

iOS 11 Swift 4 iPhone X Safe Area Support of full screen ScrollView

I currently have my layout design setup as a fullscreen scrollview on one view controller in which I add other view controllers as sub views to create a paged effect. On normal iphone screens it works beautifully. However when running on iPhone X,…
user6520705
  • 705
  • 3
  • 11
  • 38
14
votes
4 answers

How to find out the distance from the bottom safe area edge to the bottom of the screen?

I need to calculate the distance between the bottom anchor of the safe area and the bottom of the screen. Is there a way to do that in code given a view?
Evgenii
  • 36,389
  • 27
  • 134
  • 170
14
votes
2 answers

How to calculate iOS 11 size in different orientation?

I calculate itemSize dependent on safe area for UICollectionView with horizontal scroll and custom layout. But for iPhone X safe area has different size for different orientation. My question is how should I calculate safe area size for landscape…
bogmila
  • 143
  • 1
  • 6
13
votes
1 answer

How to get a black statusbar on iPhone X on iOS 11

By default the statusbar on an iPhone X looks like this: But I would like to achieve this: I tried setting the preferredStatusBarStyle to lightContent but it only worked after setting the background behind the statusbar to black. To fix the…
Tieme
  • 62,602
  • 20
  • 102
  • 156
12
votes
7 answers

Cannot place SwiftUI view outside the SafeArea when embedded in UIHostingController

I have a simple SwiftUI view that contains 3 text elements: struct ImageDescriptionView: View { var title: String? var imageDescription: String? var copyright: String? var body: some View { VStack(alignment: .leading) { …
WalterBeiter
  • 2,021
  • 3
  • 23
  • 48
12
votes
4 answers

Safe Area and Navigation Bar

I'm trying to add a Navigation Bar in a xib, but the navigation bar does not fill to the top, it leaves space above it where the camera notch is. See the screenshot below: Here are my constraints for the Navigation Bar: I've also tried setting the…
tentmaking
  • 2,076
  • 4
  • 30
  • 53
12
votes
1 answer

Safe Area changes in parent VC when presenting modally VC in landscape

Safe Area Insets in first UIViewController changes to Safe Area Inset for landscape when I present SecondViewController, which supports only landscape orientation. GIF with described bug GIF with described bug that touches TabBar and…
10
votes
1 answer

How to handle Keyboard with safe area in iphone x Using AutoLayout?

After Setting Safe Area in iphone x . When Keyboard opens the safe area (The white area above keyboard ) comes above the keyboard so how to handle the keyboard ? White Area above The Keyboard . handle keyboard Code :- func…
Amey
  • 795
  • 8
  • 31
10
votes
1 answer

Detect safe area insets on Share Extension

I'm adapting an app to support iPhone X. I have a share extension with a custom view controller. I need to know the safe area insets of my device, but the safeAreaInsets method from UIWindow provided by calling UIApplication.shared.keyWindow isn't…
Nicola Giancecchi
  • 3,045
  • 2
  • 25
  • 41
9
votes
2 answers

Xcode 10 - Safe Area Layout Guide before iOS 9.0 [12] error

I am trying to compile an application with a Deployment Target iOS 8.0 on Xcode 10 using an iOS 8.3 simulator. I have already disabled Safe Area Layout Guide from the Storyboard, but the issue still exists. Do you know how to help me?
ibrahim87
  • 101
  • 1
  • 7
9
votes
1 answer

Force update of child view controller's safeAreaInsets

I have a rootViewController that has a child view controller (fullScreenViewController) whose view, from time to time, is displayed above the view (but as a subview) of the rootViewController, taking up the full screen. i.e.…
Jeff
  • 4,751
  • 5
  • 31
  • 35
1
2
3
15 16