xmartlabs / XLPagerTabStrip

Android PagerTabStrip for iOS.
MIT License
6.97k stars 1.33k forks source link

iOS 12 Safe area bug #623

Open lpbas opened 5 years ago

lpbas commented 5 years ago

Hello and thank you for this awesome library! I've been using it in my app and its been working great!

I am testing my app for iOS 12 compatability and I found a bug that I think is caused by this library. The safe area relative margins are not respected by the XLPagerTabStrip. Please see the following screenshot of the problem (which is only visible on iPhones with notches, X and the new ones) in landscape mode.

xlpager_12_bug

The pager scrollview is constrained to the safe are and my tableViewCells have "safe area relative margins" enabled. Any help is appreciated, thank you very much!

platput commented 5 years ago

Same issue here. Please fix if possible.

platput commented 5 years ago

Were you able to fix this?

gazreese commented 5 years ago

I'm also seeing the same issue. I don't even mind looking into the XLPagerTabStrip code if somebody gives me some pointers?

For me this only happens if I push my ButtonBarPagerTabStripViewController subclass onto a navigation controller. When presented in isolation it works fine.

This shows the frame of the ButtonBarPagerTabStripViewController and the frame of the first tab's view controller

Presented in isolation: frame (0.0, 64.0, 768.0, 911.0) bounds (0.0, 0.0, 768.0, 911.0) 1st v Optional((0.0, 0.0, 768.0, 867.0))

Pushed onto a view controller frame (0.0, 64.0, 768.0, 911.0) bounds (0.0, 0.0, 768.0, 911.0) 1st v Optional((-196.5, 0.0, 1161.0, 867.0))

gazreese commented 5 years ago

@platoputhur @L4grange did you manage to make any progress with this?

platput commented 5 years ago

@gazreese nope :(

lpbas commented 5 years ago

@gazreese Me neither, and I've read that it's a bug with how iOS 12 manages the safe area layout margins... I haven't tested it myself though... If anyone has any more info let us know.

PBBassily commented 5 years ago

did you tried it in ContainerViewController? hence, you can set top distance of your tabs to safe area as you want

mohitTechelogy commented 5 years ago

For Me,This Solution Worked On iOS 12.2

https://stackoverflow.com/questions/47983447/xlpagertabstrip-doesnt-respect-the-status-bar?rq=1

lgbin44 commented 2 years ago

😱