So I just noticed that my calls to -setActionName: on NSUndoManager are not properly updating the Undo/Redo menu item titles in the menu bar on Mac Catalyst. At first I thought maybe my actionName string was too long, so I just created a really simple sample project and ...yeah...my calls to -setActionName are ignored. The menu bar items just say "Undo" and "Redo.."
Sample:
-(IBAction)changeBackgroundColorAction:(UIButton*)sender
{
UIColor *currentBGColor = self.view.backgroundColor;
self.view.backgroundColor = UIColor.yellowColor;
NSUndoManager *undoManager = self.undoManager;
[undoManager registerUndoWithTarget:self selector:@selector(setBackgroundColorWithColor:) object:currentBGColor];
[undoManager setActionName:@"Change BG Color"];
}
I'm really starting to regret not using AppKit...
4
0
829