我正在使用SlideMenuControllerSwift,但是当我甚至没有点击菜单按钮时,它显示了我的左视图的一部分。知道为什么会这样吗?
let vc = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()!
let leftViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "filterViewControllerID")
let slide = SlideMenuController(mainViewController: vc, leftMenuViewController: leftViewController)
UIApplication.shared.keyWindow?.rootViewController = slide
这是截图:
答案 0 :(得分:0)
尝试这些属性,也许这可行:
public struct SlideMenuOptions {
public static var leftViewWidth: CGFloat = ScreenSize.SCREEN_WIDTH - 40
public static var leftBezelWidth: CGFloat? = 16.0
public static var contentViewScale: CGFloat = 1.0//0.96
public static var contentViewOpacity: CGFloat = 0.5
public static var shadowOpacity: CGFloat = 0.0
public static var shadowRadius: CGFloat = 0.0
public static var shadowOffset: CGSize = CGSizeMake(0,0)
public static var panFromBezel: Bool = true
public static var animationDuration: CGFloat = 0.4
public static var rightViewWidth: CGFloat = 225.0
public static var rightBezelWidth: CGFloat? = 16.0
public static var rightPanFromBezel: Bool = true
public static var hideStatusBar: Bool = true
public static var pointOfNoReturnWidth: CGFloat = 44.0
public static var simultaneousGestureRecognizers: Bool = true
public static var opacityViewBackgroundColor: UIColor = UIColor.blackColor()
}
答案 1 :(得分:-1)
环顾四周后,我意识到包含左视图的tableview没有任何约束,解决方案只是向表中添加约束。