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

能固定整个menu高度吗? #21

Closed
hengchengfei opened this issue Jun 21, 2017 · 1 comment
Closed

能固定整个menu高度吗? #21

hengchengfei opened this issue Jun 21, 2017 · 1 comment

Comments

@hengchengfei
Copy link

hengchengfei commented Jun 21, 2017

menu高度能固定吗,像tableview一样,能上下滑动的?

添加了一个menuShowDefaultRows属性。

// FTConfiguration
public var menuShowDefaultRows:Int = 0

    
fileprivate func configurePopMenuFrame() {
       //...
        if (arrowDirection == .Up) {
             popMenuFrame = CGRect(x: popMenuOriginX, y: (senderRect.origin.y + senderRect.size.height), width: configuration.menuWidth, height: popMenuHeight)
            if configuration.menuShowDefaultRows > 0 {
                let height = configuration.menuRowHeight * CGFloat(configuration.menuShowDefaultRows) + FTDefaultMenuArrowHeight
                 popMenuFrame = CGRect(x: popMenuOriginX, y: (senderRect.origin.y + senderRect.size.height), width: configuration.menuWidth, height: height)
            } 
        }
    }
@liufengting
Copy link
Owner

估计要改下源码就可以支持

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