I'm using the last XLPagerTabStrip pod and xcode 8.3.3. I'm not sure if the bug comes from my code or XLPagerTabstrip code. I have a gap between tab bar and the view under the tab bar. I can fix it by changing constraints, but the real problem is when I click on tab items, it kind of shift the view up and fix the gap. However, if I swipe, it wouldn't shift it up.

Go to View Controller Attributes Insprector and Uncheck Under top bars, Also make sure the Tabs Overlap the ScrollView.
I unchecked Adjust Scroll View Insets because unchecking Under Top Bars makes the navigation bar look weird.
override public var scrollPercentage: CGFloat { containerView.contentOffset.y = 0.0 return super.scrollPercentage }
This worked for me on container viewcontroller.
It's good to mention, that you should disable "Adjust Scroll View Insets" on StripViewController not on its embed viewControllers. That wasnt clear to me, so maybe it helps someone
Most helpful comment
I unchecked Adjust Scroll View Insets because unchecking Under Top Bars makes the navigation bar look weird.