kitasuke / PagingMenuController

Paging view controller with customizable menu in Swift
MIT License
2.5k stars 449 forks source link

Update widthConstraint every time a MenuItem is selected #359

Closed EduardoVaca closed 7 years ago

EduardoVaca commented 7 years ago

If using and iPad you enter to SplitView (by opening another app at the same time) half of the paging menu it's hidden because you're enforcing to adjust the label width every time a MenuItem is selected. Is this intended? In the case .text I fixed it removing lines 37 and 38 from MenuItemView.swift:

let labelSize = calculateLabelSize(titleLabel, maxWidth: maxWindowSize)
widthConstraint.constant = labelSize.width