UITabbar shows syrinc when i went to background and enter into foreground in my app iOS swift
Solution:
In iOS 11 it has a bug so try the below code in appdelegate it will works good.
    
In iOS 11 it has a bug so try the below code in appdelegate it will works good.
class TabBar: UITabBar {
    private var cachedSafeAreaInsets = UIEdgeInsets.zero
    override var safeAreaInsets: UIEdgeInsets {
        if #available(iOS 11.0, *) {
            let insets = super.safeAreaInsets
            if insets.bottom < bounds.height {
                cachedSafeAreaInsets = insets
            }
        } else {
            // Fallback on earlier versions
        }
        return cachedSafeAreaInsets
    }
}
Comments
Post a Comment