Question

What I would like is a modal UITableViewController with a toolbar at the bottom. The end goal is selecting certain rows as the 'active' rows (for filtering search results) and then hitting 'done' in the toolbar to finish the search. The kind of toolbar I'm looking for is like this:

enter image description here

I've searched and searched over SO however my combination is slightly different, it appears (ignore the empty row, this has a purpose later on)

enter image description here

You can't do self.navigationController.toolbarHidden = NO; because that's for a 'push' rather than 'modal'.

Alternatively this pattern may be frowned upon and an alternate suggestion could be made as to how this kind of filtering should really be done.

Thanks in advance

Was it helpful?

Solution

Well this is a bit premature after spending roughly 4-5 hours seeing how this should be done.

The answer is to select your view controller in the storyboard, hit 'Editor' > 'Embed In' > 'Navigation Controller'. It opens a separate line of navigation. This is quite a common pattern across various apps. For example, the official Twitter app's settings has the same usability pattern. Whether they do it the same way is another question, but the eventual outcome is the same.

Thanks!

OTHER TIPS

Why don't you use the default edit more for the UITableView Reference

Or if you still want to do your custom toolbar, just use a normal ViewController (not UITableViewController) and add a UITableView and a the toolbar to it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top