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
5
votes
1 answer

UIPageViewController in combination with safe area

I can not get UIPageViewController to work in combination with Safe Area as I would expect it to do. What I am doing is I pin a subview of a UIPageViewControllers child view controller (e.g. childVc1) to the safe area…
Sascha
  • 93
  • 6
5
votes
2 answers

How do you set the status bar or safe area to remove white space on iPhone X?

I have added the option to use safe area guidelines yet when I view the app it appears to respect the safe area but theres some white space that I cant get rid of. I dont know what is causing it nor do I know how to change the color from white.…
John Pollard
  • 3,729
  • 3
  • 24
  • 50
5
votes
2 answers

Safe Area Guide Not Appearing in Xcode

I use XIB in most of my apps instead of Storyboards. As you can see from the picture, I have Safe Area Layout Guide enabled as well as Auto Layout, but for some reason, my XIB still shows top and bottom layout guide instead of safe area. What am I…
user717452
  • 33
  • 14
  • 73
  • 149
5
votes
3 answers

How to get rid of white space at bottom of Launch Screen on iPhone X

There is a white space at the bottom of the launch screen on iPhone X even though I am using safe area. On interface builder it seems OK: I am using superview for my constraints: Here is the view hierarchy: How can I get rid of it?
Olcay Ertaş
  • 5,987
  • 8
  • 76
  • 112
4
votes
1 answer

Importing SwiftUI safeAreaInset into UIKit

safeAreaInset(edge:alignment:spacing:content:): The modified view is inset by the height of content, from edge, with its safe area increased by the same amount. It appears that SwiftUI's safeAreaInset is not imported into UIKit's safe area: …
lhunath
  • 120,288
  • 16
  • 68
  • 77
4
votes
0 answers

Small space between table view scroll indicator and a safe area top edge

I have a scene with a UITableVIew which has a constraint between his top edge and a safe area top edge there are also left and right constraints and the bottom edge is constrained to superview bottom edge. This configuration on UIKit 13 and 14 leads…
Blazej SLEBODA
  • 8,936
  • 7
  • 53
  • 93
4
votes
0 answers

IOS 13 Safe area break after switching between landscape and portrait

After xcode 11 ios 13 release there were a lot of new bugs in my app: modalPresentationStyle, Facebook SDK and so on. But what really cracked me is that: In my app i have two windows. One for Unity, one for UIKit client side. I'm switching between…
Nike Kov
  • 12,630
  • 8
  • 75
  • 122
4
votes
1 answer

When is safeAreaInsetsDidChange called?

I am aware that safeAreaInsetsDidChangeis being called when the view is first laying out its subviews. What I'm wondering is under what circumstances/events this could be called again while the screen is still presented (iPad slide-over for example)
henrik-dmg
  • 1,448
  • 16
  • 23
4
votes
2 answers

Safe Area Layout Guide Not Working On UITableView's BackgroundView

The issue I'm having is that the label is anchored to the bottom edge of the screen when it should be anchored to the safe area layout guide. which will bring the label above the iPhone line. Here's the code... class CustomTableViewController:…
dispatchswift
  • 1,046
  • 9
  • 21
4
votes
1 answer

Game stuck inside safe area iPhone Xs

I updated my game that I thought would support iPhone Xs and iPad 11inch which it fits the screen perfectly on the simulator (extremely frustrating), but not when testing on the physical devices. It seems the rootView (my SKView) is constrained to…
KissTheCoder
  • 679
  • 6
  • 16
4
votes
1 answer

Safe Area increase itself after hide tab bar, but dont decrease if i show tab bar again

i have a view controllers in a tab bar controller with constraints to bottom safe area, but one of them i must hide tab bar i use this self.tabBarController?.tabBar.isHidden = true this increase the safe area But if i need to move to another i show…
4
votes
3 answers

Safe areas on iPhone X wrong

I have a pretty complex app, that causes the safe areas on an iPhone X to be wrong (pushed down). This screenshot is from a storyboard. It's a container view aligned to the bottom anchor of the Safe Area Layout Guide. Everything looks fine there…
Alessandro
  • 258
  • 1
  • 3
  • 10
4
votes
1 answer

How to make Webkit webView with Swift with safe area constraints for iPhone X?

This is the configuration of the storyboard: see the image *Take a look above the link for the image, support from iOS9 to iOS11 Following is the working code solution: import UIKit import WebKit class ViewController: UIViewController,…
4
votes
0 answers

iOS 11 UINavigationBar Position Loses Status Bar Height During Transition

This bug has cropped up in iOS 11. There is a UINavigationController embedded as a child UIViewController of another UIViewController. There's a UIPanGestureRecogniser setup that affects the y axis of the child UIViewController's view's frame…
4
votes
1 answer

Set background color for top safe area only in iOS 11

I'm new to Swift. I have set my top bar programmatically.It works fine for all versions except for iOS version 11. I want to change the background color of the safe area in iPhone X. Presently I have just added the following code to hide the…