Ilja
Ilja

Reputation: 46527

SFSafariViewController missing top bit on iphoneX

I made tint colour black to better demonstrate this, but for SFSafariViewController is missing top bit on iphoneX. I checked twitter and theirs is present.

If I scroll down I can see website contents where the missing bit is

enter image description here

Upvotes: 4

Views: 769

Answers (1)

tadija
tadija

Reputation: 3271

I reproduced this bug when presenting SFSafariViewController while status bar was being hidden.

Solved it by configuring modalPresentationStyle to .overCurrentContext:

let safari = SFSafariViewController(url: url)
safari.modalPresentationStyle = .overCurrentContext
present(self, animated: true, completion: completion)

Hint: without configuring modalPresentationStyle, Safari presentation will have a push like transition.

Upvotes: 3

Related Questions