Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutocompleteView position is wrong when using navigation bar. #9

Open
Pash237 opened this issue Sep 12, 2013 · 2 comments
Open

AutocompleteView position is wrong when using navigation bar. #9

Pash237 opened this issue Sep 12, 2013 · 2 comments

Comments

@Pash237
Copy link

Pash237 commented Sep 12, 2013

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];
@pliddlerr
Copy link

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.

@heikkihautala
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants