FirstResponder missing redo:

半城伤御伤魂 提交于 2019-12-10 12:58:17

问题


Why my FirstResponder in InterfaceBuilder's file is missing redo: connection (in Received Actions list)? undo: exists, but redo: doesn't. How could I fix it?


回答1:


This is a bug. The workaround is to throw this in a file somewhere:

@interface NSResponder (Redo)
- (IBAction)redo:(id)sender;
@end

Then make your connection in Interface Builder. Once that is done you can delete this code.




回答2:


This is a bug in Xcode, it doesn't see the redo: action even though it is there. As a workaround you can create a custom action redo: for making the connection.

See my Radar here: http://www.cocoanetics.com/2013/01/radar-interface-builders-first-responder-is-missing-some-editing-actions/



来源:https://stackoverflow.com/questions/14361298/firstresponder-missing-redo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!