Branch
Branch

Reputation: 387

Issue with Safe Area - Fine on iPhone X, not on others

So I'm trying to update my app for the iPhone X (a little late to the game, I know), and I enabled safe area, and fixed (supposedly) all my constraints to match. It looks perfect on the iPhone X. But for some reason, on all other iPhones, it still accounts for the iPhone X's notch, despite Safe Area correctly displaying where the UI should start and end. I'm at a loss. None of the constraints in question are hard coded, I set them all to the "standard" value (or so I believe).

storyboard (first button is actually the talk bubble, which is just a static image, second is the paw print, which is an actual button)

messed up iPhone 8 (bubble and ui elements should be at very top and bottom)

Here's my storyboard file: https://ufile.io/35zvs

UPDATE: image for ercell0

Upvotes: 4

Views: 728

Answers (2)

RLoniello
RLoniello

Reputation: 2329

You are using standard spacing for top and bottom for your Banner View with a required priority. try setting this to superView: 0 or safeArea: 0 and see if that corrects the issue for you.

constraints for Banner View

The updated view:

constraints for Banner View after changes

Upvotes: 2

Prateek Pande
Prateek Pande

Reputation: 505

Can you change ViewAs from iPhoneX to iPhone8, and attach an image? Other iphones your are testing on are running iOS11 or older? If running older versions, safe-area won't be able to help with the alignment. For pre iOS11, use the constraints you were using previously or Layout Anchors.

Upvotes: -1

Related Questions