Closed rayastar closed 7 years ago
add subtitle label to BTNavigationDropdownMenu.swift: fileprivate var subTitle: UILabel!
fileprivate var subTitle: UILabel!
Create label:
let width = titleSize.width + (self.configuration.arrowPadding + self.configuration.arrowImage.size.width)*2 let height = self.navigationController!.navigationBar.frame.height let frameForSubTitle = CGRect(x: 0, y: 14, width: width, height: height) self.subTitle = UILabel(frame: frameForSubTitle) self.subTitle.text = items[0] as! String self.subTitle.textColor = self.menuTitleColor self.subTitle.font = UIFont(name: "Avenir-Heavy", size: 10) self.subTitle.textAlignment = .center self.menuButton.addSubview(self.subTitle)
Edit : func setMenuTitle(_ title: String) { self.subTitle.text = title }
func setMenuTitle(_ title: String) {
self.subTitle.text = title
}
Result:
add subtitle label to BTNavigationDropdownMenu.swift:
fileprivate var subTitle: UILabel!
Create label:
Edit :
func setMenuTitle(_ title: String) {
self.subTitle.text = title
}
Result: