eggswift / ESTabBarController

:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie!
MIT License
5.18k stars 580 forks source link

Update to support new style for UITabBar on iOS 11 for iPad (as well as iPhone landscape) #79

Closed rami-ihr closed 6 years ago

rami-ihr commented 7 years ago

When an app is running on iPad (or iPhone landscape), the new behavior for UITabBar on iOS 11 is that the text appears to the right of the icon rather than below it. See attached screenshots of ESTabBarController sample app running on iOS 11 simulator, this is with the mixed style of ESTabBar and UITabBar:

simulator screen shot - ipad pro 10 5-inch - 2017-08-07 at 14 37 52

My proposal is that ESTabBarController exposes a property to specify whether you want the text below or to the right of the icons. Additionally, the default behavior should be to check what the OS version is and if it is 11 or greater than put the text to the right, otherwise put it below. What do you think @eggswift ?

rami-ihr commented 7 years ago

Also phone landscape now has a shorter tab bar and so the content appears squished unless there is support for text beside the label.

simulator screen shot - iphone 7 - 2017-08-07 at 14 47 57

eggswift commented 7 years ago

Ohh I think it's a problem. And I totally agree with you. Thanks~ I'll fix it after install the new Xcode.

eggswift commented 7 years ago

@rami-ihr Done

rami-ihr commented 7 years ago

@eggswift thank you! One thing though, in your logic you are checking for landscape, but I believe you should actually check for the width size class being regular. This is how Apple's UITabBar behaves. Though if the device is a phone then perhaps you have to check landscape, I'm not too sure. I suggest running the example app on both ipad and iphone and use the mixed sample and rotating the device.

eggswift commented 7 years ago

@rami-ihr Yes I'll check it later

brightsider commented 7 years ago

Devices with iOS 11 and scale 3x has issue with buttons. iphone x

rami-ihr commented 7 years ago

@eggswift I created a PR to fix one small issue still https://github.com/eggswift/ESTabBarController/pull/99