Re: How to Open Dictionary
Re: How to Open Dictionary
- Subject: Re: How to Open Dictionary
- From: Igor Ranieri <email@hidden>
- Date: Fri, 02 Sep 2016 08:46:52 +0200
You might want to look into UIReferenceLibraryViewController. That’s the class that presents the dictionary view for you, you can instantiate it with a term and present it to the user.
Best,
Igor
> On 01 Sep 2016, at 15:09, Gerriet M. Denkmann <email@hidden> wrote:
>
> I have an iOS app (9.3.5) which has an UITextView where the following is done often:
>
> User long presses first word
> (User clicks “Select” - only needed if Keyboard is visible)
> User clicks “Define”
> → the definition of the first word is displayed (e.g. in Oxford Dictionary of English).
>
> I want to add a button, called “Show Definition of First Word” which does all these steps.
> Selecting the first word is no problem.
>
> But how to simulate the click on “Define” in the action method of my new button? I cannot find anything in UITextView or UITextViewDelegate.
>
> In macOS I would use [NSView showDefinitionForAttributedString:atPoint: ].
> But I could find no such thing in UIView.
>
> Where to look for this?
>
>
> Gerriet.
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden