SwiftMultiSelect icon indicating copy to clipboard operation
SwiftMultiSelect copied to clipboard

ui design is broken on iPhoneX layout

Open jjhok opened this issue 7 years ago • 1 comments

ui design is broken on iPhoneX layout like this. 2018-02-02 1 58 20

I did just run as your sample project (with lib ver 0.2.4)

jjhok avatar Feb 02 '18 05:02 jjhok

In MultiSelecetionViewController replace this

/// Calculate the nav bar height if present

` var navBarHeight:CGFloat

{

    get{
        var statusBarHeight:CGFloat
        
        if UIDevice().userInterfaceIdiom == .phone && UIScreen.main.nativeBounds.height == 2436 {
            //iPhone X
            statusBarHeight = 44
        }else{
            statusBarHeight = 20
        }
        
        if (self.navigationController != nil) {
            return self.navigationController!.navigationBar.frame.size.height + (UIApplication.shared.isStatusBarHidden ? 0 : statusBarHeight)
        }else{
            return 0
        }
    }
}`

sudhakar-codes avatar May 01 '18 06:05 sudhakar-codes