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

Xcode version to 9, iOS11 and works fine except iPhone x. UI got collapsed

I have Created Two UIView one headerview and second is UICollectionView both subview of UIScrollView and I have hidden my NavigationBar entire app. Now I have added below code for set "SafeAreaLayoutGuides" in iOS11 but here application crass due…
2
votes
0 answers

Safe Area insetsLayoutMargins not work as I expect

I'm trying to use the new safe area. I'm trying to reproduce the example that is shown WWDC 2017 - Session 204. I set additionalSafeAreaInsets = UIEdgeInsetsMake (0, 0, 44, 100) of the controller and insetsLayoutMarginsFromSafeArea = false of the…
1
vote
0 answers

Updating additionalSafeAreaInsets causes weird issues such as ambiguity in the Navigation bar and unnecessary white space above the Navigation bar

We have an Offline Data Synchronization in our application. When we have any pending transactions [i.e. transactions made offline], if the device is online, we sync those activities to the server. while syncing, we display a banner view with syncing…
1
vote
1 answer

Why UIKit calculates the wrong safe area after the cancel of an animation?

There is an animation which animated a view from frame CGRect(x: 10, y: 10, width: 100, height: 100) to frame CGRect(x: 10, y: 10, width: 300, height: 300). I use the UIViewPropertyAnimator to implement the animation, and here is the code: @objc…
1
vote
1 answer

How do you ignore the safe area in UIKit?

I know you use ignoresSafeArea() in SwiftUI to make some UI-element-frame dismiss the safe area. However, when using UIKit I don't know how to do it. I want to place a UILabel right below the actual screen, but I cannot see it because it is hidden…
1
vote
1 answer

Animations with safeAreaLayoutGuide (Swift 5)

I would like a smooth animation of this view whenever the search bar is selected and deselected. Right now it's choppy: Heres my code below in the searchResultsUpdater. From what I understand, these functions should handle the animations, I'm not…
1
vote
0 answers

How to deal with temporarily incorrect SafeAreaInsets?

I'm working on a nice screen rotation animation in my iOS app. When the screen's size changes, I update the (Metal) model inside it accordingly. The problem is that I have visual content "jumps" due to the buggy info from the VC's lifecycle…
olha
  • 2,132
  • 1
  • 18
  • 39
1
vote
0 answers

safeAreaInsets changes its value after keyboard dismissed in iOS 13

I have bottomView (the one with black border in the images) its bottom anchor has a constraint to bottom view safeAreaLayoutGuide, but when keyboard will show the bottomView became toolbar to the keyboard. Here every thing was working as expected in…
1
vote
0 answers

UIApplication key window 'safe area layout guide" excludes tab bar & navigation bar

I am trying to showing a toast view on top and bottom of my view controller. However, the "Safe Area Layout" guide is neither including the navigation bar or the tab bar at the bottom. The status bar is included. I want to show the toast view below…
iqra
  • 1,061
  • 1
  • 11
  • 18
1
vote
3 answers

Flutter: How to adjust a widget to avoid android's bottom Navigation bar

In my register screen, part of the content(at the bottom) is hidden by the phone's bottom navbar. The content is only visible when I close the bottom navbar. What I want to achieve is, whenever the bottom navbar is displayed on the phone, I want…
Shadow Walker
  • 979
  • 5
  • 27
  • 51
1
vote
0 answers

How to make custom style UITableViewCell inset from safe area?

How can I make a UITableViewCell with custom style inset from the safe area of the device screen when it is part of the view hierarchy UINavigationController > UIViewController > UIView > UITableView > UITableViewCell? My UITableViewCell left side…
ansonl
  • 786
  • 1
  • 13
  • 34
1
vote
1 answer

General approach for bottom layout guide and different screen formats

So far most, if not all, screens i had developed had 2 kind of behaviours in the context of bottom layout guide: The content is static and need to be anchored at the bottom: In this case typically i create a bottom layout guide from the bottom-est…
jalone
  • 1,953
  • 4
  • 27
  • 46
1
vote
0 answers

Layout guide to exactly accomodate the iPhone X, XR/XS, 11 notch

I am trying to make a landscape orientation app that slides a left shelf in (on the side of the iPhone X notch). I want the content to feel centered in the width of this shelf UIView. However, I also don't want the shelf content to be covered by the…
Winston Du
  • 340
  • 2
  • 9
1
vote
1 answer

Swift Safe Area Layout not activating properly

I am learning some auto layout programatically and I want to add a button on the bottom part of the screen, just above the safe area. I know the code is working, because I tested it in another project, I think it is a conflict because I get to this…
Blaj Bogdan
  • 415
  • 1
  • 3
  • 17
1
vote
1 answer

Safe Area Insets Disappear when Moving View

In my iOS project, I have a view controller with a couple text fields. To ensure the controls stay visible when the user enters text I use the following code to move the content and make room for the keyboard: override func viewWillAppear(_…
user3386180