0

I need to add a look-up for my dictionary app.All the other function of the app is working fine but i want to add a lookup function so that when the user tap a word in textview ,the word and its definition should appear on the lookup.

I had tried the motion sensor and other technique but could solve my problem.

Any help or suggestion,i am stuck with this problem.

  • `UITextView` supports this by default. Select a word and the context menu appears. One of the menu items will be "Define". – rmaddy Sep 22 '15 at 04:21
  • @rmaddy :- i know that but in that define is not giving me the "definition". it only shows the word how to add the definition... – Tenzin Jinpa Sep 22 '15 at 04:45
  • Selecting "Define" for me shows the definition of the currently selected word. What do you see? – rmaddy Sep 22 '15 at 04:47
  • @rmaddy :- it give me no definition and in manage section ...my dictionary is not showing.Mine is a customized dictionary so not on the list of the Manage section – Tenzin Jinpa Sep 22 '15 at 04:54

1 Answers1

0

UITapGestureRecognizer is your friend here. Please take a look at following threads for implementation:

  1. Thread 1
  2. Thread 2
  3. Thread 3

BTW... Are you doing something different than Define action given by UITextView?

Community
  • 1
  • 1
Abhinav
  • 37,684
  • 43
  • 191
  • 309
  • :- i try to use the define but it give only the word not the definition during simulation..what to now and yes i used the tap gesture and got the word but the result is not good.Thanks for the reply – Tenzin Jinpa Sep 22 '15 at 04:50