2

I know that another question with same issue is there but the answers didn't solve my problem.

enter image description here

I have tried the solution here but still, I am getting the white space.

enter image description here

My bottom constraints are with SuperView, not bottom layout guide. I have tried expanding the safe area through code but still, nothing worked.

I am using another embedded view controller inside this view.

Update

View hierarchy enter image description here

iBug
  • 2,334
  • 3
  • 32
  • 65
  • Is your bottom view is direct subview of the view controller root view??? Add screenshot of the view hierarchy. – Bilal Feb 01 '18 at 08:26
  • yes, it is direct subview to SuperView. But it loads another controller's view as subview. – iBug Feb 01 '18 at 08:32
  • @Bilal check my update. – iBug Feb 01 '18 at 08:35
  • this looks fine... trying disconnecting embedded view controller and just set the background color of bottom subview. It could be because of your embedded view controller. – Bilal Feb 01 '18 at 08:38
  • yes, you are right, botomView is filling properly till bottom, but embedded view is not. I am having same issue for all embedded view controllers. – iBug Feb 01 '18 at 08:39
  • Make sure your embedded view controllers are connected with superview not bottom or top layout guides. Try with a single view in embedded view controller by setting background colors. – Bilal Feb 01 '18 at 08:42
  • Yes, embedded view has constraints with super view. – iBug Feb 01 '18 at 08:45
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/164319/discussion-between-ibug-and-bilal). – iBug Feb 01 '18 at 08:46
  • I was told this is a bug with Xcode and the safe area, I had the exact same issue with MapKit where I would tie it to the bottom of safe area / superview and that white area would still persist. I never actually got to fix it because I put in a tab bar which hides the white area, but I think someone said disabling safe area and tying the bottom of the view to bottom of superview directly should fix that white area. – dinosaysrawr Feb 01 '18 at 08:58
  • @dinosaysrawr I have tried that too :( – iBug Feb 01 '18 at 09:02
  • It is safe area, try to uncheck Safe area layout guides – David Kadlcek Feb 01 '18 at 09:54
  • I am not using safe area because my app targets iOS 8+ – iBug Feb 01 '18 at 10:54

2 Answers2

4

Remove "safe Area" in any storyboard ViewController. And then set constraints accordingly like this.

enter image description here enter image description here

PRADIP KUMAR
  • 489
  • 1
  • 9
  • 31
0

As you are providing target 8.0 support you can just remove safe area and provide simple constraint same as below image then your white space will remove for sure.

enter image description here