I added UIMenu to the UIButton.menu. UIMenu displayed at (x: 0, y:0) of the button.
let items = (1...9).reversed().map {
UIAction(title: "\($0.description) \(self.yearString(text: $0.description))") { [unowned self] action in
}
}
self.button.menu = UIMenu(title: "", children: items)
self.button.showsMenuAsPrimaryAction = true
Is there any way I could change the menu's location/position? I want to display the menu at bottom right corner of the button.
Is there any way I could change the menu's location/position? I want to display the menu at bottom right corner of the button.