Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

viewDidAppear called twice #172

Closed
frandelarosa opened this issue May 23, 2016 · 2 comments · Fixed by #303
Closed

viewDidAppear called twice #172

frandelarosa opened this issue May 23, 2016 · 2 comments · Fixed by #303

Comments

@frandelarosa
Copy link

frandelarosa commented May 23, 2016

I have this scenario:

- (NSArray *)childViewControllersForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController{

    UIViewController *viewController1 = [[UIViewController alloc] init];

    UIViewController *viewController2 = [[UIViewController alloc] init];

    return @[viewController1, viewController2];

}

When XLPagerTabStrip is loaded, the viewDidAppear method is called twice in viewController1. This only happen with the first controller.

Any reasons?

Thanks in advance.

@kansaraprateek
Copy link

Hi frandelarosa,

I am having the same issue. I fixed it by commenting two lines in PagerTabStripViewController.swift .

224 -> childController.beginAppearanceTransition(true, animated : false)
229 -> childController.endAppearanceTransition()

@frandelarosa
Copy link
Author

ok, now it works! thanks @kansaraprateek.

@mats-claassen we can get an official fix for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants