1

I have an iOS app with an UIPageViewController that has 2 VCs:

  1. classic UIViewController with "SOS screen"
  2. UITabBarViewController with 3 tabs, first is UITableViewController with "Inbox"

In UIPageViewController.viewDidLoad I set the UITabBarViewController as the selected page.

This has worked fine in iOS 10, 11 and 12 but there is a problem with iOS 13 (built with Xcode 11)

When the UITabBarViewController is displayed it is off, the tab bar under the bottom safe area and the navbar over status bar. When I swipe to the UIViewController on the left and back to the UITabBarViewController it "jumps" and layouts itself properly:

enter image description here

Any ideas how to deal with it? I tried replacing the UIPageViewController with a custom UIViewController with both VC added to a scroll view but that causes other problems, breaks back gesture, etc. I need a way to fix the UIPageViewController.

Igor Kulman
  • 16,211
  • 10
  • 57
  • 118

1 Answers1

0

Just put this in your ViewDidLoad function:

self.tabBarController?.selectedIndex = 1
self.tabBarController?.selectedIndex = 0

It's a temporary fix, but it works.

Marco
  • 53
  • 1
  • 6