TRAutocompleteView
TRAutocompleteView copied to clipboard
AutocompleteView position is wrong when using navigation bar.
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];
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.
I needed to change TRAutocompleteView.m, line 136 to:
CGFloat calculatedY = [_queryTextField convertPoint:CGPointZerotoView:_contextController.view].y + _queryTextField.bounds.size.height;