I'm looking to add a pull-down menu and I have no idea where to start. Apple's website guides me to UIMenu but I can't figure out how it works.
I know how to make a UIMenu:
NSMutableArray* actions = [[NSMutableArray alloc] init];
[actions addObject:[UIAction actionWithTitle:@"Edit"
image:nil
identifier:nil
handler:^(__kindof UIAction* _Nonnull action) {
// ...
}]];
UIMenu* menu =
[UIMenu menuWithTitle:@""
children:actions];
How do I attach it to a UIButton?