If you are having trouble using Tabman, please check out this document to see if you can resolve any problems that you're having. If not please raise an issue.
Tabman is designed to automatically inset the contents of child view controllers that contain UIScrollView
and other derived classes so that it shows correctly beneath the bar:
If you are having issues with Automatic Insetting, please try the following steps...
Ensure you're using the latest release of Tabman.
Make sure that auto insetting is enabled (it is by default).
.automaticallyAdjustsChildInsets = true
If you are using a custom view controller (and not something like a UITableViewController
), the way that your content scroll view is constrained to the superview is very important.
It is recommended that your UIScrollView
is constrained directly to the superview, as shown below:
As you can see, the constraints for the UITableView
are pinned to the superview rather than the topLayoutGuide
or Safe Area
.
Tabman will also handle any UIKit
properties that require modifying in order to get a reliable insetting behaviour. As we're providing a completely custom implementation, we disable a lot of the UIKit
helper properties that would otherwise inset content correctly for system components such as a UITabBar
.
Therefore, you shouldn't need to modify or have any of the following in your view controller code:
UIScrollView.contentInsetAdjustmentBehavior
UIViewController.automaticallyAdjustsScrollViewInsets
Modifying these properties will more than likely cause issues with the auto insetting engine, so it is advised to remove any usages from your code.
By this point, you should have a beautifully insetted table view in your child view controller, otherwise 😭.
Next steps:
- It might be useful to use the numbers provided by
bar.requiredInsets
to manually inset your content. Depending on how successful this is will help with debugging. - Raise an issue, and provide as much detail as you can about your layout and just what is going wrong.
- We'll get on with fixing it as soon as possible 🤞.