After a few weeks of work my Objective-C Catalyst App is ready, except for the main menu, which I cannot change because I cannot seem to properly override buildMenuWithBuilder. This is the signature I am using, which seems like it should work:
- (void)buildMenuWithBuilder:(id<UIMenuBuilder>)builder {
NSLog(@"BUILD MENU=%@", builder);
}
I conform to the <UIMenuBuilder> protocol. This code is in my UIApplicationDelegate subclass. Any suggestions as to what I am missing? Thanks.
Reply to self with solution. This iPad app dates from day zero, hence the App Delegate declaration generated by Xcode way back then looks like this:
@interface BlahAppDelegate : NSObject <UIApplicationDelegate, UIMenuBuilder>
Looking at the Swift sample code I noted this:
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate
I don't know Swift, but it looked to me like there was a difference in the superclass: old = NSObject, new = UIResponder. After making my App Delegate a subclass of UIResponder buildMenuWithBuilder is now invoked.