所以,我似乎无法在我的(嗯,这是一种自定义视图)中获得该define
选项。UITextView
现在,我的CanPerformAction
方法中有这个:
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
if (action == @selector(copy:))
return NO;
if (action == @selector(delete:)) {
return NO;
}
if (action == @selector(addHighlight:))
return YES;
if (action == @selector(showThinkFeed:))
return YES;
if (action == @selector(editHighlightNote:))
return YES;
return [super canPerformAction:action withSender:sender];
}
我没有以这种方式获得定义选项。我尝试return YES;
进行方法调用并且确实出现了定义选项,但是当单击它时,它会抛出一个异常,上面写着:
-[MyViewController _define:]: unrecognized selector sent to instance 0x14574200