MLPAutoCompleteTextField
MLPAutoCompleteTextField copied to clipboard
View hierarchy issue when displaying autoCompleteTableView
Hello,
I really appreciate your work on MLPAutoCompleteTextField. I would like to use it in our project, because it fits our requirements perfectly. But I am now facing an issue when the autoCompleteTableView is displayed. I am currently using v1.5 added to project via Pods.
Here is my situation: I have to generate a mask view dynamically from out a mask model that I retrieve by a web service. The mask model contains various objects. I made a screenshot to make things easier. ;)
- Mask contains x groups (alternating cyan / blue color)
- Group contains x column (alternating yellow / orange color)
- Column contains x entries (alternating light / dark gray color)
- Entries contains a label (green color) and an inputField (white color)
Now I subclassed UIView a few times (Mask, Group, Column, Entry) and generate the view when receiving the maskModel from the server. In my testcase I used the MLPAutoCompleteField as inputField in every entry. Now here is my issue:
When I type into an inputField the tableView will be displayed. But as you can see it is overlayed by the next group view. I had set clipsToBounds and masksToBounds to NO in every view in the hierarchy. But it seems to have no effect. I inspected your code an found a possible issue. The tableView will be inserted as subview into the superview of the inputField (in my case it's the MaskEntry - grey color).
While browsing GitHub I found out, that you fixed an similar issue by adding the tableView to the root view. So I replaced my version by the current state. But that the table view is completely misplaced and won't be diplayed under the input field.
Is there anything I am doing wrong? Any solutions?
I would really appreciate some help!
Best regards, SlimShady0208
I'll try to get a detailed answer for this on Monday
On Saturday, August 9, 2014, SlimShady0208 [email protected] wrote:
Hello,
I really appreciate your work on MLPAutoCompleteTextField. I would like to use it in our project, because it fits our requirements perfectly. But I am now facing an issue when the autoCompleteTableView is displayed. I am currently using v1.5 added to project via Pods.
Here is my situation: I have to generate a mask view dynamically from out a mask model that I retrieve by a web service. The mask model contains various objects. I made a screenshot to make things easier. ;)
- Mask contains x groups (alternating cyan / blue color)
- Group contains x column (alternating yellow / orange color)
- Column contains x entries (alternating light / dark gray color)
- Entries contains a label (green color) and an inputField (white color)
[image: autocompleteissue] https://cloud.githubusercontent.com/assets/949775/3865722/5ed1cbda-1fa6-11e4-9dd0-385108a6bcb2.png
Now I subclassed UIView a few times (Mask, Group, Column, Entry) and generate the view when receiving the maskModel from the server. In my testcase I used the MLPAutoCompleteField as inputField in every entry. Now here is my issue:
When I type into an inputField the tableView will be displayed. But as you can see it is overlayed by the next group view. I had set clipsToBounds and masksToBounds to NO in every view in the hierarchy. But it seems to have no effect. I inspected your code an found a possible issue. The tableView will be inserted as subview into the superview of the inputField (in my case it's the MaskEntry - grey color).
While browsing GitHub I found out, that you fixed an similar issue by adding the tableView to the root view. So I replaced my version by the current state. But that the table view is completely misplaced and won't be diplayed under the input field.
Is there anything I am doing wrong? Any solutions?
I would really appreciate some help!
Best regards, SlimShady0208
— Reply to this email directly or view it on GitHub https://github.com/EddyBorja/MLPAutoCompleteTextField/issues/48.
Connect with Eddy: LinkedIn http://bit.ly/linkedInEddy | Twitter http://bit.ly/eddyTwitter | Github http://bit.ly/eddyGithub
Hi - Do you have any updates on this? I believe I'm running into similar issues. The suggestions table is visible when attached to a UITextView within a table cell but no touch events register on the suggestions.
Hey there,
I'm sorry but our product management decided to realize the desired functionality without MLPAutoCompleteTextField. I forgot to mention that here. So I didn't try to solve the issue and from my point of view the issue is irrelevant.
I believe I have solved this issue by adding an optional property to the view the suggestion popup should actually live in.
See the changes in my fork at nod/MLPAutoCompleteTextField in MLPAutoCompleteTextField.m
I added a @property
of overView which if assigned, will be the overall container for the suggestion box instead of climbing around the window hierarchy and guessing.
I used it by just assigning my UITableView's instance to completeField.overView
.
Wanted to update for anyone that may be following - my solution solves the placement confusion but creates another issue with ambiguous placement of the suggestion table. I'm working out how to correct it and may have something soon.