BTNavigationDropdownMenu icon indicating copy to clipboard operation
BTNavigationDropdownMenu copied to clipboard

take care of too long text for title

Open fukemy opened this issue 6 years ago • 4 comments

screen shot 2018-11-20 at 17 48 17

fukemy avatar Nov 20 '18 10:11 fukemy

Did you find a way to handle this?

StriderHND avatar Nov 22 '18 03:11 StriderHND

i trim text if over 15 length screen shot 2018-11-22 at 10 37 20

func setMenuTitle(_ title: String) {
        if title.count > 16 {
            let temp = "\(String(title[String.Index(encodedOffset: 0)...String.Index(encodedOffset: 16)])).."
            self.menuTitle.text = temp
        }else {
            self.menuTitle.text = title
        }
        self.setNeedsLayout()
    }

fukemy avatar Nov 22 '18 03:11 fukemy

I think I will provide the method to truncate long text (head/middle/tail). Thanks for raising the issue.

PhamBaTho avatar Nov 22 '18 03:11 PhamBaTho

is this issue fixed?

Navoda-BrightSparks avatar Feb 06 '20 11:02 Navoda-BrightSparks