AutoCompleteTextView in a UITableViewCell

2 posts, 1 answers
  1. Miguel
    Miguel avatar
    4 posts
    Member since:
    Apr 2016

    Posted 15 Apr Link to this post

    Is there any way to add an AutoCompleteTextView in a UITableViewCell in a way that when suggestions view is displayed is added on the top view stack (hidding other UITableViewCells of the table?

    Any sample app were I could start working with?

  2. Answer
    Sophi avatar
    97 posts

    Posted 20 Apr Link to this post

    Hi Miguel,

    The suggestionView of the TKAutoCompleteTextView can be attached to any visual element in your view hierarchy not only to the autocomplete itself. For example you can attach it as a child to the cell itself or the whole tableview.
    You can consider applying this approach to your project.
    You should set the suggestionViewOutOfFrame and then set new frame and parent to the suggestionView. Consider the following snippet from the customization example.
      self.autocomplete.suggestionViewOutOfFrame = YES;
    _listView = (TKListView*)self.autocomplete.suggestionView;
        _listView.frame = CGRectMake(10, self.view.bounds.origin.y + 50, self.view.bounds.size.width - 20, self.view.bounds.size.height - (15 + self.autocomplete.bounds.size.height));
        _listView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight ;
        [_listView removeFromSuperview];
        [self.view addSubview:_listView];

    For guidance you can check out our sdk examples, here is link to our autocomplete customization example.
    If you have any further questions, do not hesitate to contact us.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top