Skip to content

menuViewController.appearance.popMenuPresentationStyle = .near(.bottom, offset: CGPoint(x: 0, y: 30))设置后,没效果 #78

Description

@LittleThieves

let menuViewController = PopMenuViewController(sourceView: menuBtn, actions: actions)

    menuViewController.appearance.popMenuColor.actionColor = .tint(AppStyle.c333)
    menuViewController.appearance.popMenuFont = UIFont.systemFont(ofSize: 13, weight: .medium)
    
    menuViewController.appearance.popMenuBackgroundStyle = .none()
    menuViewController.appearance.popMenuColor.backgroundColor = .solid(fill: .white)
    menuViewController.appearance.popMenuCornerRadius = 5
    
    menuViewController.appearance.popMenuActionHeight = 36
    menuViewController.appearance.popMenuItemSeparator = .fill(AppStyle.cED, height: 1)
    /// 设置状态栏样式
    menuViewController.appearance.popMenuStatusBarStyle = .default
    
    // 设置菜单显示位置偏移,避开按钮本身
    menuViewController.appearance.popMenuPresentationStyle = .near(.bottom, offset: CGPoint(x: 0, y: 30))
    
    present(menuViewController, animated: true, completion: nil)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions