我正在尝试理解如何使用Swift闭包来使用NSLayoutManager。我可以按如下方式成功注册一个undo:doThing();undoManager?.registerUndoWithTarget(self,handler:{_inundoThing();}undoManager?.setActionName("dothing")当然,我需要支持redo,这相当于撤消撤消。我可以做到:doThing();undoManager?.registerUndoWithTarget(self,handler:{_inundoThing();undoManager?.registerUnd