1)、重写canBecomeFirstResponder方法
- (BOOL)canBecomeFirstResponder{
[super canBecomeFirstResponder];
return YES;
}
}
2)、创建自定义UIMenuController
(3)、判断显示哪个menu
- (BOOL)canPerformAction:(SEL)actionwithSender:(id)sender
{
[super canPerformAction:actionwithSender:sender];
if ( action == @selector(share:) || action ==@selector(email:) || action == @selector(print:))
{
returnYES;
}
else
{
returnNO;
}
}
{
}