Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UITabBar iPhoneX problem

https://openradar.appspot.com/radar?id=6668416337313792

There is a problem with UITabBar used without UITabBarController on iPhone X. The UITabBar layout is broken:

broken

Layout can be fixed using following workaround:

    private var didLayoutSubviewsForTheFirstTime = false
    override func viewDidLayoutSubviews() {
        if !didLayoutSubviewsForTheFirstTime {
            didLayoutSubviewsForTheFirstTime = true
            tabBar.invalidateIntrinsicContentSize()
            view.setNeedsLayout()
        }
    }

So the layout is correct again:

ok

About

Describes UITabBar iPhoneX problem

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages