robbdimitrov / RDVTabBarController

Highly customizable tabBar and tabBarController for iOS
MIT License
2.3k stars 501 forks source link

UI Changes for TabBarController in iPhoneXR #100

Open thejeswara opened 5 years ago

thejeswara commented 5 years ago

I am using RDVTabBarControler How to adjust UI on iPhoneXR safe area layout guides.

Xcode 10.1 Swift 4.2

Please help Thanks

aps112 commented 4 years ago

I have the same issue

thejeswara commented 4 years ago

Please follow the below steps to resolve the issue. Pods -> Pods -> RDVTabBarControllerSwift -> Open UIDevice+RDVTabBar.swift

Add below code on UIDevice+RDVTabBar.swift fileprivate let IPHONEXR_HEIGHT: CGFloat = 896

internal func isIphoneXR() -> Bool { return UIDevice.current.isIphoneXR() }

Open RDVTabBarController.Swift file add isIphoneXR() code on else if

if isIphoneX() { tabBarContainerHeight = TABBAR_HEIGHT_IPHONE_X }else if isIphoneXR() { tabBarContainerHeight = TABBAR_HEIGHT_IPHONE_X }

Please let me know if issue is solved on your case.