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

Does not update tab bar ? #42

Closed
roshanman opened this issue Mar 6, 2017 · 5 comments
Closed

Does not update tab bar ? #42

roshanman opened this issue Mar 6, 2017 · 5 comments

Comments

@roshanman
Copy link

TabPageViewController.displayControllerWithIndex(1, direction: .Forward, animated: false)?

I want set current index for controller, but does not update tabbar?

@roshanman
Copy link
Author

I have a extension for TabPageViewController.

extension TabPageViewController {
    func setIndex(_ index: Int) {
        let tab = view.subviews.filter{"\(type(of: $0))".hasSuffix("TabView")}.first
        let contentView = tab?.subviews.first
        let collectinoView = contentView?.subviews
            .filter{$0 is UICollectionView}
            .first as? UICollectionView
        
        let cell = collectinoView?.cellForItem(at: IndexPath(row: 1, section: 0))
        let button = cell?.contentView.subviews.filter{$0 is UIButton}.first as? UIButton
        
        button?.sendActions(for: .touchUpInside)
    }
}

@EndouMari
Copy link
Owner

I tried it, but tabbar updated.
Is the library latest version?

@roshanman
Copy link
Author

Version is - TabPageViewController (0.2.3)

@roshanman roshanman reopened this Mar 6, 2017
@EndouMari
Copy link
Owner

I noticed.
tabbar dose not change after TabPageViewController pushed

I will consider the correspondence.

@EndouMari
Copy link
Owner

Fixed version(0.2.5) has just released. Please use the latest one.

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

No branches or pull requests

2 participants