0

I'm new to iOS programming and got stuck using XLPagerTabStrip(github.com/xmartlabs/XLPagerTabStrip). I followed its tutorial and successfully added PagerTab on the top of VC. However, I can't add something like navbar on the top of VC, above the PagerTab. The PagerTab always go to the top even though I set layouts using storyboard. The tutorial doesn't help me, and there are similar questions in github issues and this website, but I can't find answer to my problem. I'd appreciate it if you teach me how to solve it.

My storybord The output

Taichi
  • 2,297
  • 6
  • 25
  • 47

1 Answers1

0

As refer to your storyboard, you have not added the UINavigationbarController.

  1. Select the ViewController in storyboard.
  2. On Xcode menu, select Editor > Embed In > Navigation Controller
  3. Run and check

This issue not relate to XLPagerTabStrip, it is UINavigationController itself. Refer Apple tutorial for details.

xmhafiz
  • 3,482
  • 1
  • 18
  • 26
  • Sorry, in the image I used UIView to make it clear. The same problem occurs even if it is UINavigationbar or other Views. – Taichi Jul 07 '17 at 02:44