2

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.

enter image description here

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.

Sherly
  • 71
  • 4
  • 1
    Does this answer your question? [Change the location of an UImenu in swift](https://stackoverflow.com/questions/67809341/change-the-location-of-an-uimenu-in-swift) – aheze Oct 07 '21 at 17:22
  • Did you found a way? – Jamil Mar 14 '22 at 17:13

0 Answers0