Xlpagertabstrip: Use an Existing View Controller in Storyboard layout rather than XIB file for controller

Created on 25 Feb 2016  路  8Comments  路  Source: xmartlabs/XLPagerTabStrip

Use an Existing View Controller in Storyboard layout rather than XIB file for controller

thank you

Most helpful comment

When using an existing view controller via storyboard the view shifts the container view down when transitioning between screens. Any ideas on how to fix this?

All 8 comments

To use storyboard view controller set the storyboard id and use it to access the viewcontroller;
Example:
YourViewController * child_1 = [self.storyboard instantiateViewControllerWithIdentifier:@"yourstoryboardid"];

When using an existing view controller via storyboard the view shifts the container view down when transitioning between screens. Any ideas on how to fix this?

I get an error "init(coder:) has not been implemented" when I try to use my own view controller. I have implemented the proper init methods.

If you get an error "init(coder:) has not been implemented" just add below code to your view controller

required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)!
}

When using an existing view controller via storyboard the view shifts the container view down when transitioning between screens. Any ideas on how to fix this?

I have the same problems anyone have fix this?

In https://github.com/xmartlabs/XLPagerTabStrip/issues/290 there are different ways to fix this issue.
Cheers

When I create a new controller in StoryBoard, Why I cannot find the YoutubeExampleViewController.swift ? Thanks much for help?

Hi @keason !
Because YoutubeExampleViewController uses generics the storyboard isn't able to find it, you just type the name anyway and then load the class into the objC runtime sometime before the storyboard tries to instantiate it(i.e AppDelegate or somewhere else).

YoutubeExampleViewController.load()

Cheers

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dowhilenet picture dowhilenet  路  4Comments

andrewabdalla picture andrewabdalla  路  6Comments

rkittinger picture rkittinger  路  3Comments

Mohammed-Eliass picture Mohammed-Eliass  路  4Comments

luminkhant picture luminkhant  路  4Comments