Use an Existing View Controller in Storyboard layout rather than XIB file for controller
thank you
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
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?