SideMenu icon indicating copy to clipboard operation
SideMenu copied to clipboard

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

Open hafiz013 opened this issue 6 years ago • 1 comments

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?

hafiz013 avatar Mar 05 '20 03:03 hafiz013

@hafiz013 Can you provide a demo project reproducing this issue?

kukushi avatar Mar 13 '20 15:03 kukushi