An UITableViewController
pretty much takes up the entire view. I need a way to limit its height, width and add some shadows etc. For a clear explanation, I won't show the UITableViewController
's contents.
Without the use of a storyboard, I subviewed the UITableViewController
:
// In another UIViewController
let otherController = OtherController() // A subclass of UITableViewController
let otherControllerView = otherController.view
someView.addSubView(otherControllerView)
[...] // bunch of constraints
Notes:
In AppDelegate
, if I set the rootController
as OtherController()
, everything works as it should. If I change it back to SomeView()
, I see my modified tableView. If I should click it, it disappears.
This was the only thing that came close to my issue but sadly, I could not understand the answers provided as nothing made any sense to me.
I need to understand, why it disappears when touched etc.
view.bringSubviewToFront(...)
proved futile. I'm gessing that a tableView should be rendered in its own controller and not in another view?