FirstResponder missing redo:

2019-06-17 18:46发布

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?

2条回答
可以哭但决不认输i
2楼-- · 2019-06-17 19:32

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.

查看更多
Luminary・发光体
3楼-- · 2019-06-17 19:33

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/

查看更多
登录 后发表回答