-1

i have developed a custom keyboard app of iOS8. and i can't get the text from input view. any help will be appreciated . have tried to use

 - (void)textDidChange:(id<UITextInput>)textInput {} 

delegate to get text. but it returns null value. i don't have another idea from which i can get text from input view thanks in advance

Imran Ahmed
  • 1,023
  • 1
  • 11
  • 23
  • Some code will appreciate too – gronzzz Dec 06 '14 at 20:27
  • i have tried to use - (void)textDidChange:(id)textInput {} delegate to get text. but it returns null value. i don't have another idea from which i can get text from input view – Imran Ahmed Dec 06 '14 at 20:29
  • i have no idea what does mean "input view" ? Is it text view, or text field, or something else ? Don't be shy to give us full description – gronzzz Dec 06 '14 at 20:54
  • i am able to get string from input view of custom keyboard of iOS 8 . here is the line of code which will return the string NSString *str=[self.textDocumentProxy documentContextBeforeInput]; thanks – Imran Ahmed Dec 07 '14 at 13:56
  • http://stackoverflow.com/questions/24596272/nil-object-in-ios8-delegate-methods-custom-keyboards – nurnachman Dec 07 '14 at 14:46

1 Answers1

0

i am able to get string from input view of custom keyboard of iOS 8 . here is the line of code which will return the string

    NSString *strBeforeCursor=[self.textDocumentProxy documentContextBeforeInput]; 
    NSString *strAfterCursor=[self.textDocumentProxy documentContextAfterInput]; 

thanks

Imran Ahmed
  • 1,023
  • 1
  • 11
  • 23
  • it doesn't return the whole string, take a look:http://stackoverflow.com/questions/24479889/get-full-string-in-ios8-custom-keyboard-extension – nurnachman Dec 07 '14 at 14:46