简体   繁体   中英

UISplitView and custom toolbar at bottom

So I have a Split View controller and am trying to put a toolbar at the bottom of my root view programmatically. I am currently adding it to the bottom of the table using the [self.tableView setTableFooterView:toolbar]; method. This works fine getting the toolbar on the screen, but it is not anchored to the bottom of the view. It always appears after the last element in the table. How would I go about anchoring it to the bottom of the root view? Should I set the frame to the bottom of the view, and then add it as a subview to the rootview itself? Or can I just adjust the frame and leave it as a component of the TableFooterView? Thanks

You have the right solution in your question.

Set the frame of your toolbar to the bottom of your root view. Be sure and make sure it's the frontmost view by calling:

[myRootView bringSubviewToFront:myBarView];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM