IOS - Custom keyboard, updating text field in parent view

I am implementing a custom keyboard and you need to update the original text screen when the buttons touch this keyboard.

I tried to answer this question: Return the inputs to a UITextfield with a custom inputView but I do not find this very clear.

In statViewController, I defined my textField xValue and instantiated my keyboard:

 DCKeyboard *dckXValue = [[DCKeyboard alloc] initWithNibName:@"DCKeyboard" bundle:nil]; 

The next line of answer uses self, so I assume that I have to create the dckXValue property, which is statViewController:

 dckXValue.objStatViewController = self; 

Again, I follow the answer (add the @class line, create an object / property), but then in my method, which catches my button, presses (in DCKeyboard.m) when I reach the line:

 objStatViewController.xValue.text = @"Some value"; 

I get the error "Request for member" xValue "in something not a structure or union" when I try to compile.

Can someone give me any hints on where I might be wrong?

Thanks!

0
source share
1 answer

This is a property problem; a text box is not a property. Try #import "StatViewController.h" in your implementation file

+1
source

All Articles