EndouMari/TabPageViewController

Does not update tab bar ?

Closed this issue · 5 comments

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

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

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)
    }
}

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

Version is - TabPageViewController (0.2.3)

I noticed.
tabbar dose not change after TabPageViewController pushed

I will consider the correspondence.

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