I would like to customize content of table view controller(add some buttons, etc.) but root view for that is table view. Is it a way to embed it into another view and add controls on it?
Ios – Embedding TableView in TableViewController into another view
iosswifttableview
Related Question
- Ios – How to check for an active Internet connection on iOS or macOS
- Ios – How to make a UITextField move up when the keyboard is present – on starting to edit
- Ios – How to check if a string contains another string in Objective-C
- Ios – Passing data between view controllers
- Ios – How to find topmost view controller on iOS
- Ios – UIScrollView Scrollable Content Size Ambiguity
- Swift Beta performance: sorting arrays
- Ios – How to convert a Swift Array to a String
Best Solution
You can use Container View.
In the storyboard create another view controller that you would use to host those controls. Then drag in Container View from the Object Library (normally the last item in the list) and place it where you want the table view to appear (which could be the whole screen). Doing this, the Container View will create another view controller. Simply delete that and
ctrl
drag from the Container View to your table view controller and select embed segue.By doing this, you would not have to change anything in your current table view controller if it doesn't depend on other view controllers to give it data in order for it to work. If it does, however, you could assign the segue identifier to the embed segue, implement
prepareForSegue:sender:
and do whatever you would normally do with other segues.