I'm trying to create a UIButton programmatically in iOS 14 (beta 3) in objective-C. This is what I've tried, but the UIAction handler is never called when I tap the button:
UIAction *tapAction = [UIAction actionWithHandler:^(UIAction* action){
NSLog(@"Never gets here");
}];
UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 100, 100) primaryAction:tapAction];
Any ideas?