I was trying to use XLButtonBarPagerTabStripViewController as extended ViewController,
using delegate method
- (NSArray *)childViewControllersForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController
to set @property NSMutableArray *tabCtrlsArray as return childViewControllers,
basic logic was one of the children view controller has sub detail view controller (under navigation controller) will trigger XLButtonBarPagerTabStripViewController to mutate tabCtrlsArray, then call reloadPagerTabStripView method to reload the contents.
However, reloadPagerTabStripView is not always changing the contents afterwards, which seems like some async issues.
But when I debug the process in XLButtonBarPagerTabStripViewController, the children view controllers seem changing correctly but not the view. And it happens randomly.
PS: In the sub detail view controller to get XLButtonBarPagerTabStripViewController:
PagerTabStripController *ptsCtrl = [self.storyboard instantiateViewControllerWithIdentifier:@"PagerTabStripCtrl"];
[ptsCtrl changeChildrenViewCtrls];
Is there any better way to mutate the pagerTabStripChildViewControllers in XLPagerTabStripViewController?
@br1anchen,did you solve it out?I was doing the same thing,too.It was like google play store which page menu are changing dynamically.If you made it out,can you share me please?
Any Solution for this?
My question, too!
+1
Same here... Need help!!
Hello guys,
I'd like to share how I solve this problem. It's quite simple.
IMPORTANT
There are many random functions in Example project.
REMOVE ALL SAMPLE CODES IF YOU DONT KNOW WHAT IT IS FOR!
All you need to do is return an array of UIViewControllers in override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController]
Related issue #349
Most helpful comment
Hello guys,
I'd like to share how I solve this problem. It's quite simple.
IMPORTANT
There are many random functions in Example project.
REMOVE ALL SAMPLE CODES IF YOU DONT KNOW WHAT IT IS FOR!
All you need to do is return an array of UIViewControllers in override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController]