Navigation bar title and navigation buttons not appearing on iOS 11 Navigation bar title and navigation buttons not appearing on iOS 11 objective-c objective-c

Navigation bar title and navigation buttons not appearing on iOS 11


For Xcode 9, it appears that it is no longer enough to just set the frame of a custom view that is being injected into the navigationItem titleView. The intrinsic content size of your titleView now must be overriden and set as well.

Here's the code, adjust the width and height to suit your needs:

class NavigationBarTitleView: UIView {    override var intrinsicContentSize: CGSize {        return CGSize(width: bounds.width - 100, height: 50)    }    ...}


use sizeToFit()! ios 11 automatically sizes it, but ios 10 does not


I had the same issue and for me it was caused by subclassing UITabBarController