Monthly Archives: September 2017


iOS 11 iPhone X UINavigationbar background image too small

I had a problem in one of my apps, that the background image I set, was too small for the new iPhone X.
So I tried a few things, but nothing worked. For example you could add a taller @3x background image, but then it would be clipped on an iPhone 8 Plus for example.

Finally I found a working solution for swift 3.2. (It should also work in swift 4)

Code:

On the left side is a iPhone 8 Plus simulator and on the right side is the iPhone X simulator.