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.

225 questions
215
votes
17 answers

Get safe area inset top and bottom heights

On the new iPhone X, what would be the most proper way to get both top and bottom height for the unsafe areas?
Tulleb
  • 8,195
  • 8
  • 24
  • 48
152
votes
5 answers

Safe Area of Xcode 9

While exploring Xcode9 Beta Found Safe Area on Interface builders View hierarchy viewer. Got curious and tried to know about Safe Area on Apples documentation, in gist the doc says "The the view area which directly interacts with Auto layout" But it…
dip
  • 3,459
  • 3
  • 20
  • 33
111
votes
11 answers

How do I use Safe Area Layout programmatically?

Since I don't use storyboards to create my views, I was wondering if there's the "Use Safe Area Guides" option programmatically or something like that. I've tried to anchor my views to view.safeAreaLayoutGuide but they keep overlapping the top…
Phillip
  • 3,928
  • 7
  • 39
  • 74
66
votes
16 answers

iOS 11 safe area layout guide backwards compatibility

Is enabling Safe Area Layout Guides compatible to iOS below 11?
Ted
  • 19,425
  • 10
  • 78
  • 99
63
votes
4 answers

leading or trailing horizontal alignment before iOS 11

Warning: leading or trailing horizontal alignment before iOS 11 I am getting above warning during compilation on Xcode 9.1 on one of the scenes in a storyboard file. There are other storyboards (with deployment target iOS 10.0) and yet the warning…
Prabhav
  • 939
  • 7
  • 8
27
votes
4 answers

Swift Safe Area Layout Guide and Visual Format Language

I want to use Apples visual format language to constrain a view to the new Safe Area Layout Guide in iOS 11. However, I get an exception: -[NSLayoutYAxisAnchor nsli_superitem]: unrecognized selector sent to instance 0x1c447ed40 //Make View…
27
votes
6 answers

xcode Resolve "Safe Area Layout" errors

What is the correct way to stop this error? For now I'm merely unchecking "Use Safe Area Layout Guides" which allows me to compile the app without error.
Jacksonkr
  • 29,242
  • 36
  • 164
  • 265
22
votes
3 answers

How to extend bottom view colour below the home indicator in iPhone X?

Please check the attached image. The Viewcontroller's view's background colour is blue. This colour extends below the status bar and below the home indicator as you can see. There is a white view at the bottom which is a button. Here the white view…
abhimuralidharan
  • 5,093
  • 2
  • 42
  • 63
22
votes
3 answers

bottom layout deprecated since ios 11.0

What can I do to fix Bottom layout is deprecated iOS 11, I am using Xcode 9 beta 2.
Malik
  • 559
  • 6
  • 10
20
votes
2 answers

What is safe area in xib in xcode 9?

Can you please let me know what is safe area (highlighted in image) in xibs in xcode 9. and what is use of this?
Jagdeep Singh
  • 2,248
  • 3
  • 16
  • 23
19
votes
4 answers

Can't use safe areas in Xcode 9 after upgrading minimum deployment target to iOS 9

I have just changed my app from supporting iOS 8 and up to supporting iOS 9 and up. I believe I've done this properly, since when I now build my app, I'm getting warnings for everything in the app which was deprecated in iOS 9. I am using Xcode…
Jordan Wood
  • 2,547
  • 2
  • 10
  • 17
18
votes
5 answers

Extend iOS 11 Safe Area to include the keyboard

The new Safe Area layout guide introduced in iOS 11 works great to prevent content from displaying below bars, but it excludes the keyboard. That means that when a keyboard is displayed, content is still hidden behind it and this is the problem I am…
Denis Balko
  • 1,488
  • 2
  • 15
  • 29
16
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,425
  • 2
  • 10
  • 34
15
votes
3 answers

Child ViewController safe area inset doesn't update if partially offscreen

I am having difficulty with the Safe Area when sliding a child ViewController around on an iPhone X in landscape. I have a root ViewController, and one of its views is moveable and contains an embedded child ViewController. The real app is a…
Ben
  • 1,123
  • 10
  • 18
15
votes
2 answers

Objective C : How to create self.view inside Safe Area programmatically

I have just changed my app from supporting iOS 8 and up to supporting iOS 9 and up. Since I don't use storyboards to create my views, I was wondering if there's the "Use Safe Area Guides" option programmatically or something like that. I've tried…
Ravindhiran
  • 4,974
  • 7
  • 46
  • 79
1
2 3
14 15