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.



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

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift