0

I am using XLPagerTabStrip I am using the the demo code attached with it. The requirement is to use the twitter layout and use it as a subview in another controller. I tried this by creating a new scene, added a UIView and in the code behind I am adding the navigation controller as subview of the UIView. The navigation controller and its title bar appears but its data is not appearing and neither the navigation is working.

    let storyboard = UIStoryboard(name: "Storyboard", bundle: nil)
    let navigationController = storyboard.instantiateViewController(withIdentifier: "navcontroller") as! NavController
    navigationController.view.layoutSubviews()
    container.addSubview(navigationController.view)

Also if any one could point out that how to make the navigation bar appear at bottom. Any help would be highly appreciated

  • It's not very clear what you want to do. What view are you trying to add and to where? Do you have more code that you can show us? Where does this `NavController` class come from? – Guy Kogus Sep 06 '17 at 13:26
  • Updated and simplified. The navcontroller is the navigation controller which I am trying to display as subview – Ammar Mehmood Sep 06 '17 at 14:32
  • You don't add a navigation controller as a subview. It's either something that you add to a tab bar controller or display modally. I think you need to freshen up on the view controller system used in iOS before attacking this problem. – Guy Kogus Sep 07 '17 at 09:02
  • Thank you for your reply. Assuming that if I don't use navigation controller, how can I achieve this ? What the requirement is that to get a similar functionality as the twitter example/control but in a subview at the bottom of the page . If you can give any pointers I'll surely try it out. – Ammar Mehmood Sep 07 '17 at 10:35

0 Answers0