CosmicMind / Material

A UI/UX framework for creating beautiful applications.
http://cosmicmind.com
MIT License
11.99k stars 1.26k forks source link

TabsController got Black View when Switching tab #1293

Open desmond-lab opened 4 years ago

desmond-lab commented 4 years ago

May I know is it any reasonable problem for this ? Because when I switch either through pan gesture or select tab bar, will got black screen appear while holding gesture, and disappear when release gesture.

Material -> 3.1.8 Motion -> 3.1.3

import Material class ProfileTabBarViewController: TabsController {

open override func prepare(){
    super.prepare()
    delegate = self
    preparePageTabBar()
    tabBarAlignment = .top
    tabBar.lineColor = .brown
    tabsController?.isThemingEnabled = false // no effect whether comment this or no
}

fileprivate func preparePageTabBar() {
    tabBar.lineColor = Color.blueGrey.base
    tabBar.dividerColor = Color.blueGrey.lighten5
    tabBar.lineAlignment = .bottom
}

}

class MyProfileVC: UIViewController {

var tabController: ProfileTabBarViewController!

let profileDetailsVC:ProfileDetailsVC = {
    let vc = ProfileDetailsVC()
    vc.tabItem.title = "PROFILE DETAILS".localized()
    vc.tabItem.titleColor = UIColor.gray
    return vc 
   }()

let profileMoreDetailsVC: profileMoreDetailsVC = {
    let vc = profileMoreDetailsVC()
    vc.tabItem.title = "PROFILE MORE DETAILS".localized()
    vc.tabItem.titleColor = UIColor.gray

    return vc
}()

    override func viewDidLoad() {
    super.viewDidLoad() 
    tabController = ProfileTabBarViewController(viewControllers:     [profileDetailsVC, profileMoreDetailsVC], selectedIndex: 0)
     tabController.didMove(toParent: self)
    }

} RPReplay_Final1582700212.mov.zip