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

My content view (custom tab bar) gone first time load after view side menu it appear #106

Open
hafiz013 opened this issue Mar 5, 2020 · 1 comment

Comments

@hafiz013
Copy link

hafiz013 commented Mar 5, 2020

how bugs reproduce

  1. load content view (custom tab bar) with menu but the content menu (tab bar) gone.
  2. I click button to open menu
  3. Then suddenly, custom tab bar appear.

first_time_load
after_click_button
config_storyboard_2
config_storyboard_1

Expected:

  1. first time load content view(custom tab bar) should appear without need to click floating button.

Sample configuration in side class AppDelegate:
SideMenuController.preferences.basic.hideMenuWhenEnteringBackground = false SideMenuController.preferences.basic.direction = .right SideMenuController.preferences.basic.position = .sideBySide

Content View Controller add view programmatically under class CustomTabBarViewController extend UITabBarController :
`private var _customTabBar:CustomTabBar!
_customTabBar = UINib.init(nibName: "CustomTabBar", bundle: nil).instantiate(withOwner: nil, options: nil)[0] as! CustomTabBar
self.view.addSubview(_customTabBar)

    _customTabBar.translatesAutoresizingMaskIntoConstraints = false
    
    _customTabBar.heightAnchor.constraint(equalToConstant: 52).isActive = true
    _customTabBar.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
    _customTabBar.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
    _customTabBar.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
    
    _customTabBar.layer.borderWidth = 1.0
    _customTabBar.layer.borderColor = UIColor(hex: "#989898")?.cgColor
    _customTabBar.clipsToBounds = true`

Please help, it is need to cache or manually add content view controller for first time load?

@kukushi
Copy link
Owner

kukushi commented Mar 13, 2020

@hafiz013 Can you provide a demo project reproducing 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

No branches or pull requests

2 participants