Search code examples
uitableviewuitoolbarios10xcode8

swift (xcode 8): is there a way to combine a static table and a toolbar which sticks at bottom of the screen instead of the table?


I'm new to swift, therefore a very basic question without acutal code yet.

what I tried so far:

  • embed a toolbar into a UITableViewController => toolbar sticks with the static table

  • embed a UITableView into a UIViewController => unable to add a static table, but the toolbar shows at the bottom of the display

Is there any way to create a static table with a seperated toolbar?

Thanks a lot!


Solution

  • Try using a UINavigationController:

    1. Drag a UINavigationController into the storyboard
    2. Configure the attached UITableViewController as needed.
    3. Click on the navigation controller, and under the “attributes” tab, next to “Bar Visibility,” check “Shows Toolbar.”
    4. Drag your toolbar buttons into the table view controller
    5. There is no step 5.