Questions tagged [safearea]
15 questions
2
votes
2 answers
Flutter change bottom nav bar height
I am trying to build a custom bottomNavBar and my code looks like this:
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
decoration:…
![](../../users/profiles/11968226.webp)
Chris
- 420
- 6
- 32
1
vote
0 answers
Flutter SafeArea: avoid notches, but ignore rounded corners
Is there a way to detect and avoid notches in a phone's screen (for example, the camera notch in an iPhone X), but ignore a screen's rounded corners?
For example, here's my app in landscape mode on an iPhone with a notch:
The menu on the left is…
![](../../users/profiles/1063392.webp)
Nathan Friend
- 10,076
- 8
- 60
- 114
1
vote
1 answer
Detect screen notch from prefersStatusBarHidden
There are many question on StackOverflow about detecting whether an iPhone device has a notch in the screen, such as this one. The answers almost always recommend using the safeAreaInsets property of the top window. I have used that in my app to…
![](../../users/profiles/908621.webp)
fishinear
- 5,674
- 3
- 32
- 80
1
vote
2 answers
How to override edgesIgnoringSafeArea (or any View modifier)
I'm trying to override the functionality of edgesIgnoringSafeArea(_:) since I have custom handling for the vertical safe area in my view. However, there's no super to call so I'm not sure how to proceed other then handling every safe area edge. Any…
![](../../users/profiles/898984.webp)
robhasacamera
- 2,197
- 1
- 22
- 36
1
vote
1 answer
SwiftUI: Why is the height of proxy.safeAreaInsets.bottom equal to keyboardHeight?
So the safeAreaInset.bottom on the iPhone 11 Pro Max is 34.0, but when the keyboard is open, it changes the safeAreaInset.bottom to the height of the keyboard (346.0 points). Is there any way to access the safeAreaInset.bottom value (34.0) when the…
![](../../users/profiles/12771165.webp)
nickcoding
- 31
- 3
- 13
1
vote
2 answers
How to access safeArea insets while the parent view used IgnoringSafeArea()
As you can see the picture I want to place the search bar exactly to the top of the safeArea but the proxy.safeAreaInsets has not the proper value because in the PreviewProvider the parent uses edgesIgnoringSafeArea.
what can I do ? is there any way…
![](../../users/profiles/10127261.webp)
Behrad Kazemi
- 103
- 6
0
votes
0 answers
Hot to set additional safe area insets in SwiftUI
I'm trying to add additional padding to safe area dynamically. To achieve this I wrote modifier that wraps SwiftUI view into UIHostingController and sets additionalSafeAreaInsets on them:
extension View {
func extendSafeArea() -> some View {
…
![](../../users/profiles/8145240.webp)
Mark Kotevode
- 11
- 1
- 1
0
votes
0 answers
Extra bottom and top space in iPhone X in Xamarin using only code
I am trying to achieve this solution below with Xamarin for iOS
Does anyone knows how to use the safe area only by code (not forms)?
Extra bottom and top space in iPhone X in Xamarin form
Thank you
![](../../users/profiles/1216082.webp)
Dubi Sharon
- 51
- 1
0
votes
0 answers
How do you clip VStack children views that exceeds the screen's safe area?
I'm new to SwiftUI and have a question regarding how to setup a VStack relative to the safe area of the screen.
I'm currently writing an app that will have a single sign-in/sign-up button in the log-in screen. The idea is that if the email address…
![](../../users/profiles/7718961.webp)
Louise C.
- 11
- 2
0
votes
0 answers
how to make the navigation bar transparent in flutter?
I would like my Flutter application to occupy the entire screen. Actually, I've done it for the top with SafeArea, but it doesn't work for the bottom.
Current status:
Example here:
Someone has an idea ?
![](../../users/profiles/12660737.webp)
Aymé
- 1
- 1
0
votes
1 answer
SafeAreaInsets are 0 when View.OnAppearing gets triggered
I am doing some manual positioning and need to take into account the safearea on ios.
The problem I have is that when I am in my OnAppearing method, the SafeAreaInserts method returns thickness values of 0. After rotating the device (in the…
![](../../users/profiles/77249.webp)
Sjors Miltenburg
- 2,198
- 3
- 27
- 52
0
votes
1 answer
I am using SpriteKit to make a game, but my view only takes up what appears to be the safe area of the screen. How do I expand this view?
I am making a game using SpriteKit, and I want it to use the whole screen. However, right now, it is only using what looks to be the safe area. How can I make the view take up the entire screen? Below is the GameViewController code I am using:
class…
![](../../users/profiles/12422823.webp)
helloworld12345
- 139
- 1
- 12
0
votes
0 answers
flutter SafeArea hides system icons unexpectedly
I'm using SafeArea to avoid my display area clashing with the latest phones statusbar and camera notch. I use Scaffold without an AppBar.
Problem
Although the display area works as expected, a side-effect happens: the statusbar becomes a…
![](../../users/profiles/987846.webp)
kakyo
- 7,592
- 9
- 54
- 95
0
votes
0 answers
Should `preferredContentSize` include or exclude `safeAreaInsets`?
I have a view controller, that should be wrapped into navigation controller and presented in a popover, and also presented through a custom UIPresentationController.
The view controller has dynamic preferredContentSize and popover and custom…
![](../../users/profiles/599863.webp)
kjam
- 721
- 1
- 6
- 17
0
votes
1 answer
On iPhone 11, using a custom view, why is my Tap Recognizer or UIButton not responding on top part of View but works on lower part of View
I have a few custom action sheets. They are fully custom controls, not based on UIActionSheet. I add them as subview to the view controller and animate them in and out. They work fine on the older devices, but on iPhone 11 I have a problem. On a the…
![](../../users/profiles/826946.webp)
Andy Weinstein
- 2,460
- 3
- 16
- 26