TRAutocompleteView icon indicating copy to clipboard operation
TRAutocompleteView copied to clipboard

AutocompleteView position is wrong when using navigation bar.

Open Pash237 opened this issue 11 years ago • 2 comments

The problem is view location is computed in window coordinates instead of ViewController's coordinates. AutocompleteView should be added to window or, coordinates should be converted to ViewController's coordinate system:

TRAutocompleteView.m, line 136:

CGPoint textPosition = [_queryTextField convertPoint:_queryTextField.bounds.origin toView:_contextController.view];

Pash237 avatar Sep 12 '13 14:09 Pash237

I've actually altered my code to fix this and would like to push it back to the project. If the textfield isn't a direct descendent of the contextcontroller then my code does a convert point on the uitextfield origin.

pliddlerr avatar Apr 04 '14 15:04 pliddlerr

I needed to change TRAutocompleteView.m, line 136 to:

CGFloat calculatedY = [_queryTextField convertPoint:CGPointZerotoView:_contextController.view].y + _queryTextField.bounds.size.height;

heikkihautala avatar May 09 '14 12:05 heikkihautala