On the simulator I see the UIMenucontroller without a problem but it won’t appear testing on device running iOs 4+ . It is a standard uitextview added using IB.
I have added these methods to the viewcontroller which is the delegate but I don’t think they are necessary since I want the standard menucontroller, select, copy, etc. Not to mention they are not being called.
thanks for the help
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
NSLog(@"Can perform action called");
BOOL answer = NO;
if (action == @selector(copy:))
{
answer = YES;
}
if (action == @selector(cut:))
{
answer = YES;
}
if (action == @selector(paste:))
{
answer = YES;
}
if (action == @selector(select:))
{
answer = YES;
}
if (action == @selector(selectAll:))
{
answer = YES;
}
return answer;
}
- (BOOL) canBecomeFirstResponder {
NSLog(@"can become first called");
return YES;
}
You need to add a gesture recognizer, or override the touchesEnded:withEvent: method, and display the menu controller:
You also should override the methods -copy,-cut,-paste, etc.