I'am testing my application on iOS 9 Beta. Apple added a new panel with copy/paste/return functions.
I know I can disable it in general settings of my device.
Can I detect it in code using notifications? And can I tell my textFields and textViews don't show it when they are editing?
If I turn off the predictive view, the panel will display.
I've not found it in xCode 7 beta 4. If you know how to fix this issue please let me know it too :)
Open "General" in the Settings app, then tap "AirPlay & Handoff." Next, toggle off the "Handoff" switch, and your iPhone will no longer give up its clipboard to other devices or have its clipboard taken over by other devices.
Cut: Tap Cut or pinch closed with three fingers two times. Copy: Tap Copy or pinch closed with three fingers. Paste: Tap Paste or pinch open with three fingers.
I've solve the issue. I've found the way to hide this Shortcuts bar programmatically:
if ([textView respondsToSelector:@selector(inputAssistantItem)])
{
UITextInputAssistantItem *inputAssistantItem = [textView inputAssistantItem];
inputAssistantItem.leadingBarButtonGroups = @[];
inputAssistantItem.trailingBarButtonGroups = @[];
}
Also you can detect the iOS Version if you need. Important to know UITextInputAssistantItem class is new class for iOS 9.
if ([[[UIDevice currentDevice] systemVersion] intValue] > 8.99)
{
// Your super-code
}
Hope it will be useful information!
Try this
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
if (action == @selector(paste:))
return NO;
return [super canPerformAction:action withSender:sender];
}
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With