Questions tagged [safearea]

42 questions
1
vote
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 { …
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…
robhasacamera
  • 2,967
  • 2
  • 28
  • 41
1
vote
1 answer

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…
kakyo
  • 10,460
  • 14
  • 76
  • 140
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…
nickcoding
  • 305
  • 8
  • 35
0
votes
1 answer

UIScrollView with UIStackView which resizes to fullfill the screen height

No code because everything is placed in xib. Structure: UIScrollView contains UIView (UIScrollView Scrollable Content Size Ambiguity) which contains UIStackView which contains a list of subviews. All the UIStackView subviews have fixed height except…
Gargo
  • 1,135
  • 1
  • 10
  • 21
0
votes
0 answers

SwiftUI status bar getting hidden when increasing font size with dynamic text

I have a view with a picker at the top of this view. the code works as I suppose. The app is for blind and visually impaired people. If these people use dynamic font on their iPhone and maximize the font, the picker moves under the status bar. How…
Michael
  • 616
  • 5
  • 20
0
votes
1 answer

How to get safe area insets from within a SKScene subclass

I'm subclassing SKScene to create a main menu scene and would like to add a button at the top left of the screen. Since the status bar is enabled I would want buttons to be placed below the status bar. To do this, I need the safe area insets, but…
rayaantaneja
  • 1,182
  • 7
  • 18
0
votes
0 answers

SwiftUI: background of the last element in the VStack stretches out from the borders in case of Spacer usage

I've just started learning of SwiftUI and I'm trying to make simple view: var body: some View { VStack(spacing: 30) { Spacer() Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…
Sergey Bogatyrev
  • 93
  • 1
  • 1
  • 5
0
votes
0 answers

Why does view.safeAreaInsets.top contain bad value in viewDidLayoutSubviews()?

Running iOS 16.1 app through XCode iPhone 14 Pro Max (phy. device), where 'view' is my VC's main view, I'm getting a view.safeAreaInset.top value of 97.66666... which is much higher than the 59.0 value for the safearea than everything online says it…
clearlight
  • 12,255
  • 11
  • 57
  • 75
0
votes
0 answers

SizedBox padding and also want to remove the dark part of SafeArea

Please. i am new to flutter. I want to add padding to the SizedBox, i can't seem to get the left and right padding to work. I also want to remove the dark part of SafeArea Widget build(BuildContext) { return Scaffold( backgroundColor:…
0
votes
0 answers

Notch area event handeling iOS

I added UIView with top and bottom layouts Superview.Top, SuperView.Bottom not SafeArea.Top, SafeArea.Bottom !!! and see my custom view correctly cover all screen without safe areas Inside custom view I have UITapGestureRecognizer and I do not see…
Sergey Burd
  • 171
  • 1
  • 2
  • 15
0
votes
1 answer

In SwiftUI, supporting iOS 14 and above, how do I get a ScrollView child view to ignore the safe area

I have a VStack that contains a Rectangle. The Rectangle has an edgesIgnoresSafeArea(.top) view modifier on it to extend it through the top safe area. import SwiftUI struct ScrollViewSafeArea: View { var body: some View { ScrollView…
FStrout
  • 29
  • 5
0
votes
0 answers

safe-area-inset works in embedded browser but not in Safari

I'm working on a Capacitor project. While running my app on an iPhone 13 XCode simulator I noticed that env(safe-area-inset-bottom) works as expected in the app's internal browser (Capacitor is using a WebView under the hood). However, if I open the…
Yulian
  • 6,262
  • 10
  • 65
  • 92
0
votes
1 answer

Why does decreasing y position by 1 point causes the Text view to jump by 47 points when having the IgnoringSafeArea enabled in SwiftUI?

I am trying to put a message on the blue line (the safe area box shown in the image). I need to have the .edgesIgnoringSafeArea(.all). The problem is that as soon as I change the Y position to anything under 11, the text jumps 47 points up to the…
Pasha
  • 51
  • 4