0

I need to display search results for my custom control and I'm not so sure what is the best way to make this configurable.

Basically the control is similar to the UITextField but with more visualization. When the user enters some text to the field, the control would enter full screen so that the search field is on top and the results are displayed beneath. This would be very similar way to address search in Apple's Mail.app (see the attached picture).

The issue here is what would the "full screen" mean on an iPhone. If the view is presented from a table view cell, the parent view's frame is not good. The window's bounds do not work as I want to keep the navigation bar visible if there is one. Also, the full screen would be different with the iPad. With the iPad, I think I could use the pop over.

I was thinking if the controller using my custom control would provide the bounds (a delegate method perhaps?) but that feels somewhat cumbersome.

Any ideas would be appreciated.

Apple Mail.app address search

Update:

So far I've come to a conclusion that the iPad and iPhone versions of this have to have their own specializations of the results display. On an iPad, the popover is quite trivial to implement. On an iPhone, I really can't figure out the proper way to determine the bounds for the expanded control (the text field and results table).

It is hard to describe the problem, but all I'd really need is means to expand the control to occupy some bounds (in most cases the space between the keyboard and navigation bar).

mkko
  • 4,262
  • 3
  • 25
  • 29
  • what do you mean the parent's view frame is not good? Specifically what is the question, it sounds like you know you want to trigger a modal in full screen on the phone and on ipad you want to use a popover? – propstm Jan 12 '13 at 13:44
  • The parent's view frame might not be the whole presenting view (e.g. `UITableViewCell`). I don't know if there are any other exceptions. I think popover would be the right solution for iPad, but how about iPhone? I don't want to block the controls in the navigation bar. – mkko Jan 12 '13 at 14:15

0 Answers0