I want XLPagerTabStrip under my customized view like following image.
How to achieve this view?
Thanks.

I also want to know
Yeah, me too
Me too
I also need this
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
buttonBarView.frame = CGRect(
x: 0,
y: headerView.frame.height,
width: self.view.bounds.width,
height: 50.0)
}
override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() buttonBarView.frame = CGRect( x: 0, y: headerView.frame.height, width: self.view.bounds.width, height: 50.0) }
don't work correctly...
What kind of problem do you have with the code?
don't work correctly...
Alternatively You can simply use something like this after super.viewDidLoad():
// Remove TabBarView and ContainerView from Superview
buttonBarView.removeFromSuperview()
containerView.removeFromSuperview()
// Add your HeaderView and put back TabBarView and ContainerView
view.addSubview(headerView)
view.addSubview(buttonBarView)
view.addSubview(containerView)
// Setup frames
headerView.frame = CGRect(
x: 0,
y: 0,
width: self.view.bounds.width,
height: 100.0)
buttonBarView.frame = CGRect(
x: 0,
y: headerView.frame.height,
width: self.view.bounds.width,
height: 50.0)
containerView.frame = CGRect(
x: 0,
y: headerView.frame.height + buttonBarView.frame.height,
width: self.view.bounds.width,
height: self.view.bounds.height - (headerView.frame.height + buttonBarView.frame.height))
1) TabBarView and ContainerView were removed and put back to Superview
2) TabBarView and ContainerView were not removed from Superview

don't work correctly...
Alternatively You can simply use something like this after
super.viewDidLoad():// Remove TabBarView and ContainerView from Superview buttonBarView.removeFromSuperview() containerView.removeFromSuperview() // Add your HeaderView and put back TabBarView and ContainerView view.addSubview(headerView) view.addSubview(buttonBarView) view.addSubview(containerView) // Setup frames headerView.frame = CGRect( x: 0, y: 0, width: self.view.bounds.width, height: 100.0) buttonBarView.frame = CGRect( x: 0, y: headerView.frame.height, width: self.view.bounds.width, height: 50.0) containerView.frame = CGRect( x: 0, y: headerView.frame.height + buttonBarView.frame.height, width: self.view.bounds.width, height: self.view.bounds.height - (headerView.frame.height + buttonBarView.frame.height))1. TabBarView and ContainerView were removed and put back to Superview 2. TabBarView and ContainerView were not removed from Superview
![]()
Yep. this work correctly!
Thanks
Most helpful comment
Alternatively You can simply use something like this after
super.viewDidLoad():1) TabBarView and ContainerView were removed and put back to Superview
2) TabBarView and ContainerView were not removed from Superview